-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add message if migrations/seeds folders do not exist and debug is dis… #584
Conversation
if (!is_dir($migrationsPath)) { | ||
if (!Configure::read('debug')) { | ||
throw new \RuntimeException(sprintf( | ||
'Migrations path `%s` does not exist and cannot be created because `debug` is disabled.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats not the reason imo
Better to output that path needs to exist
No one should enable debug on prod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it will never happen in prod because when code reaches prod the Migrations folder will exist. The problem happens when somebody disables debug in local environment and tries to create a migration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dereuromark this check works great if you are only using migrations but the seeds directory must exist now because of the check below to make sure the seeds directory exists. L96-L102
These tests are now failing after the merge. |
I think this PR is now causing issues with plugins that have migrations but don't have |
This is also happening with https://github.com/CakeDC/users/ since it too does not have a |
Can you create a new issue to track this |
Fixes #565
Adds a message if
debug
is disabled and folders do not exist.Adds more tests to ConfigurationTrait.