Skip to content

Fix the explanation about registering commands #9419

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

Conversation

javiereguiluz
Copy link
Member

A question to @xabbuh: we should merge this in 2.7, 2.8 and 3.4, right?

console.rst Outdated
:class:`Symfony\\Component\\Console\\Command\\Command`, Symfony does this for
you automatically.
Symfony commands must be registered before using them. In order to be registered,
a command must bw:
Copy link
Member

Choose a reason for hiding this comment

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

be

@xabbuh
Copy link
Member

xabbuh commented Mar 9, 2018

I don't know if we really need an explanation here. On http://symfony.com/doc/2.7/console/commands_as_services.html we already have an IMO good enough one.

@javiereguiluz
Copy link
Member Author

But this is the main article about Console, the only one who anybody interested in Symfony + commands is going to write. If you are new to Symfony I think you'll never look for "symfony commands as services" because you don't even know what a service is.

@xabbuh
Copy link
Member

xabbuh commented Mar 9, 2018

Fair enough, but then we can probably better just borrow the sentences from the existing section, right?

@javiereguiluz
Copy link
Member Author

I looked into the original article but I didn't like it because it doesn't explain the conditions in a simple and comprehensive list. However, I made some changes here after your comments and I've added a link to that "commands as services" article. Thanks!

@wouterj
Copy link
Member

wouterj commented Mar 10, 2018

Hmm, why did we remove the notion about the console.command tag (which, afaik, is required in 4.x)?

Otherwise, 👍

@javiereguiluz
Copy link
Member Author

@wouter I made a lot of changes about this and merged some. so in 4.0 we mention that tag: https://github.com/symfony/symfony-docs/blob/master/console.rst#registering-the-command We just need to fix the 2.7 and 2.8 and 3.4 branches to fix the mistake I made in their explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants