Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure compatibility with persistence 4 #2696

Draft
wants to merge 1 commit into
base: 2.10.x
Choose a base branch
from

Conversation

greg0ire
Copy link
Member

This is mostly about adding return type declarations. In one instance though, it is more than that: ClassMetadataFactory redeclares $cacheSalt, a protected property inherited from the persistence package. Since it is not possible to widen or narrow the type, and since the redeclaration seems to be about setting a default value, let us set it in the constructor.

@GromNaN
Copy link
Member

GromNaN commented Oct 31, 2024

You can update the doctrine/persistence constraint in composer.json to allow version 4.

This is mostly about adding return type declarations. In one instance
though, it is more than that: ClassMetadataFactory redeclares
$cacheSalt, a protected property inherited from the persistence package.
Since it is not possible to widen or narrow the type, and since the
redeclaration seems to be about setting a default value, let us set it
in the constructor.
@greg0ire greg0ire force-pushed the persistence-4-compat branch from ce6aa6e to 89d865c Compare November 2, 2024 10:21
@greg0ire greg0ire marked this pull request as ready for review November 2, 2024 10:31
@greg0ire greg0ire marked this pull request as draft November 2, 2024 10:32
@greg0ire
Copy link
Member Author

greg0ire commented Nov 2, 2024

@GromNaN I just did, then saw that doctrine/orm is a require-dev dependency, so we will have to wait for it to support v4 before being able to truly test v4 here. That's in progress at doctrine/orm#11533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants