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

Merged
merged 1 commit into from
Jan 21, 2025

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.

@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

@derrabus
Copy link
Member

Are there any more blockers for this PR?

@greg0ire
Copy link
Member Author

The release of doctrine/orm 3.4.0 is the main blocker.

@greg0ire
Copy link
Member Author

As discussed internally, v4 compat was accidentally released as doctrine/orm 3.3.1, so there no longer is a blocker, it would seem.

@greg0ire greg0ire marked this pull request as ready for review January 21, 2025 21:01
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 89d865c to f78c67c Compare January 21, 2025 21:02
@greg0ire
Copy link
Member Author

Here! There is at least one job using it.

Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, all jobs runs doctrine/persistence: 4.0.0 except the one requiring "lowest" dependencies.

LGTM.

@greg0ire greg0ire merged commit f2f920e into doctrine:2.10.x Jan 21, 2025
18 checks passed
@greg0ire greg0ire added this to the 2.10.0 milestone Jan 21, 2025
@greg0ire greg0ire added the dependencies Pull requests that update a dependency file label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants