Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Console] Rename Command::setProcessName to Command::setProcessTitle #10474

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

Merged
merged 1 commit into from
Mar 18, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion 2 src/Symfony/Component/Console/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CHANGELOG
* deprecated TableHelper in favor of Table
* deprecated ProgressHelper in favor of ProgressBar
* added a way to set a default command instead of `ListCommand`
* added a way to set the process name of a command
* added a way to set the process title of a command

2.4.0
-----
Expand Down
16 changes: 8 additions & 8 deletions 16 src/Symfony/Component/Console/Command/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Command
{
private $application;
private $name;
private $processName;
private $processTitle;
private $aliases = array();
private $definition;
private $help;
Expand Down Expand Up @@ -213,11 +213,11 @@ protected function initialize(InputInterface $input, OutputInterface $output)
*/
public function run(InputInterface $input, OutputInterface $output)
{
if (null !== $this->processName) {
if (null !== $this->processTitle) {
if (function_exists('cli_set_process_title')) {
cli_set_process_title($this->processName);
cli_set_process_title($this->processTitle);
} elseif (function_exists('setproctitle')) {
setproctitle($this->processName);
setproctitle($this->processTitle);
} elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
$output->writeln('<comment>Install the proctitle PECL to be able to change the process title.</comment>');
}
Expand Down Expand Up @@ -423,20 +423,20 @@ public function setName($name)
}

/**
* Sets the process name of the command.
* Sets the process title of the command.
*
* This feature should be used only when creating a long process command,
* like a daemon.
*
* PHP 5.5+ or the proctitle PECL library is required
*
* @param string $name The process name
* @param string $title The process title
*
* @return Command The current instance
*/
public function setProcessName($name)
public function setProcessTitle($title)
{
$this->processName = $name;
$this->processTitle = $title;

return $this;
}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.