Laravel-Migrations-Organiser: Adding Provider into the config/app.php causes test to fail
When we run the tests without the line in the config/app.php file they all pass. As soon as I add in Jaybizzle\MigrationsOrganiser\MigrationsOrganiserServiceProvider::class, phpunit fails not being able to find our migrations.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (10 by maintainers)
Commits related to this issue
- Merge pull request #14 from korygorsky/master Changes to fix issue #13 where migrate:rollback throws an error — committed to JayBizzle/Laravel-Migrations-Organiser by JayBizzle 8 years ago
Hey @korygorsky
Thanks for that example repo, these kind of things really help when debugging this kind of stuff. I ran through the steps you mentioned and could indeed replicate the issue.
Great work on the PR, i have now merged that and released v4.0.2
Thanks again!
Hey @JayBizzle, I’m on a team with @ericadamski.
Thanks for taking the time to go back and forth with us.
It appears to be an issue on rollback. We didn’t realize it was on rollback because it was happening in our tests where we were using the
DatabaseMigrationstrait. This initiates a migrate and a rollback on every test and the error was happening in the rollback.I’ve been able to create the issue using a fresh install of Laravel. I’ve created a repo for the issue.
Steps to reproduce
composer installin the terminaltouch database/database.sqlitein the terminalphp artisan migrate:organisein the terminalphp artisan migratein the terminalphp artisan migrate:rollbackin the terminalMy Thoughts
Laravel’s
rollbackmethod in it’sMigrator.phpcalls yourgetMigrationFilesmethod, but its expecting a different format then it receives.Returned Format from
getMigrationFilesin Laravel-Migrations-OrganiserReturned Format from
getMigrationFilesin Built-in Laravel Migrator.phpI’m taking a look at this to see if I can resolve this with a PR. Let me know if you’ve run across this before.