doctrine-migrations
doctrine-migrations copied to clipboard
setService on DependencyFactory
For a rather unusual use case, I wanted to create my own comparator. So basically in index / bootstrap something like:
$service = $container->getByType(\Doctrine\Migrations\DependencyFactory::class);
$service->setService(\Doctrine\Migrations\Version\Comparator::class, new TimestampVersionComparator());
(the use case was: multiple namespaces of migrations; wanted the migration to run in the order derived from name of class, not from fully-qualified name including namespace...) e.g.
App\Migrations\Version20250414163315.php
App\CoreMigrations\Version20250414163728.php
instead of default behaviour of this package:
App\CoreMigrations\Version20250414163728.php
App\Migrations\Version20250414163315.php
Is there a way to set this via .neon config?
At this time it's not possible in NEON, but I will implement it.