-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Allow doctrine/persistence 2.x #1181
Conversation
fruitwasp
commented
Jun 25, 2020
•
edited
Loading
edited
- Allows doctrine/persistence 2.x
- Updates namespace of Doctrine persistence classes in tests.
forward compatibility layer is present in 1.3, but no backwards compatibility layer is present in 2.0 AFAIK. We cannot suddenly start wiring incompatible classes, it will break projects that expect us wiring |
Maybe create service with the old FQCN as service id, but the new FQCN as class, and deprecate those in favor of services with the new FQCN as service id (and class)? |
I would rather drop support for persistence 1.x |
Agree on dropping support for 1.x. Apart from this, it requires support for 2.x in the symfony/doctrine-bridge too, as this bundle has a dependency on it. Will target master. symfony/symfony@master...fruitwasp:doctrine-bridge your thoughts? |
That could work. Plan is that next minor doctrine-bundle release will by synced with next minor symfony release. |
IMO if you don't add the |
the actual release ob Symfony allow to install doctrine/persistence 2.x #1190 - this breaks some update processes |
Note that the title of this PR is not describing what it does. currently, it does not only add support for 2.x, but it also removes support for 1.x |
Keeping support for v1 would be great for the community. |
Maybe I'm missing something, but I don't see how can we solve issue I mentioned for persistence 2.x and at the same time keep support for v1 |
@ostrolucky what's wrong with #1181 (comment) ? |
Problem with that is people who inject |
Are you thinking of projects that require |
doctrine/common 3.0 requires doctrine/persistence 2.0, so end result is same - unsupported doctrine/persistence 1.x |
Ah right indeed. @nicolas-grekas persistence 1 and 2 have very similar constraints, so I think it wouldn't actually be that big of a deal. We might want to require common 3 or at least conflict with anything below that to be on the safe side. |
If your code relies on these aliases, it is indeed not compatible with |
That's the thing, you could be relying on |
@greg0ire no. Having that namespace available is part of the contract of |
it's 1.3 and I think you are referring to the namespace w/o
But I just noticed that |
So what needs to be done? |
Since the early versions of the BC layer are buggy, I'd use |
Then @fruitwasp sorry about that but can you please change back constraint to allow persistence ^1.3.3? |
Travis coverage test failing seems to be unrelated? |
I'm trying to address it in #1195 , it has to do with Symfony 5.2 |
@fruitwasp please retarget to 2.0.x as I asked in #1181 (comment), it should fix the build. |
Nevermind, I did it for you. |
Although this looks like it should target 2.1.x, I choose to target 2.0.x because it should fix #1197 , in which upgrade the ORM and Common results in this bundle being dowgraded to 2.0.2, which does not have an explicit dependency on Common or Persistence => 💥 |
@fruitwasp this should no longer be a draft, right? |
Woops sorry, @ostrolucky pointed out to me that the correct branch for this is 2.1.x |
Services are private by default since symfony/dependency-injection 4.0, which means the deprecated call can safely be dropped.
Thanks @fruitwasp ! |