Fix compatibility for Symfony 6 projects without doctrine/persistence 3 support#1841
Merged
ostrolucky merged 1 commit intodoctrine:2.13.xfrom Nov 22, 2024
Merged
Conversation
ostrolucky
approved these changes
Nov 21, 2024
This was referenced Dec 11, 2024
fabpot
added a commit
to symfony/symfony
that referenced
this pull request
Jan 6, 2025
… 2.5 in Doctrine Bridge 6.4 to avoid Projects stuck on 6.3 (alexander-schranz) This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [DoctrineBridge] Fix compatibility to Doctrine persistence 2.5 in Doctrine Bridge 6.4 to avoid Projects stuck on 6.3 | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT Doctrine Bridge dropped support of persistence 2 from 6.3 to 6.4 but I could not yet find out why. (0d4e2b8). It making lot of things harder and get projects stuck on 6.3 which can not yet update doctrine/persistence because of some bc breaks (mostly `Bundle:Entity` syntax). It makes also eco system a little bit harder (doctrine/DoctrineBundle#1841, doctrine/DoctrineFixturesBundle#486, https://github.com/sulu/sulu/actions/runs/12050408254/job/34248387939) as with some changes in symfony and doctrine bundles things get downgraded to symfony 5.4 instead keep in 6.3. If there is any easy way to support persistence 2.5 still on 6.4 bridge I think things would get easier. Want with this PR check what fails on the CI if still allow persistence 2.5. --- Update: Looks like with a few checkst we could get lowest run on persistence 2.5 which would so make easier projects upgrade to Symfony 6.4 without they have to tackle the persistence update in the same case. Commits ------- df3cef8 [DoctrineBridge] Fix compatibility to Doctrine persistence 2.5 in Doctrine Bridge 6.4 to avoid Projects stuck on 6.3
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.
Sadly this PR #1832 make projects which do not have compatibility to Symfony 6.4 Doctrine Bridge (like Sulu 2.5 version) yet fail because of using not yet supporting doctrine/persistence 3. Symfony 6.4 doctrine bridge requires atleast doctrine/persistence 3 but some projects may are on Symfony 6 still on version 2.
Composer instead of downgrading to / keep 2.13.0 it downgrades doctrine/bridge to 5.4.46 which ends up in another failure:
Sure projects using flex would not run into that. But to avoid this error on libs without flex and with a wider range of support symfony version we should also add the version of 6.3.12 released with the 6.4.3 to still support Symfony 6 + Doctrine Persistence 2.
@MatTheCat