diff --git a/src/Symfony/Component/Console/CHANGELOG.md b/src/Symfony/Component/Console/CHANGELOG.md index 30969e8b7c..47dcebd31c 100644 --- a/src/Symfony/Component/Console/CHANGELOG.md +++ b/src/Symfony/Component/Console/CHANGELOG.md @@ -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 ----- diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 679a1c01b9..7b0b45c89b 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -33,7 +33,7 @@ class Command { private $application; private $name; - private $processName; + private $processTitle; private $aliases = array(); private $definition; private $help; @@ -213,11 +213,11 @@ class Command */ 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('Install the proctitle PECL to be able to change the process title.'); } @@ -423,20 +423,20 @@ class Command } /** - * 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; }