[PropertyInfo] Backport support for typed properties (PHP 7.4)#37971
Merged
fabpot merged 1 commit intosymfony:4.4from Aug 28, 2020
ogizanagi:backport-typed-properties-propinfo
Merged
[PropertyInfo] Backport support for typed properties (PHP 7.4)#37971fabpot merged 1 commit intosymfony:4.4from ogizanagi:backport-typed-properties-propinfo
fabpot merged 1 commit intosymfony:4.4from
ogizanagi:backport-typed-properties-propinfo
Conversation
fabpot
approved these changes
Aug 28, 2020
Member
|
Thank you @ogizanagi. |
javiereguiluz
added a commit
to symfony/symfony-docs
that referenced
this pull request
Aug 31, 2020
…(ogizanagi) This PR was merged into the 4.4 branch. Discussion ---------- [PropertyAccess] Backport typed property support to 4.4 Backported in symfony/symfony#37971 Commits ------- cc6ed26 [PropertyAccess] Backport typed property support to 4.4
fabpot
added a commit
that referenced
this pull request
Sep 4, 2020
This PR was merged into the 4.4 branch. Discussion ---------- [PropertyInfo] Fix typed collections in PHP 7.4 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | No ticket | License | MIT | Doc PR | N/A #37971 introduced support for typed properties in PHP 7.4, however by short circuiting the `getTypes()` method, typed collections are returned as `Type::BUILTIN_TYPE_ARRAY` without a proper collection type. If running on PHP < 7.4, the `getMutator()` method would be called which would extract the collection type from the getter/setter or adder/remover. I updated the typedPropertiesTest to cover this case. Commits ------- 282ed28 [PropertyInfo] Fix typed collections in PHP 7.4
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports #34557 as suggested.
One of my workmate hit this issue with the Serializer component and it was not obvious for him why it was not working, without hint.