Skip to content

[FrameworkBundle][SecurityBundle] Use stderr for some other commands #20674

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

Closed
wants to merge 1 commit into from
Closed

[FrameworkBundle][SecurityBundle] Use stderr for some other commands #20674

wants to merge 1 commit into from

Conversation

ogizanagi
Copy link
Contributor

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A

Follows #20632 and updates some other places where outputting to stderr would be nice to have in order to have clean redirected outputs.

@@ -87,7 +88,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$twig = $this->getTwigEnvironment();

if (null === $twig) {
$io->error('The Twig environment needs to be set.');
$errorIo = $output instanceof ConsoleOutputInterface ? new SymfonyStyle($input, $output->getErrorOutput()) : $io;
$errorIo->error('The Twig environment needs to be set.');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO this one can be challenged to simply throw a \RuntimeException instead.

@ogizanagi ogizanagi changed the title [FrameworkBundle][SecurityBundle][TwigBridge] Use stderr for some other commands [FrameworkBundle][SecurityBundle] Use stderr for some other commands Nov 28, 2016
@ogizanagi ogizanagi closed this Nov 28, 2016
@ogizanagi ogizanagi deleted the stderr_commands branch November 28, 2016 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants