Open clarkwinkelmann opened 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum. In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!
Bug Report
Current Behavior This issue mainly affects developers but could also apply to released extensions in case the developers mess something up
Steps to Reproduce
vendor
foldermigrate:reset
command to rollback the migrationsExpected Behavior A separate error message should be displayed for missing files.
Additionally it would be nice for the error message to contain the name of the file causing the issue, for both types of errors. Right now it's difficult to find which file is causing the issue. I didn't manage to see it with
-vvv
but we can see the start of the migration name in the backtrace in the log file, but it will be truncated if it's long so it might not help.Environment
Possible Solution
I suggest adding a
throw
inMigrator::resolve()
when the file doesn't exist instead of ignoring it and inevitably resulting in the array error.https://github.com/flarum/core/blob/d492579638fb52dafbfe65f1f36a95eb6047f7f3/src/Database/Migrator.php#L236-L243
Additional Context Related https://discuss.flarum.org/d/24453-help-with-migrations-part-2/4