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

Improve callable check to allow PHP 8 compatibility #259

Merged
merged 1 commit into from
Nov 24, 2020
Merged

Improve callable check to allow PHP 8 compatibility #259

merged 1 commit into from
Nov 24, 2020

Conversation

iansltx
Copy link
Contributor

@iansltx iansltx commented Nov 16, 2020

No description provided.

@glensc
Copy link
Contributor

glensc commented Nov 17, 2020

@iansltx links to rfc that changed the behavior? what is the error you are fixing?

include such details to PR body!

also, if PR is not ready (CI fails right now, for example), convert it to Draft:

@iansltx
Copy link
Contributor Author

iansltx commented Nov 17, 2020

@glensc Two tests fail due to throwing a TypeError when attempting to define, or protect, the integer 123, contained in the "bad services" data provider in the tests. The tweaks I added short-circuit prior to making the method_exists call that would cause the TypeError, ensuring that error condition throws the same exception that it did before PHP 8. You can see the issue for yourself if you pull down master and run the test suite locally on PHP 8.0.

As for the build failure, Travis doesn't yet have a PHP 8.0 environment apparently. Let's see if nightly works...

composer.json Outdated
@@ -12,7 +12,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5 || ^8",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use >=7.2.5 instead? That's what we decided to use on my other projects.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@iansltx
Copy link
Contributor Author

iansltx commented Nov 23, 2020

@fabpot In case the earlier comment didn't notify, I revised the PR to use the >= PHP version constraint as requested.

@fabpot
Copy link
Member

fabpot commented Nov 24, 2020

Thank you @iansltx.

@fabpot fabpot merged commit eb3a084 into silexphp:master Nov 24, 2020
@glensc
Copy link
Contributor

glensc commented Nov 30, 2020

CHANGELOG not updated for 3.3.1 release

@fabpot
Copy link
Member

fabpot commented Nov 30, 2020

@glensc Fixed

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

Successfully merging this pull request may close these issues.

3 participants