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
Merged

[6.x] Allow commands to overwrite their input and output handlers #30706

merged 5 commits into from Nov 29, 2019

Conversation

gocanto
Copy link
Contributor

@gocanto 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
Copy link
Member

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

@gocanto
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
Copy link
Contributor Author

gocanto commented Nov 29, 2019

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

99746e8

6de2286

@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
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