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

Skip "optional before required" test for PHP >= 8.1. #50

Merged
merged 1 commit into from
Oct 11, 2023
Merged

Skip "optional before required" test for PHP >= 8.1. #50

merged 1 commit into from
Oct 11, 2023

Conversation

serge-kvashnin
Copy link
Contributor

Since PHP 8.1 optional parameters before required are deprecated. Therefore in DefaultValueResolver::getParameters() method a call to the reflection parameter $parameter->isDefaultValueAvailable() will always return false, even if the default value is there, when optional parameter is placed before required. So it'll always throw exception of missing parameter when test is running on PHP >= 8.1. I marked it as skipped for now, but I guess later it can be removed, because this behavior won't be supported.

@serge-kvashnin
Copy link
Contributor Author

#44

@mnapoli
Copy link
Member

mnapoli commented Oct 11, 2023

Thanks 🎉

@mnapoli mnapoli merged commit 74f216c into PHP-DI:master Oct 11, 2023
@serge-kvashnin serge-kvashnin deleted the php-8.1-deprecated-optional-before-required branch October 11, 2023 10:46
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

Successfully merging this pull request may close these issues.

2 participants