forked from symfony/symfony
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug symfony#19784 [HttpKernel] Fixed the nullable support for php 7.1…
… and below (iltar) This PR was squashed before being merged into the 3.1 branch (closes symfony#19784). Discussion ---------- [HttpKernel] Fixed the nullable support for php 7.1 and below | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#19771 | License | MIT | Doc PR | ~ This PR gives support for for the new php 7.1 and will only work in beta3 or higher. I've had to backport the support to 3.1 because I consider this a bug that it won't work, even though 3.1 won't be supported for much longer. ~~The deprecation I've added in the `ArgumentMetadata` should not be triggered as all framework cases create it with the argument. Just for developers who for some reason implemented this manually, I've added the deprecation.~~ ~~*If needed, I can re-open this against 3.2 and leave 3.1 "broken"*~~ On 7.1 lower than beta3 this will happen but shouldn't affect any higher versions (I hope). ``` There was 1 failure: 1) Symfony\Component\HttpKernel\Tests\ControllerMetadata\ArgumentMetadataFactoryTest::testNullableTypesSignature Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ Array ( 0 => Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata Object (...) 1 => Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata Object ( 'name' => 'bar' - 'type' => 'stdClass' + 'type' => 'Symfony\Component\HttpKernel\Tests\Fixtures\Controller\stdClass' 'isVariadic' => false 'hasDefaultValue' => false 'defaultValue' => null 'isNullable' => true ) 2 => Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata Object (...) ) /home/ivanderberg/projects/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php:123 ``` Commits ------- 4a1ab6d [HttpKernel] Fixed the nullable support for php 7.1 and below
- Loading branch information
Showing
7 changed files
with
122 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters