From b02bc8cd003211a25cbfdaa6bc3947399c5ce71d Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 22 Oct 2013 17:34:33 +0200 Subject: [PATCH] add note about not passing the command argument with Symfony 2.4 --- cookbook/console/console_command.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cookbook/console/console_command.rst b/cookbook/console/console_command.rst index 303a9ee45ed..fa7db6f1673 100644 --- a/cookbook/console/console_command.rst +++ b/cookbook/console/console_command.rst @@ -159,7 +159,6 @@ instead of $commandTester = new CommandTester($command); $commandTester->execute( array( - 'command' => $command->getName(), 'name' => 'Fabien', '--yell' => true, ) @@ -171,6 +170,11 @@ instead of } } +.. versionadded:: 2.4 + Since Symfony 2.4, the ``CommandTester`` automatically detects the name of + the command to execute. Thus, you don't need to pass it via the ``command`` + argument anymore. + .. note:: In the specific case above, the ``name`` parameter and the ``--yell`` option @@ -200,7 +204,6 @@ you can extend your test from $commandTester = new CommandTester($command); $commandTester->execute( array( - 'command' => $command->getName(), 'name' => 'Fabien', '--yell' => true, )