composer require maximaster/doctrine-migration-comparators
Compares numeric parts of versons as numbers.
Comparator that prioritize versions which matches first on list of regexps.
You can use other comparator as fallback in case migrations have the same
regexp matched. For example: the library's NumericComparator
or
softspring/doctrine-migrations-version-comparator
config/packages/doctrine_migrations.yaml
doctrine_migrations:
services:
Doctrine\Migrations\Version\Comparator: Maximaster\DoctrineMigrationComparators\Comparator\MatchComparator
services.yaml
Maximaster\DoctrineMigrationComparators\Comparator\MatchComparator:
arguments:
-
- ~MyProject\Process~
- ~MyProject\Tests~
- '@Maximaster\DoctrineMigrationComparators\Comparator\NumericComparator'
MyProject\Process
migrations would be executed first, then MyProject\Tests
.