We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent6a7a25f commit11bfe50Copy full SHA for 11bfe50
components/console/commands_as_services.rst
@@ -61,8 +61,8 @@ defining it with the ``console.command`` tag:
61
->addTag('console.command')
62
;
63
64
-Use Case:Using Dependencies and Parameters to Set Default Values for Options
65
------------------------------------------------------------------------------
+Using Dependencies and Parameters to Set Default Values for Options
+-------------------------------------------------------------------
66
67
Imagine you want to provide a default value for the ``name``option. You could
68
pass one of the following as the 5th argument of ``addOption()``:
@@ -111,3 +111,9 @@ constructor. The only solution is to inject them through it::
111
$output->writeln($name);
112
}
113
114
+
115
+..caution::
116
117
+ When running the console, every commands are instanciated, which means every
118
+ ``configure()`` methods are called. Be careful with database queries, as
119
+ this could impact performances.