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

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 xel1045:resolve-command-via-application-resolution branch from 3599cb2 to 0b07e0f Sep 5, 2019

@taylorotwell

This comment has been minimized.

Copy link
Member

commented Sep 5, 2019

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

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/styleci/pr The analysis has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.