Add Parsers::parse*Name() methods#7403
Merged
Merged
Conversation
Member
Parsers is marked as |
greg0ire
approved these changes
Jun 13, 2026
Member
Author
I thought we decided to make an exception for the ORM and have it use an |
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.
Most consumers of the
Parsershelper don't need a parser instance (Parsers::get*NameParser()); they need to parse a name. The only exception isAbstractAsset::_setName(), which is shared between subclasses that use different parsers for their respective name classes, and which has already been removed in5.0.x.To slightly reduce the boilerplate, we can introduce
Parsers::parse*Name()methods. They will be more extensively used in DBAL5.0.xand also, potentially, the ORM as an upgrade path towards names as objects (e.g. doctrine/orm#12357).