swarrot / SwarrotBundle

A symfony bundle for swarrot integration
MIT License
89 stars 59 forks source link

Upgrade Doctrine dependencies #208

Closed TakTaki closed 3 years ago

TakTaki commented 3 years ago

Hello,

I've recently updated doctrine/common to 3.1.0 and composer didn't rise the fact that SwarrotBundle was using ^2.9. As I'm using the configuration

swarrot:
    consumers:
        my_consumer:
            middleware_stack: 
                 - configurator: swarrot.processor.doctrine_object_manager

this rise me the error of using the wrong ManagerRegistry (as path changed in doctrine).

Is there a way to fix this ? Am I doing something wrong ?

Thanks

stof commented 3 years ago

Support for doctrine/persistence 2.0 was added in swarrot-bundle 2.1 already.

TakTaki commented 3 years ago

Alright so maybe this is something else. Could we simply change the ManagerRegistry used in ObjectManagerProcessorConfigurator from Doctrine\Common\Persistence\ManagerRegistry to Doctrine\Persistence\ManagerRegistry ?

stof commented 3 years ago

That's precisely what has been done in swarrot-bundle 2.1.0: https://github.com/swarrot/SwarrotBundle/commit/8f8d9d13bd1b0687cdbc3161f39fd0222abd707f

which version of the bundle are you using ? (tip: run composer show swarrot/swarrot-bundle to get the info)

TakTaki commented 3 years ago

Silly me, I saw ^2.1 on my composer.json but my current version is 1.8.1 (thanks for the tip). Sorry for wasting your time !