Repository navigation
Read indexBy key in valid Doctrine syntax, without quotes - #543
Merged
Merged
Conversation
samsonasik
reviewed
Oct 28, 2026
ondrejmirtes
marked this pull request as draft
October 28, 2026 19:17
ondrejmirtes
force-pushed
the
doctrine-unquoted-keys
branch
3 times, most recently
from
October 28, 2026 19:36
435f839 to
1ae480c
Compare
ondrejmirtes
marked this pull request as ready for review
October 28, 2026 19:43
Contributor
Author
|
So - back to ready for review again. The original fixtures code is not valid Doctrine grammar so the edits to remove |
ondrejmirtes
force-pushed
the
doctrine-unquoted-keys
branch
from
October 28, 2026 20:08
1ae480c to
80f6ff5
Compare
samsonasik
approved these changes
Oct 28, 2026
Member
|
Looks good now, thank you @ondrejmirtes |
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.
CollectionTypeFactoryread theindexBykey only when the key had quotes:"indexBy"="id". Doctrine does not accept quoted keys. For the valid syntaxindexBy="id", the rule ignored the key.Now the rule uses
getValue('indexBy'), which reads both forms. The fixtures use the valid syntax.This change is necessary for rectorphp/rector-src, which will parse Doctrine annotations with phpdoc-parser. phpdoc-parser does not accept quoted keys. The change works with the current rector-src and with the new one.