Skip to content
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

Execute command in context of the app #23

Merged
merged 1 commit into from Mar 16, 2021

Conversation

michaeldaly
Copy link
Contributor

This PR moves command registration outside the console context so that we can execute Artisan commands programmatically within the context of the application.

This change will resolve an issue I was having with the MultiTenancy package here: spatie/laravel-multitenancy#207

I have added supporting tests to prove the functionality works as expected but I am happy to continue working on this if anyone has any feedback or change requests.

Thanks

…istering in the context of a console command.
@freekmurze
Copy link
Member

Thanks!

@systemsolutionweb
Copy link
Contributor

systemsolutionweb commented Mar 31, 2023

Hi @michaeldaly #89
Also your tests works with and without your change, that does not have the expected behavior
It is because all the context of testing are app()->runningInConsole() === true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants