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
Member

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 [email protected]

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

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

@GrahamCampbell
Copy link
Member

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

@crynobone
Copy link
Member Author

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 console-interacts-with-io branch February 10, 2020 13:21
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.

4 participants