Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11bfe50

Browse files
author
Loïc Chardonnet
committed
Added warning about performances
1 parent6a7a25f commit11bfe50

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎components/console/commands_as_services.rst‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ defining it with the ``console.command`` tag:
6161
->addTag('console.command')
6262
;
6363
64-
Use Case:Using Dependencies and Parameters to Set Default Values for Options
65-
-----------------------------------------------------------------------------
64+
Using Dependencies and Parameters to Set Default Values for Options
65+
-------------------------------------------------------------------
6666

6767
Imagine you want to provide a default value for the ``name``option. You could
6868
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::
111111
$output->writeln($name);
112112
}
113113
}
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.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp