Closed lstrojny closed 4 years ago
Please add some docs
Please add some docs
Done
Please have a look at the test suite, it fails.
Still working on solving the deprecation warnings
Alright, here we are:
I guess we are ready to go
Thanks for the collaboration, @greg0ire
@greg0ire meditating over it a bit, I've moved more responsibilities into the factory and added a warning if a user passes an unknown purger so that we are not falling back to the default factory silently.
Tested this in a project and it works. Found and fixed another bug (truncate mode was not correctly passed).
@SenseException done
Thanks @lstrojny !
This PR allows users to specify a custom purger (as previously requested in #116).
As a user, I can register my custom purger factory, that implements
createForEntityManager(?string $emName, EntityManagerInterface $em, array $excluded = [], bool $purgeWithTruncate = false) : PurgerInterface
with the tagdoctrine.fixtures.purger_factory
and somealias
and then run the command with--purger=$alias
. If theORMPurger
is used--purge-exclusions
, a list of tables that ought to not be purged, are supported.