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

[4.x] Don't use constructor injection in console commands, and inject into handle() instead #1327

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

mad-briller
Copy link
Contributor

When using a custom cache driver that depends on runtime context, this causes php artisan package:discover to fail as that context is not available, when it would be when handle() injection is performed.

Other telescope commands are using handle() injection aswell so this makes it more consistent throughout.

@mad-briller mad-briller changed the title Don't use constructor injection in console commands, and inject into handle() instead. [4.x] Don't use constructor injection in console commands, and inject into handle() instead. Mar 17, 2023
@driesvints driesvints changed the title [4.x] Don't use constructor injection in console commands, and inject into handle() instead. [4.x] Don't use constructor injection in console commands, and inject into handle() instead Mar 17, 2023
@taylorotwell taylorotwell merged commit 88ca4cb into laravel:4.x Mar 17, 2023
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.

2 participants