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

[6.x] Resolve class command via application resolution #29869

Merged

Conversation

xel1045
Copy link
Contributor

@xel1045 xel1045 commented Sep 5, 2019

From a Laravel command, we can actually invoke another command using $this->call(Command::class); or $this->callSilent(Command::class);. This allows developers to navigate through the code and identify where a command is used.

Unfortunately, application resolution is not used in those cases and it makes class injection impossible. This PR replace the new $command for a class resolution via the application.

@xel1045 xel1045 force-pushed the resolve-command-via-application-resolution branch from 3599cb2 to 0b07e0f Compare September 5, 2019 12:32
@taylorotwell
Copy link
Member

No plans on changing this at the moment. I believe you can inject dependencies into handle.

@taylorotwell taylorotwell reopened this Sep 6, 2019
@taylorotwell taylorotwell merged commit 8d4a301 into laravel:6.x Sep 6, 2019
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

2 participants