Drop doctrine/orm 2 support - #86
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
1 similar comment
|
This was referenced Aug 21, 2026
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.



Why
All applications consuming this bundle now run doctrine/orm 3, so the ORM 2 compatibility layer is dead weight.
Changes
composer.json:doctrine/ormconstraint narrowed from^2.20|^3.0to^3.0.EntityValidator:FieldMappingobjects now — theis_array()detection is gone,get_object_vars()keeps normalizing to the array shape providers expect;isToOneOwningSide()/isOwningSide()) instead of the ORM 2 array branch + bitmask checks, removing theextractAssociationMappingValues()tuple helper and its@codeCoverageIgnore;DomainException('Unknown type')branch is removed: ORM 3'sAssociationMapping::type()isfinaland can only return one of the four known constants, so the branch was unreachable dead code.FieldConstraintsSetProviderInterface: contract docblock updated (no more "ORM 2 array shape" wording).FieldMapping,EmbeddedClassMapping, association mapping classes); the ORM 3-specific duplicate tests, theskipUnlessOrm3()guard and the unknown-type test (dead branch) are removed.phpstan.neon.dist: all dual-major ignore rules andreportUnmatchedIgnoredErrors: falseare removed; one narrowargument.typeignore remains for the minimal test fixture arrays fed tofromMappingArray().Net: −155 lines.
Validation
Ran in a PHP 8.4 container with highest deps:
composer validate --strict, PHPUnit (287 tests OK, 4 expected skips), PHPStan (0 errors), PHPCS (clean), Rector dry-run (clean).🤖 Generated with Claude Code