-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Skip post_migrate when running tests #1193
Conversation
@@ -35,7 +34,7 @@ class IdeHelperServiceProvider extends ServiceProvider implements DeferrableProv | |||
*/ | |||
public function boot() | |||
{ | |||
if ($this->app['config']->get('ide-helper.post_migrate', [])) { | |||
if (!$this->app->runningUnitTests() && $this->app['config']->get('ide-helper.post_migrate', [])) { |
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.
Will this work with Lumen? 😬
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.
It should: https://github.com/laravel/lumen-framework/blob/8.x/src/Application.php#L896
Edit: Lumen integration test passes so it does
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.
Thank you, LGTM!
Could you please resolve the merge conflicts? Don't see any blockerS!
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.
Thank you!
Summary
This PR skips post migrate hooks when application is running unit tests. This should not cause any problems but it's unnecessary to generate the helpers hundred times. Also test should not have a sideeffect.
Type of change
Checklist
composer fix-style