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] Allow commands to overwrite their input and output handlers #30706

Merged
merged 5 commits into from Nov 29, 2019

Conversation

@gocanto
Copy link
Contributor

gocanto commented Nov 28, 2019

This [PR] allows commands to overwrite the input and output handlers.

This is useful when you need to swap out a current handler on runtime execution. It also adds an easy way to test commands as Units without the need to extend from the framework test case class to write tests as it is in here.

There is another way to hook into this cycle by mocking the Laravel value, but you need to get into setting all the expectations needed as shown in this Test

@gocanto gocanto changed the title allow commands to overwrite their input and output handler [6.x] Allow commands to overwrite their input and output handlers. Nov 28, 2019
@GrahamCampbell

This comment has been minimized.

Copy link
Member

GrahamCampbell commented Nov 28, 2019

Please use fully qualified class names in the phpdoc, and put 2 spaces around the type in param docs.

@gocanto

This comment has been minimized.

Copy link
Contributor Author

gocanto commented Nov 28, 2019

Sure thing Graham. I will get to it tomorrow!

@GrahamCampbell GrahamCampbell changed the title [6.x] Allow commands to overwrite their input and output handlers. [WIP] [6.x] Allow commands to overwrite their input and output handlers Nov 28, 2019
@gocanto

This comment has been minimized.

Copy link
Contributor Author

gocanto commented Nov 29, 2019

@GrahamCampbell I think these commits should do the trick. Thanks!

99746e8

6de2286

gocanto and others added 2 commits Nov 29, 2019
@GrahamCampbell GrahamCampbell changed the title [WIP] [6.x] Allow commands to overwrite their input and output handlers [6.x] Allow commands to overwrite their input and output handlers Nov 29, 2019
@taylorotwell taylorotwell merged commit afb1669 into laravel:6.x Nov 29, 2019
2 checks passed
2 checks passed
continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.