Closed sunchuo closed 2 months ago
I'm not sure if this is an issue worth fixing. The generated migration is not meant to be executed immediately, but to be reviewed and adjusted by a human being.
That being said, you proposed fix sounds reasonable. Feel free to submit a PR.
@sunchuo if I may ask, why are you not using doctrine:schema:update
?
Duplicate of #1318
Bug Report
Summary
output:
Current behavior
Generated migration files don't seem to be loaded.
FilesystemMigrationsRepository::loadMigrationsFromDirectories
is only run once or a new Version that has not been registered.add code
$this->getDependencyFactory()->getMigrationRepository()->registerMigration($fqcn);
after DiffCommand.php#L152then throw a MigrationClassNotFound Exception at FilesystemMigrationsRepository.php#L117
add
"DoctrineMigrations\\": "migrations/"
to composer.jsonproblem solved.
Expected behavior
All commands should think about being called in the same process. The DoctrineMigrations directory should be registered for autoloading.