Skip to content

[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix
  • Loading branch information
GuilhemN committed Aug 11, 2017
commit 0ef5f63d3f6ee83cdfc980048bd7db0387d2d16f
8 changes: 5 additions & 3 deletions console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ method. Then you can optionally define a help message and the
Executing the Command
---------------------

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
Symfony registers any PHP class extending :class:`Symfony\\Component\\Console\\Command\\Command`
as a console command automatically. So you can now execute this command in the
terminal:

.. code-block:: terminal
Expand All @@ -80,7 +80,9 @@ terminal:
You can also manually register your command as a service by configuring the service
and :doc:`tagging it </service_container/tags>` with ``console.command``.

Otherwise, Symfony looks in the ``Command/`` directory of bundles for commands
.. caution::

Symfony also 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.
Copy link
Member

@xabbuh xabbuh Aug 11, 2017

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 a caution block?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


Expand Down