-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PropertyInfo] Support multiple types for collection keys & values #39020
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
Merged
lyrixx
merged 1 commit into
symfony:5.x
from
Korbeil:feature/property-info-collection-union-types
Dec 31, 2020
Merged
[PropertyInfo] Support multiple types for collection keys & values #39020
lyrixx
merged 1 commit into
symfony:5.x
from
Korbeil:feature/property-info-collection-union-types
Dec 31, 2020
Conversation
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
7a2887a
to
b78a76e
Compare
ro0NL
reviewed
Nov 7, 2020
9a93cc6
to
f7b9e83
Compare
jderusse
reviewed
Nov 8, 2020
jderusse
reviewed
Nov 8, 2020
jderusse
reviewed
Nov 8, 2020
jderusse
reviewed
Nov 8, 2020
src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
Outdated
Show resolved
Hide resolved
28248c6
to
706583d
Compare
871c1f5
to
f1ce521
Compare
Korbeil
commented
Nov 13, 2020
src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php
Outdated
Show resolved
Hide resolved
28de431
to
65aeb32
Compare
ping @dunglas, if you have time to review that PR |
lyrixx
reviewed
Dec 1, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except one little comment, I think this is OK
src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
Outdated
Show resolved
Hide resolved
65aeb32
to
7ee15d1
Compare
lyrixx
approved these changes
Dec 3, 2020
7ee15d1
to
79352da
Compare
@dunglas any news on this PR ? |
theofidry
reviewed
Dec 27, 2020
79352da
to
84dd178
Compare
Thank you @Korbeil. |
Merged
derrabus
added a commit
that referenced
this pull request
May 31, 2021
…< 5.3 (jderusse) This PR was merged into the 5.3 branch. Discussion ---------- [Serializer][Validator] Add conflict with property-info < 5.3 | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Both components uses the `getCollectionValueTypes` method from property-info that has been introduced in 5.3 in #39020 https://github.com/symfony/symfony/blob/3581145643f92dba52383c7978cfa3c03ab6c9c1/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php#L415 https://github.com/symfony/symfony/blob/3581145643f92dba52383c7978cfa3c03ab6c9c1/src/Symfony/Component/Validator/Mapping/Loader/PropertyInfoLoader.php#L122 Commits ------- c47086e Add conflict with property-info < 5.3
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.
This PR is here to introduce multiple types for collection keys & values.
Today, we support types as following:
A|B|C
thanks togetTypes
interface (in extractors) but we do not support union types in collection keys or values, such asarray<A|B|C>
. This PR will allow this.In a next PR, we'll introduce an Extractor that will parse phpDoc in order to have union types in collection keys or values.
I tried to introduce as few depreciations as possible, we have only 2 of them here:
Type::getCollectionKeyType
Type::getCollectionValueType