Repository navigation
Fix build with ORM 3.7 and DBAL 4.5 - #803
Merged
Merged
Conversation
- Id.patch: ORM 3.7 added a $position constructor argument to the Id attribute, so the annotation needs @NamedArgumentConstructor; without it doctrine/annotations passes the values array and metadata loading fails. - JoinColumns.patch, OrderBy.patch: regenerated against ORM 3.7, where the context no longer matched and the patches were skipped. - Connection4.stub: drop native int|string return types from delete/update/insert (stubs only contribute PHPDoc types, and PHPStan now reports native union types in stubs below PHP 8.0), matching the other methods in the stub. - Baseline the new TypedExpression (ORM 3.7) and SimpleArrayType (DBAL 4.5) deprecations; the extension still has to support both. Amp-Thread-ID: https://ampcode.com/threads/T-01a1779c-dd63-755f-9138-1668c7bb8eb3
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.
The ORM 3 / DBAL 4 matrix entries (Tests and PHPStan on PHP 8.3) have been failing on
2.1.xsince early October, after doctrine/orm 3.7 and doctrine/dbal 4.5.Tests (79 failures/errors → 0):
Id.patch: ORM 3.7 added a$positionconstructor argument toMapping\Id. Without@NamedArgumentConstructor, doctrine/annotations passes the values array to it, so loading any entity with@ORM\Idfailed.JoinColumns.patch,OrderBy.patch: regenerated against ORM 3.7, whose sources no longer matched the patch context (composer-patches skipped them).PHPStan:
stubs/DBAL/Connection4.stub: dropped the nativeint|stringreturn types ofdelete()/update()/insert(). PHPStan now reports native union types in stubs below PHP 8.0; stubs only contribute PHPDoc types, and the@return int|numeric-stringstays, as with the other methods in the stub.TypedExpression(deprecated in ORM 3.7) andSimpleArrayType(deprecated in DBAL 4.5) usages, like the existingArrayType/ObjectTypeentries. Built-in ORM functions still implementTypedExpressionalongside the newExpressionWithReturnType, so inference is unchanged.Verified locally with ORM 3.7.5 / DBAL 4.5.0 (patched, as in CI) and with the default ORM 2.20 / DBAL 3.10:
phpunitandmake phpstanpass on both.