Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting PHP Parse error when running the package in PHP 5.6.40 version #710

Closed
AmraniCh opened this issue Oct 2, 2021 · 6 comments
Closed

Comments

@AmraniCh
Copy link
Contributor

AmraniCh commented Oct 2, 2021

Whoops is supposed to work without any problems in PHP ^5.5.9 versions as indicated in the composer.json file, I've run Whoops in a PHP 5.6.40 CLI and I've got this error.

PHP Parse error:  syntax error, unexpected ':', expecting ';' or '{' in /home/amranich/Desktop/ajax-dispatcher/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php on line 181

If you planning to not support PHP 5 anymore then the composer.json must be updated and I think a lot of things must be changed too, if not I can create a PR to remove the return type declaration that causes this error.

@SvenRtbg
Copy link
Contributor

SvenRtbg commented Oct 2, 2021

Your error message does not seem to point to something from the Whoops project.

@AmraniCh
Copy link
Contributor Author

AmraniCh commented Oct 2, 2021

@SvenRtbg Thanks for your notice, I've updated the error.

@SvenRtbg
Copy link
Contributor

SvenRtbg commented Oct 2, 2021

Yes, now it makes sense, and it looks like the offending code was added just two weeks ago. See #706 .

@SvenRtbg
Copy link
Contributor

SvenRtbg commented Oct 2, 2021

Seems like there is at least a loophole in the test infrastructure now. TravisCI.org stopped working months ago, some transition has to be made to TravisCI.com - and that's where PHP5 relates tests would be running. The Github checks integration is only validating PHP 7.

@AmraniCh
Copy link
Contributor Author

AmraniCh commented Oct 2, 2021

@SvenRtbg Emm, so the PHP 5 compatibility is already broken now! I think the added return types (#706) should be removed.

@denis-sokolov
Copy link
Collaborator

Thank you folks for noticing and investigating! Now fixed in 9814ccd, 2.14.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants