[depre] Deprecate YamlToAttributeDoctrineMappingRector - #492
Merged
Conversation
The rule covers only a fraction of YAML mapping features and silently produces incomplete or wrong attributes on anything beyond the basics. Handle YAML to attribute mapping with custom rules tailored to the project mapping instead. Rule now implements DeprecatedInterface and throws on use. All services it exclusively used are removed: 20 attribute transformers, entity mapping resolver, value object, contracts and helpers.
This was referenced Jul 31, 2026
TomasVotruba
added a commit
that referenced
this pull request
Aug 3, 2026
It was only needed by YamlToAttributeDoctrineMappingRector, deprecated in #492. There is no Symfony\Component\Yaml usage left in the package.
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.
YamlToAttributeDoctrineMappingRectorcovers only a fraction of YAML mapping features. Anything beyond the basic cases silently produces incomplete or wrong attributes - e.g. missingnullable, dropped cascade/fetch options, lost lifecycle callbacks and custom types.YAML mapping is project specific by nature, so a custom rule tailored to the actual mapping is a safer path than a generic half-covering rule.
What the rule does now
Removed services
The rule was the only consumer of these, so they go with it:
rules/CodeQuality/AttributeTransformer/EntityMappingResolver,ValueObject/EntityMappingContract/ClassAttributeTransformerInterface,Contract/PropertyAttributeTransformerInterfaceHelper/NodeValueNormalizer,NodeFactory/AttributeFactory,Utils/CaseStringHelperBC
DoctrineSetList::YAML_TO_ANNOTATIONSand its config file are kept, the config is now empty. Existing configs referencing the set keep loading.