Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[Console] Commands auto-registration is deprecated#8269
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
console.rst Outdated
| } | ||
| } | ||
| If you're using the:ref:`default services.yml configuration<service-container-services-load-example>`, |
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.
Considering that this is the Console article, this explanation about services may be a bit advanced and/or confusing. Imagine you are a user reading the article: you just want to create and run some commands. You don't even need to know what a service is.
So, why don't we reword the first paragraph to tell the user something like this:
Symfony registers any PHP class extending from Command as a console command automatically, so you can now execute this command as
........
And keep the mention of services and tags for the.. note.
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.
I like the idea! However I'm not sure I did exactly what you wanted, can you check?
console.rst Outdated
| --------------------- | ||
| After configuring the command, you can execute it in the terminal: | ||
| Symfony registers any PHP class extending from:class:`Symfony\\Component\\Console\\Command\\Command` |
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.
from
console.rst Outdated
| After configuring the command, you can execute it in the terminal: | ||
| Symfony registers any PHP class extending from:class:`Symfony\\Component\\Console\\Command\\Command` | ||
| as a console command automatically, so you can now execute this command in the |
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.
[...] automatically. So you [...]
| Otherwise, Symfony looks in the ``Command/`` directory of bundles for commands | ||
| non registered as a service but this is deprecated since Symfony 3.4 and | ||
| won't be supported in Symfony 4.0. |
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.
Maybe we should move this whole paragraph into acaution block?
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.
done
robfrawley commentedAug 14, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The text online 19 of
You can referencethis article on the subject, with the relevant information summarized below.
|
GuilhemN commentedAug 14, 2017
@robfrawley I didn't know that, thanks for the explanation! It's fixed now. |
xabbuh commentedSep 3, 2017
Thank you@GuilhemN. |
…emN)This PR was squashed before being merged into the 3.4 branch (closes#8269).Discussion----------[Console] Commands auto-registration is deprecatedDocumentsymfony/symfony#23805.I wonder, should I updatehttps://github.com/symfony/symfony-docs/blob/17d1c39298e9415886e2c712748d3021ed7865a4/bundles/best_practices.rst L122 (`Command/ Yes`) ? As it is not really mandatory to use the `Command/` directory anymore.Commits-------493ae89 [Console] Commands auto-registration is deprecated
xabbuh commentedSep 3, 2017
I think we should take that into account in#7156 |
* 3.4: (42 commits) [#8273] fix bundle registration code [#8273] minor rewording Reworded the built-in web server articles for Symfony 3.3 fix diff code block highlighting [#8269] minor rewording [Console] Commands auto-registration is deprecated [#8231] fix reStructuredText syntax Specified import order of config files [#7981] revert some changes Update upload_file.rst Update usage.rst Update doctrine.rst Update usage.rst [#8260] add missing redirection map entry Delete use_virtuals_forms.rst Added a missing redirection Update validation_group_service_resolver.rst Update redirection_map Update button_based_validation.rst Delete group_service_resolver.rst ...
Uh oh!
There was an error while loading.Please reload this page.
Documentsymfony/symfony#23805.
I wonder, should I updatehttps://github.com/symfony/symfony-docs/blob/17d1c39298e9415886e2c712748d3021ed7865a4/bundles/best_practices.rst L122 (
Command/ Yes) ? As it is not really mandatory to use theCommand/directory anymore.