theofidry / AliceDataFixtures

Nelmio Alice extension to persist the loaded fixtures.
MIT License
311 stars 71 forks source link

Possible version conflict due to transitive dependency #169

Closed dbrumann closed 3 years ago

dbrumann commented 3 years ago

This is a follow up to #148.

I just ran into this problem with AliceDataFixtures 1.2.1 where Doctrine ORM was upgraded and with it doctrine/persistence 2.1. I don't think it makes sense to update 1.2, but as far as I can tell the underlying issue still applies to the most recent version of AliceDataFixtures as well.

AliceDataFixtures uses classes from doctrine/persistence, namely ObjectManager and ManagerRegistry but this package is not declared as a root dependency. This means that we solely rely on other doctrine-packages to make this restriction for us, which in my case did not work.

I propose to add doctrine/persistence to composer.json. As far as I can tell doctrine/persistence:^1.3.3||^2.0 seems to be the valid range for now.Alternatively I suggest to add doctrine/persistence:<1.3.3 to the conflicts section.

I can make a PR for this, but I wanted to check first which solution is preferred and if the change is considered valuable.

theofidry commented 3 years ago

Sorry for coming back late on this one. Since the library has no hard dependency on Doctrine ORM (as it supports different ones), I believe adding this to the conflict section would be more approriate