[TypeInfo] Fix handling ConstFetchNode#60820
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
Hmm, this is not the right fix :( |
38d6ac6 to
526b002
Compare
526b002 to
6e237a9
Compare
|
Changed implementation from returning |
|
Constants are not even restricted to scalars in recent PHP versions. The right fix would involve looking at the fetched constants. |
ConstFetchNode
6e237a9 to
48f648b
Compare
|
I've updated implementation |
4173b66 to
606a4ab
Compare
606a4ab to
3d5c90d
Compare
|
I'm not sure how to fix the failing serializer test. For me it looks like that it's an invalid test, because it defines |
3d5c90d to
2ac811b
Compare
|
I'm not sure how to fix property info though, as test passes for me locally |
d520350 to
ec86f71
Compare
|
Thanks, updated |
src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php
Outdated
Show resolved
Hide resolved
ec86f71 to
6f49fc6
Compare
|
For the lowest-deps job, I suggest instead bumping the min version of type-info in property-info to use |
|
Agreed, this will make things much more easier. |
6f49fc6 to
78c60fe
Compare
|
Thank you, both |
7729498 to
6440799
Compare
src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php
Outdated
Show resolved
Hide resolved
d0fdf06 to
03cc607
Compare
|
Thank you @norkunas. |
…t type instead of enum (norkunas) This PR was squashed before being merged into the 7.3 branch. Discussion ---------- [TypeInfo] Fix `Type::fromValue` incorrectly setting object type instead of enum | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | Fix #... | License | MIT Tried to apply #60820 (comment) comment, but found some failing cases Commits ------- a0cdd3f [TypeInfo] Fix `Type::fromValue` incorrectly setting object type instead of enum
…s` for `ConstFetchNode` (norkunas) This PR was merged into the 7.3 branch. Discussion ---------- [TypeInfo] Reuse `CollectionType::mergeCollectionValueTypes` for `ConstFetchNode` | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | #60820 (comment) | License | MIT Commits ------- 4187201 [TypeInfo] Reuse `CollectionType::mergeCollectionValueTypes` for `ConstFetchNode`
…s` for `ConstFetchNode` (norkunas) This PR was merged into the 7.3 branch. Discussion ---------- [TypeInfo] Reuse `CollectionType::mergeCollectionValueTypes` for `ConstFetchNode` | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | symfony/symfony#60820 (comment) | License | MIT Commits ------- 41872011b1b [TypeInfo] Reuse `CollectionType::mergeCollectionValueTypes` for `ConstFetchNode`
I cannot upgrade to 7.3 because I get: