Skip to content

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