doctrine / data-fixtures

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

Fix DBAL 3 compatibility #366

Closed williarin closed 2 years ago

williarin commented 2 years ago

Fixes #365

doctrine:fixtures:load command no longer failing with DBAL 3.

greg0ire commented 2 years ago

To make this complete, I think we should allow dbal 3 the version constraint here: https://github.com/doctrine/data-fixtures/blob/d5ebdb48cdfb2ac2fad612f339f568c098b87caf/composer.json#L27

Currently, we are only testing with doctrine/dbal v2 because of it.

greg0ire commented 2 years ago

Maybe I approved too fast… what does this PR do? I think it means that when upgrading to DBAL 3, tables that were previously not purged will suddenly be purged, correct?

EDIT: and then I click "Close and comment" when I mean to click comment :sweat_smile:

stof commented 2 years ago

Maybe I approved too fast… what does this PR do? I think it means that when upgrading to DBAL 3, tables that were previously not purged will suddenly be purged, correct?

Well, doctrine/data-fixtures does not configure the filtering. It uses the filtering configured in DBAL. If you use the filtering feature of your project, you will already need to migrate to the non-deprecated feature before migrating to DBAL 3.

greg0ire commented 2 years ago

Oh right, I didn't notice that the new way was already handled in the lines below (because I didn't know what it looked like). It should be fine then I think.

greg0ire commented 2 years ago

Thanks @williarin !