-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Fix compatibility for Symfony 6 projects without doctrine/persistence 3 support #486
base: 3.7.x
Are you sure you want to change the base?
Conversation
The dependency was bumped in #457 to So although it does not show in the build because we are not testing all possibilities, I think with this PR, you will be breaking support for data-fixtures 2. Also, 6.3 is no longer supported. And finally, this looks like an error that should be fixed at the Symfony level. |
The issue is only when using doctrine/persistence 2. You will not get data-fixtures 2 on doctrine/persistence 2 so as we still allow 5.4 we should also be able to allow 6.3. I did a quicktest on sulu/sulu#7699 and didn't run into any issues there.
I know but required if you can not yet update to doctrine/persistence 3.0 yet because of bc reasons. |
Why? Sorry but I don't see the logical connection. |
Did just see now that the fix also part of 5.4 but not 6.3 thought it was 6.4 and above as it was for data-fixtures 2. But I think it is still not a problem as on doctrine persistence 2 on Symfony 6.3 it uses data-fixtures 1 is there symfony/symfony#58865 is not required and as you see in sulu/sulu#7699 it works like expected. Without allowing 6.3 persistence doctrine-bridge will get downgraded and fail with: https://github.com/sulu/sulu/actions/runs/12050408254/job/34248387183 |
On the failing build you linked, I can see that If the cause of the issue is that And if yes it should be fixed a bit like I did in symfony/symfony#58865, with a dynamic trait. |
I think a PR equivalent to symfony/symfony#41291, but for Symfony 7 should have been done but wasn't, and now 5.4 is in security fixes mode only: https://symfony.com/releases So… I think it will not be accepted, since it has nothing to do with security. This is a Symfony bug though, right? So… people using 5.4 and encountering this bug should upgrade. |
Since 5.4 is in security mode, maybe we could simply drop support for 5.4 in this bundle? That way, it will not get downgraded. |
… 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 issue libraries run into which require / support still
doctrine/persistence: "^2"
on Symfony 6, see also doctrine/DoctrineBundle#1841 which is the same problem. Symfony 6.4 does not support persistence 3 so 6.3 need still be added to support this correctly to avoid accidently downgrade of the doctrine/bridge which runs into following error.Before:
After:
Runs correctly.