-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Console] Command lazy loading #8502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
811772e
to
a9445e4
Compare
console/lazy_commands.rst
Outdated
$application->setCommandLoader($commandLoader); | ||
$application->run(); | ||
|
||
This way, the ``HeavyCommand`` instance will be created only when the ``app:foo`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app:heavy
instead of app:foo
?
console/lazy_commands.rst
Outdated
'app:foo' => FooCommand::class, | ||
)); | ||
|
||
Like this, executing the `app:foo` command will load the ``FooCommand`` service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double `` around of app:foo ?
a9445e4
to
0ca3935
Compare
@yceruto comments addressed, thanks! |
0ca3935
to
4267622
Compare
console/commands_as_services.rst
Outdated
|
||
.. configuration-block:: | ||
|
||
.. code-block:: yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must be indented by four spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
4267622
to
96461f8
Compare
@chalasr thanks for providing this feature and for documenting it. In a minor reword commit, I made this change: -register an intermediate router ...
+register an intermediate loader ... Please confirm that it's correct to use "loader" instead of "router". Thanks! |
@javiereguiluz Absolutely correct, thank you for that and your other fixes. |
This PR was merged into the 3.4 branch. Discussion ---------- [Console] Command lazy loading Fixes #8147. Any help regarding wording/formatting would be much appreciated as usual :) Commits ------- e2d445e Minor rewords a6aac8f Break long lines and add blank lines after RST directives 96461f8 Command lazy loading
Thanks @chalasr! Really great feature and accomplishment - congrats :) |
* 3.4: (81 commits) Fixed a RST syntax issue Mention that ACL is deprecated in the security config reference Update questionhelper.rst Remove TableHelper Page [#8416] Minor tweaks Minor tweaks to #8502 Documented the new config prototype shortcuts Document the new RequestExceptionInterface Docs re-org and removal of small sections Processed xabbuh comments Fixes Fixed a grammar issue remove deprecated feature description Fix a small typo error (number.rst) Remove deprecated proxy argument Fix instance of class in express language in DI Missing use reference Unused Private param in documentation Doctrine event listener could persist a null value Added about command in debug page ...
Fixes #8147.
Any help regarding wording/formatting would be much appreciated as usual :)