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] Split Console InteractsWithIO to external trait #31376

Merged
merged 1 commit into from Feb 6, 2020

Conversation

@crynobone
Copy link
Contributor

crynobone commented Feb 6, 2020

This is the final part of moving Illuminate\Console\Command to traits that can be use by Symfony Console, and this allows developer to reuse all the available IO helpers such as table, askQuestion, choice or even output style based on Laravel.

Usages

    // ...
    use \Illuminate\Console\Concerns\InteractsWithIO;

    /**
     * Execute the console command.
     *
     * @param  \Symfony\Component\Console\Input\InputInterface  $input
     * @param  \Symfony\Component\Console\Output\OutputInterface  $output
     * @return mixed
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->setOutput(new \Illuminate\Console\OutputStyle($input, $output));

         // you can now use any of the helper methods
    }

Signed-off-by: Mior Muhammad Zaki crynobone@gmail.com

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@GrahamCampbell GrahamCampbell changed the title [6.x] Split Console InteractsWithIO to external trait. [6.x] Split Console InteractsWithIO to external trait Feb 6, 2020
@taylorotwell taylorotwell merged commit aa8e975 into laravel:6.x Feb 6, 2020
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
@driesvints

This comment has been minimized.

Copy link
Member

driesvints commented Feb 10, 2020

Thank you for all your work on this @crynobone :)

@GrahamCampbell

This comment has been minimized.

Copy link
Member

GrahamCampbell commented Feb 10, 2020

This might take a bit of working merging into master. :P

@crynobone

This comment has been minimized.

Copy link
Contributor Author

crynobone commented Feb 10, 2020

This might take a bit of working merging into master. :P

@GrahamCampbell This seem to be the only changes I can find in the history, the PR to convert to Symfony 5 shouldn't be related to the PRs.

092203f#diff-2fa965df73b5d784388c81b706c26c82

Thank you for all your work on this

Welcome @driesvints

@crynobone crynobone deleted the crynobone:console-interacts-with-io branch Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.