doctrine / data-fixtures

Doctrine2 ORM Data Fixtures Extensions
http://www.doctrine-project.org
MIT License
2.78k stars 224 forks source link

Migrate to ORMSetup #393

Closed derrabus closed 2 years ago

derrabus commented 2 years ago

This PR switches the test setup to the new ORMSetup class introduced with ORM 2.12.

stof commented 2 years ago

if you only run tests on doctrine/orm 2.12+, you should add a conflict rule to make sure that this package won't be installed alongside an older version of the orm anymore (as done for older versions of the ODM), to avoid cases where the compat with 2.11 is broken but undetected by the CI.

derrabus commented 2 years ago

Fair enough.

stof commented 2 years ago

btw, that's the same kind of conflict (but more restrictive) than the one you add in #392 :smile:

derrabus commented 2 years ago

I know, but in #392 I've changed production code while this PR changes the test suite only. But your argument about the CI makes total sense.

stof commented 2 years ago

The alternative if you don't want to bump the min supported version of the ORM is to make the testsuite switch between both classes based on class_exists(ORMSetup::class)