diff --git a/src/Symfony/Component/Console/CHANGELOG.md b/src/Symfony/Component/Console/CHANGELOG.md index 44e00fb572..c5a69637e1 100644 --- a/src/Symfony/Component/Console/CHANGELOG.md +++ b/src/Symfony/Component/Console/CHANGELOG.md @@ -12,6 +12,7 @@ CHANGELOG * Added `Application::getSignalRegistry()` and `Application::setSignalsToDispatchEvent()` methods * Added `SignalableCommandInterface` interface * Added `TableCellStyle` class to customize table cell + * Removed `php ` prefix invocation from help messages. 5.1.0 ----- diff --git a/src/Symfony/Component/Console/Command/HelpCommand.php b/src/Symfony/Component/Console/Command/HelpCommand.php index b32be4c95c..e704b9b2a0 100644 --- a/src/Symfony/Component/Console/Command/HelpCommand.php +++ b/src/Symfony/Component/Console/Command/HelpCommand.php @@ -44,11 +44,11 @@ class HelpCommand extends Command ->setHelp(<<<'EOF' The %command.name% command displays help for a given command: - php %command.full_name% list + %command.full_name% list You can also output the help in other formats by using the --format option: - php %command.full_name% --format=xml list + %command.full_name% --format=xml list To display the list of available commands, please use the list command. EOF diff --git a/src/Symfony/Component/Console/Command/ListCommand.php b/src/Symfony/Component/Console/Command/ListCommand.php index 2ded1fe33e..284ddb5fea 100644 --- a/src/Symfony/Component/Console/Command/ListCommand.php +++ b/src/Symfony/Component/Console/Command/ListCommand.php @@ -40,19 +40,19 @@ class ListCommand extends Command ->setHelp(<<<'EOF' The %command.name% command lists all commands: - php %command.full_name% + %command.full_name% You can also display the commands for a specific namespace: - php %command.full_name% test + %command.full_name% test You can also output the information in other formats by using the --format option: - php %command.full_name% --format=xml + %command.full_name% --format=xml It's also possible to get raw list of commands (useful for embedding command runner): - php %command.full_name% --raw + %command.full_name% --raw EOF ) ; diff --git a/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/Symfony/Component/Console/Tests/Command/CommandTest.php index c15555897b..e2947dc44e 100644 --- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php @@ -153,7 +153,7 @@ class CommandTest extends TestCase public function testGetProcessedHelp() { $command = new \TestCommand(); - $command->setHelp('The %command.name% command does... Example: php %command.full_name%.'); + $command->setHelp('The %command.name% command does... Example: %command.full_name%.'); $this->assertStringContainsString('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly'); $this->assertStringNotContainsString('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name%'); @@ -162,7 +162,7 @@ class CommandTest extends TestCase $this->assertStringContainsString('description', $command->getProcessedHelp(), '->getProcessedHelp() falls back to the description'); $command = new \TestCommand(); - $command->setHelp('The %command.name% command does... Example: php %command.full_name%.'); + $command->setHelp('The %command.name% command does... Example: %command.full_name%.'); $application = new Application(); $application->add($command); $application->setDefaultCommand('namespace:name', true); diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_1.json b/src/Symfony/Component/Console/Tests/Fixtures/application_1.json index 8e676346e3..bb1eab28ed 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_1.json +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_1.json @@ -7,7 +7,7 @@ "help [--format FORMAT] [--raw] [--] []" ], "description": "Displays help for a command", - "help": "The help<\/info> command displays help for a given command:\n\n php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the --format<\/comment> option:\n\n php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the list<\/info> command.", + "help": "The help<\/info> command displays help for a given command:\n\n app\/console help list<\/info>\n\nYou can also output the help in other formats by using the --format<\/comment> option:\n\n app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the list<\/info> command.", "definition": { "arguments": { "command_name": { @@ -110,7 +110,7 @@ "list [--raw] [--format FORMAT] [--] []" ], "description": "Lists commands", - "help": "The list<\/info> command lists all commands:\n\n php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the --format<\/comment> option:\n\n php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n php app\/console list --raw<\/info>", + "help": "The list<\/info> command lists all commands:\n\n app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n app\/console list test<\/info>\n\nYou can also output the information in other formats by using the --format<\/comment> option:\n\n app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n app\/console list --raw<\/info>", "definition": { "arguments": { "namespace": { diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_1.md b/src/Symfony/Component/Console/Tests/Fixtures/application_1.md index f168f58a22..38c84e4e23 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_1.md +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_1.md @@ -15,11 +15,11 @@ Displays help for a command The help command displays help for a given command: - php app/console help list + app/console help list You can also output the help in other formats by using the --format option: - php app/console help --format=xml list + app/console help --format=xml list To display the list of available commands, please use the list command. @@ -127,19 +127,19 @@ Lists commands The list command lists all commands: - php app/console list + app/console list You can also display the commands for a specific namespace: - php app/console list test + app/console list test You can also output the information in other formats by using the --format option: - php app/console list --format=xml + app/console list --format=xml It's also possible to get raw list of commands (useful for embedding command runner): - php app/console list --raw + app/console list --raw ### Arguments diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_1.xml b/src/Symfony/Component/Console/Tests/Fixtures/application_1.xml index 55061a1504..5b6a906c5a 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_1.xml +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_1.xml @@ -8,11 +8,11 @@ Displays help for a command The <info>help</info> command displays help for a given command: - <info>php app/console help list</info> + <info>app/console help list</info> You can also output the help in other formats by using the <comment>--format</comment> option: - <info>php app/console help --format=xml list</info> + <info>app/console help --format=xml list</info> To display the list of available commands, please use the <info>list</info> command. @@ -63,19 +63,19 @@ Lists commands The <info>list</info> command lists all commands: - <info>php app/console list</info> + <info>app/console list</info> You can also display the commands for a specific namespace: - <info>php app/console list test</info> + <info>app/console list test</info> You can also output the information in other formats by using the <comment>--format</comment> option: - <info>php app/console list --format=xml</info> + <info>app/console list --format=xml</info> It's also possible to get raw list of commands (useful for embedding command runner): - <info>php app/console list --raw</info> + <info>app/console list --raw</info> The namespace name diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_2.json b/src/Symfony/Component/Console/Tests/Fixtures/application_2.json index fb8a84ef34..ef8c99746b 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_2.json +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_2.json @@ -11,7 +11,7 @@ "help [--format FORMAT] [--raw] [--] []" ], "description": "Displays help for a command", - "help": "The help<\/info> command displays help for a given command:\n\n php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the --format<\/comment> option:\n\n php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the list<\/info> command.", + "help": "The help<\/info> command displays help for a given command:\n\n app\/console help list<\/info>\n\nYou can also output the help in other formats by using the --format<\/comment> option:\n\n app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the list<\/info> command.", "definition": { "arguments": { "command_name": { @@ -114,7 +114,7 @@ "list [--raw] [--format FORMAT] [--] []" ], "description": "Lists commands", - "help": "The list<\/info> command lists all commands:\n\n php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the --format<\/comment> option:\n\n php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n php app\/console list --raw<\/info>", + "help": "The list<\/info> command lists all commands:\n\n app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n app\/console list test<\/info>\n\nYou can also output the information in other formats by using the --format<\/comment> option:\n\n app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n app\/console list --raw<\/info>", "definition": { "arguments": { "namespace": { diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_2.md b/src/Symfony/Component/Console/Tests/Fixtures/application_2.md index f0e2f6488b..5f957da376 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_2.md +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_2.md @@ -28,11 +28,11 @@ Displays help for a command The help command displays help for a given command: - php app/console help list + app/console help list You can also output the help in other formats by using the --format option: - php app/console help --format=xml list + app/console help --format=xml list To display the list of available commands, please use the list command. @@ -140,19 +140,19 @@ Lists commands The list command lists all commands: - php app/console list + app/console list You can also display the commands for a specific namespace: - php app/console list test + app/console list test You can also output the information in other formats by using the --format option: - php app/console list --format=xml + app/console list --format=xml It's also possible to get raw list of commands (useful for embedding command runner): - php app/console list --raw + app/console list --raw ### Arguments diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_2.xml b/src/Symfony/Component/Console/Tests/Fixtures/application_2.xml index 4dad261bf4..4ec76624a7 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_2.xml +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_2.xml @@ -8,11 +8,11 @@ Displays help for a command The <info>help</info> command displays help for a given command: - <info>php app/console help list</info> + <info>app/console help list</info> You can also output the help in other formats by using the <comment>--format</comment> option: - <info>php app/console help --format=xml list</info> + <info>app/console help --format=xml list</info> To display the list of available commands, please use the <info>list</info> command. @@ -63,19 +63,19 @@ Lists commands The <info>list</info> command lists all commands: - <info>php app/console list</info> + <info>app/console list</info> You can also display the commands for a specific namespace: - <info>php app/console list test</info> + <info>app/console list test</info> You can also output the information in other formats by using the <comment>--format</comment> option: - <info>php app/console list --format=xml</info> + <info>app/console list --format=xml</info> It's also possible to get raw list of commands (useful for embedding command runner): - <info>php app/console list --raw</info> + <info>app/console list --raw</info> The namespace name diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md b/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md index ce3daaa8e5..5d9b0881d3 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md @@ -19,11 +19,11 @@ Displays help for a command The help command displays help for a given command: - php app/console help list + app/console help list You can also output the help in other formats by using the --format option: - php app/console help --format=xml list + app/console help --format=xml list To display the list of available commands, please use the list command. @@ -131,19 +131,19 @@ Lists commands The list command lists all commands: - php app/console list + app/console list You can also display the commands for a specific namespace: - php app/console list test + app/console list test You can also output the information in other formats by using the --format option: - php app/console list --format=xml + app/console list --format=xml It's also possible to get raw list of commands (useful for embedding command runner): - php app/console list --raw + app/console list --raw ### Arguments diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt index e365b11dd4..b1b2e665ce 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt @@ -21,16 +21,16 @@ Options: Help: The list command lists all commands: - php app/console list + app/console list You can also display the commands for a specific namespace: - php app/console list test + app/console list test You can also output the information in other formats by using the --format option: - php app/console list --format=xml + app/console list --format=xml It's also possible to get raw list of commands (useful for embedding command runner): - php app/console list --raw + app/console list --raw diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_run3.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_run3.txt index e365b11dd4..b1b2e665ce 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_run3.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_run3.txt @@ -21,16 +21,16 @@ Options: Help: The list command lists all commands: - php app/console list + app/console list You can also display the commands for a specific namespace: - php app/console list test + app/console list test You can also output the information in other formats by using the --format option: - php app/console list --format=xml + app/console list --format=xml It's also possible to get raw list of commands (useful for embedding command runner): - php app/console list --raw + app/console list --raw diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_run5.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_run5.txt index 53b391cdff..1cf8d1f8b6 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_run5.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_run5.txt @@ -21,10 +21,10 @@ Options: Help: The help command displays help for a given command: - php app/console help list + app/console help list You can also output the help in other formats by using the --format option: - php app/console help --format=xml list + app/console help --format=xml list To display the list of available commands, please use the list command.