Skip to content

Commit 3fc9a3b

Browse files
authored
[Console] Fix wrong method name to add a command to an application
1 parent cde496f commit 3fc9a3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/console.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ First, you need to create a PHP script to define the console application::
4343
$application->run();
4444

4545
Then, you can register the commands using
46-
:method:`Symfony\\Component\\Console\\Application::add`::
46+
:method:`Symfony\\Component\\Console\\Application::addCommand`::
4747

4848
// ...
49-
$application->add(new GenerateAdminCommand());
49+
$application->addCommand(new GenerateAdminCommand());
5050

5151
You can also register inline commands and define their behavior thanks to the
5252
``Command::setCode()`` method::

0 commit comments

Comments
 (0)