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

Payum/Core BC After upgrade from 1.6.0 to 1.6.1 (Symfony 2.8) #883

Open
BlackWiCKED opened this issue Feb 26, 2021 · 4 comments
Open

Payum/Core BC After upgrade from 1.6.0 to 1.6.1 (Symfony 2.8) #883

BlackWiCKED opened this issue Feb 26, 2021 · 4 comments
Labels
BC Break integration External integrations or bridges

Comments

@BlackWiCKED
Copy link

I have an old project running in Symfony 2.8 LTS, Payum/Core 1.6.1 was released recently, and composer automatically updated to this version. After the upgrade the library stopped working and I had to revert and lock to version 1.6.0 the following libraries:

"payum/core": "1.6.0",
"payum/paypal-express-checkout-nvp": "1.6.0"

The log shows the following error:

[2021-02-26 02:55:27] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: 
Type error: Argument 1 passed to Payum\Core\Bridge\Doctrine\Storage\DoctrineStorage::__construct()
must be an instance of Doctrine\Persistence\ObjectManager,
instance of DoctrineORMEntityManager_000000005e2920f7000000003ee6ce4c200e9b83688f3266e6cc1377c4ce6159 given

I presume it's because of the outdated Symfony framework and Doctrine, and I completely understand that you won't support ancient versions like this anymore, just reporting the breaking change so you can prevent automatic upgrades in the future.

@pierredup
Copy link
Member

@BlackWiCKED Which version of doctrine/orm do you have installed?

The Doctrine\Common\Persistence namespace has been deprecated in favour of Doctrine\Persistence.
#861 updated the Doctrine bridge to use the new namespace.

Doctrine ORM uses the new namespace since version 2.7

@BlackWiCKED
Copy link
Author

@pierredup On this project "doctrine/orm": "^2.5" is sitting on v2.5.14. That's the highest we can go with Symfony 2.8. Probably related: doctrine/orm#7617
I would not spend too much time on debugging it, and definitely do not expect Payum to back-port or support such an old framework. From my side I consider it done by locking to PayumCore 1.6.0, to be honest I was surprised that it even worked after such a long time... Anyways, thanks for looking into it. If you need more information let me know. I can share my composer package versions - I tried to stretch them as much it was possible, but obviously there are lot that are not supported anymore.

@pierredup
Copy link
Member

Thanks for the response @BlackWiCKED. Version 1.6.1 mainly updated support for newer dependencies. Since your project is still on an older version of the dependencies, there won't be many benefits in updating and it should be fine to lock to 1.6.0. I think this issue can then be closed.

@BlackWiCKED
Copy link
Author

I agree. Eventually if you can review the dependencies in your composer file that would help others with similar problem - probably there are not many, but still - having clean dependencies is always a positive thing.

I forgot to mention that I'm using "payum/payum-bundle": "1.0.3" in my composer file - my payum/core is coming from that package. I have not tried to migrate to newer bundle version (1.2 or 2.1) yet - not sure if that is even possible, but as far as I see, all those new versions of the payum bundle require "symfony/framework-bundle": "~2.8|~3.0" - which is still matching my setup.

So this might be something to look into on your side before closing the ticket, because version 1.6.1 is clearly not compatible with Symfony 2.8 anymore - and theoretically it is still an allowed configuration - composer will automatically upgrade 1.6.0 to 1.6.1 as it did in my case and that results in fatal error.

Anyways, my problem was solved with locking, and there is absolutely no urgency to fix the dependencies right now, feel free to close the ticket anytime. Thank you for your time, and keep up the good work!

@pierredup pierredup added BC Break integration External integrations or bridges labels Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC Break integration External integrations or bridges
Projects
None yet
Development

No branches or pull requests

2 participants