Bug Report
| Q |
A |
| BC Break |
no |
| Version |
3.9.7 |
Summary
In doctrine you can sort the migrations. However enabling this sorting uses a different migration finder. This leads to the fact that if you enable sorting doctrine finds more migrations than if you don't.
Current behavior
If you list migrations in the sulu/sulu project by default it will use the GlobFinder to find migrations (classes) starting with "Version". This works fine. However when using the RecursiveRegexFilter (which gets enabled when switching on the sorting, in the doctrine bundle) then it returns all classes in the Migration directory. In this case this also includes an abstract base class or the migration called "AbstractTagNameToIdMigration" which is an abstract class and can not be instantiated.
How to reproduce
- Create an abstract migration class that can not be instantiated
- Name the class something like "AbstractMigrationVersion" or something not matching the naming scheme
- See it getting picked up
Expected behavior
Make the regex finder also filter down to migrations matching "Version*" like in the glob filter. Or use the same Migration Finder for both and do the sorting afterwards.
More Infos
sulu/sulu#8874
Bug Report
Summary
In doctrine you can sort the migrations. However enabling this sorting uses a different migration finder. This leads to the fact that if you enable sorting doctrine finds more migrations than if you don't.
Current behavior
If you list migrations in the sulu/sulu project by default it will use the
GlobFinderto find migrations (classes) starting with "Version". This works fine. However when using the RecursiveRegexFilter (which gets enabled when switching on the sorting, in the doctrine bundle) then it returns all classes in the Migration directory. In this case this also includes an abstract base class or the migration called "AbstractTagNameToIdMigration" which is an abstract class and can not be instantiated.How to reproduce
Expected behavior
Make the regex finder also filter down to migrations matching "Version*" like in the glob filter. Or use the same Migration Finder for both and do the sorting afterwards.
More Infos
sulu/sulu#8874