doctrine / DoctrineFixturesBundle

Symfony integration for the doctrine/data-fixtures library
MIT License
2.46k stars 202 forks source link

Allow to inject any loader into LoadDataFixturesDoctrineCommand #380

Open oleg-andreyev opened 1 year ago

oleg-andreyev commented 1 year ago

There could be cases when developers needs to inject custom fixture loader into LoadDataFixturesDoctrineCommand, but (un)fortunately SymfonyFixturesLoader is final and cannot be extended to mimic required interface, but at the same time this command is using only \Doctrine\Common\DataFixtures\Loader::getFixtures thus it should be allowed to inject any loader as long as it has getFixtures method.

stof commented 1 year ago

Indeed, I see now reason to typehint the implementation here.

do you want to send a PR to change that ?