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

[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

Closed
GuilhemN wants to merge4 commits intosymfony:3.4fromGuilhemN:commands

Conversation

@GuilhemN
Copy link
Contributor

@GuilhemNGuilhemN commentedAug 9, 2017
edited
Loading

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.

console.rst Outdated
}
}

If you're using the:ref:`default services.yml configuration<service-container-services-load-example>`,

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.

Copy link
ContributorAuthor

@GuilhemNGuilhemNAug 10, 2017
edited
Loading

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`
Copy link
Member

Choose a reason for hiding this comment

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

from

GuilhemN reacted with thumbs up emoji
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
Copy link
Member

Choose a reason for hiding this comment

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

[...] automatically. So you [...]

GuilhemN reacted with thumbs up emoji

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

@xabbuhxabbuhAug 11, 2017
edited
Loading

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?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

done

@robfrawley
Copy link
Contributor

robfrawley commentedAug 14, 2017
edited
Loading

The text online 19 ofconsole.rst should contain the phrase "a user," not "an user" (the latter being grammatically incorrect).

For example, you may want a command to createan user a user:

You can referencethis article on the subject, with the relevant information summarized below.

"An" goes before all words that begin with vowels (for example "an egg" or "an ugly dog"),with two exceptions.

  1. When "u" makes the same sound as the "y" in you.
  2. When "o" makes the same sound as "w" in won.

For these exceptions, "a" is used instead:

  • a union
  • a united front
  • a unicorn
  • a used napkin
  • a U.S. ship
  • a one-legged man
  • a user

@GuilhemN
Copy link
ContributorAuthor

@robfrawley I didn't know that, thanks for the explanation! It's fixed now.

robfrawley reacted with thumbs up emoji

@xabbuhxabbuh added this to the3.4 milestoneSep 3, 2017
@xabbuh
Copy link
Member

Thank you@GuilhemN.

xabbuh added a commit that referenced this pull requestSep 3, 2017
…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 added a commit that referenced this pull requestSep 3, 2017
@xabbuh
Copy link
Member

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.

I think we should take that into account in#7156

@xabbuhxabbuh closed thisSep 3, 2017
xabbuh added a commit that referenced this pull requestSep 3, 2017
* 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  ...
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz left review comments

@xabbuhxabbuhxabbuh approved these changes

+1 more reviewer

@HeahDudeHeahDudeHeahDude approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

6 participants

@GuilhemN@robfrawley@xabbuh@javiereguiluz@HeahDude@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp