-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PHP 7.1] Latest master is crashing in ArgumentResolver #19677
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
Comments
Can you post a code snippet to reproduce the problem? |
No need. Just use symfony-standard master. P.S. It seems that this one is also PHP 7.1 specific |
I can't reproduce this on PHP 7.1.0-beta2 on Windows. Status: works for me |
I have beta3. Unfortunately I cannot run it through debugger as the upcoming xdebug 2.5 segfaults for me. |
status: reviewed I can reproduce this with PHP 7.1-beta3. However, this is probably a bug in PHP, as it's working as expected in all PHP versions except 7.1-beta3? |
It might be. I have no crash if I switch back to 7.0. However symfony might do something that's not allowed anymore. |
The problem is that in PHP 7.1-beta3, Reported the bug at PHP, to see if this can be reverted or at least more explicitely documented: https://bugs.php.net/bug.php?id=72906 |
The API Platform test suite also fails for other reasons with the latest 7.1 (it was green before the beta 3). PHP even segfault. The last beta looks buggy, I think we should only allow failure for 7.1 until it becomes more stable. |
Take a look at the last comment from @nikic in php/php-src#2068 The BC seems to be intentional to support nullable types. |
The feature will be reverted in PHP: https://bugs.php.net/bug.php?id=72906#1471710916 For now, please downgrade your PHP version to PHP 7.1.0-beta2 or PHP 7.0.9. This issue can be closed. |
I'm going to take just this one out of the context as it probably should be solved in 3.2. The new nullable types would probably need to be supported in argumetresolver and through the framework as I imagine a lot of ppl will now use them. That's the main reason I'm even running the betas. |
This class should probably receive a compatibility update for the nullable: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php My guess is that it should give a default value with null, meaning |
@iltar thing is, This also applies to other places using |
I will try to find a 7.1-beta3 monday if I can so I can build a patch for it (please do remind me if you can) |
This took unexpected turn. It seems that I wasn't clear enough. If they do revert the patch there is nothing to do from the symfony side, you are correct. |
Everything has been reverted: php/php-src@8855a2c this can now be closed |
@mvrhov can you open a new issue for that? I think this is something that has to be merged into 3.1 and 3.2. |
As noted by @wouterj, I've reverted the changes so that
|
@symfony/deciders this can be closed |
Note that the revert commit has been reverted: php/php-src@f4e68a3 This should be reopened. And we should add tests for this. |
Only the |
PropertyInfo needs fixing too ( |
@teohhanhui PropertyInfo doesn't need a fix. It is already compatible with 7.1 because it uses |
@teohhanhui but it indeed needs an update for the return type. |
…flectionType changes in PHP 7.1 (teohhanhui) This PR was merged into the 2.8 branch. Discussion ---------- [PropertyInfo] Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1 | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #19677 (comment) | License | MIT | Doc PR | N/A Commits ------- 4a041e9 Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1
RuntimeException in ArgumentResolver.php line 77: Controller "AppBundle\Controller\DefaultController::indexAction()" requires that you provide a value for the "$request" argument (because there is no default value or because there is a non optional argument after this one).
The text was updated successfully, but these errors were encountered: