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

Fix compatibility for Symfony 6 projects without doctrine/persistence 3 support #1841

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

alexander-schranz
Copy link
Contributor

@alexander-schranz alexander-schranz commented Nov 21, 2024

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:

Bildschirmfoto 2024-11-21 um 10 41 52

"Declaration of Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor::getProperties(string $class, array $context = []) must be compatible with Symfony\Component\PropertyInfo\PropertyListExtractorInterface::getProperties(string $class, array $context = []): ?array

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

@ostrolucky ostrolucky added the Bug label Nov 21, 2024
@ostrolucky ostrolucky added this to the 2.13.2 milestone Nov 21, 2024
@ostrolucky ostrolucky merged commit 7564fa7 into doctrine:2.13.x Nov 22, 2024
16 checks passed
@alexander-schranz alexander-schranz deleted the patch-1 branch November 22, 2024 13:50
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants