8000 [Console][FrameworkBundle] Revised console header formatting by ro0NL · Pull Request #19275 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console][FrameworkBundle] Revised console header formatting #19275

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 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove kernel info from 'long version' + consistent input options
  • Loading branch information
ro0NL committed Jul 29, 2016
commit 76992f633b9f569af3136bcf60dc89c73184d226
8 changes: 4 additions & 4 deletions src/Symfony/Bundle/FrameworkBundle/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public function __construct(KernelInterface $kernel)

parent::__construct('Symfony', Kernel::VERSION);

$this->getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The Environment name.', $kernel->getEnvironment()));
$this->getDefinition()->addOption(new InputOption('--no-debug', null, InputOption::VALUE_NONE, 'Switches off debug mode.'));
$this->getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The environment name', $kernel->getEnvironment()));
$this->getDefinition()->addOption(new InputOption('--no-debug', null, InputOption::VALUE_NONE, 'Switches off debug mode'));
}

/**
Expand Down Expand Up @@ -107,8 +107,8 @@ public function getLongVersion()
{
return parent::getLongVersion()
.sprintf(
' (kernel: <comment>%s</comment>, env: <comment>%s</comment>, debug: <comment>%s</comment>)',
$this->kernel->getName(), $this->kernel->getEnvironment(), $this->kernel->isDebug() ? 'true' : 'false'
' (env: <comment>%s</comment>, debug: <comment>%s</comment>)',
$this->kernel->getEnvironment(), $this->kernel->isDebug() ? 'true' : 'false'
);
Copy link
Member

Choose a reason for hiding this comment

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

This should be on one line.

Copy link
Contributor Author
@ro0NL ro0NL Jul 4, 2016

Choose a reason for hiding this comment

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

Can i go with <comment>%s</> (vs. <comment>%s</comment>) btw? Would improve readability in a way :)

Copy link
Member

Choose a reason for hiding this comment

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

IIRC we already do that in other places.

}

Expand Down
0