8000 [Console] Add documentation about the console.command "command" attribute (lazy commands) · Issue #8147 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Console] Add documentation about the console.command "command" attribute (lazy commands) #8147

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
chalasr opened this issue Jul 12, 2017 · 5 comments
Labels
Console hasPR A Pull Request has already been submitted for this issue.
Milestone

Comments

@chalasr
Copy link
Member
chalasr commented Jul 12, 2017

No description provided.

@chalasr chalasr changed the title [Console] Add documentation about the console.command "command" attribute [Console] Add documentation about the console.command "command" attribute (lazy commands) Jul 12, 2017
@xabbuh xabbuh added this to the 3.4 milestone Jul 12, 2017
@xabbuh
Copy link
Member
xabbuh commented Jul 12, 2017

see symfony/symfony#22734 and https://symfony.com/blog/new-in-symfony-3-4-lazy-commands for more information

@chalasr
Copy link
Member Author
chalasr commented Jul 14, 2017

I'm going to take this in the next week. I think we need a small section in the "Command as services" chapter and a whole new section in the Console component showing how to get commands lazily loaded using the con 8000 sole standalone.

chalasr pushed a commit to symfony/symfony that referenced this issue Jul 19, 2017
…application with lazy-loading needs (ogizanagi)

This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Add a factory command loader for standalone application with lazy-loading needs

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes (failure unrelated)
| Fixed tickets | #22734 (comment) <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo (with symfony/symfony-docs#8147)

So standalone applications can also benefit from the lazy loading feature without requiring a PSR-11 implementation specifically for this need.

The loader does not memoize any resolved command from factories, as it's the `Application` responsibility and the `ContainerCommandLoader` does not either (the PSR-11 does not enforce two successive calls to return the same value).

Commits
-------

9b40b4a [Console] Add a factory command loader for standalone application with lazy-loading needs
symfony-splitter pushed a commit to symfony/console that referenced this issue Jul 19, 2017
…application with lazy-loading needs (ogizanagi)

This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Add a factory command loader for standalone application with lazy-loading needs

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes (failure unrelated)
| Fixed tickets | symfony/symfony#22734 (comment) <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo (with symfony/symfony-docs#8147)

So standalone applications can also benefit from the lazy loading feature without requiring a PSR-11 implementation specifically for this need.

The loader does not memoize any resolved command from factories, as it's the `Application` responsibility and the `ContainerCommandLoader` does not either (the PSR-11 does not enforce two successive calls to return the same value).

Commits
-------

9b40b4a [Console] Add a factory command loader for standalone application with lazy-loading needs
@xabbuh
Copy link
Member
xabbuh commented Jul 19, 2017

symfony/symfony#23510 was also merged

@chalasr
Copy link
Member Author
chalasr commented Aug 10, 2017

symfony/symfony#23805 was merged too

fabpot added a commit to symfony/symfony that referenced this issue Aug 24, 2017
… compile time registration (chalasr, nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Allow commands to provide a default name for compile time registration

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23796
| License       | MIT
| Doc PR        | symfony/symfony-docs#8147

Commits
-------

eda7d42 [Console] Add protected static $defaultName to set the default name of a Command
5d9ae6b [Console] Allow commands to provide a default name for compile time registration
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this issue Aug 24, 2017
… compile time registration (chalasr, nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Allow commands to provide a default name for compile time registration

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23796
| License       | MIT
| Doc PR        | symfony/symfony-docs#8147

Commits
-------

eda7d42955 [Console] Add protected static $defaultName to set the default name of a Command
5d9ae6b56f [Console] Allow commands to provide a default name for compile time registration
symfony-splitter pushed a commit to symfony/translation that referenced this issue Aug 24, 2017
… compile time registration (chalasr, nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Allow commands to provide a default name for compile time registration

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23796
| License       | MIT
| Doc PR        | symfony/symfony-docs#8147

Commits
-------

eda7d42955 [Console] Add protected static $defaultName to set the default name of a Command
5d9ae6b56f [Console] Allow commands to provide a default name for compile time registration
symfony-splitter pushed a commit to symfony/security-bundle that referenced this issue Aug 24, 2017
… compile time registration (chalasr, nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Allow commands to provide a default name for compile time registration

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23796
| License       | MIT
| Doc PR        | symfony/symfony-docs#8147

Commits
-------

eda7d42955 [Console] Add protected static $defaultName to set the default name of a Command
5d9ae6b56f [Console] Allow commands to provide a default name for compile time registration
@chalasr
Copy link
Member Author
chalasr commented Oct 10, 2017

See #8502

@xabbuh xabbuh added the hasPR A Pull Request has already been submitted for this issue. label Oct 13, 2017
SerhiyMytrovtsiy added a commit to SerhiyMytrovtsiy/translation that referenced this issue Oct 19, 2022
… compile time registration (chalasr, nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Allow commands to provide a default name for compile time registration

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23796
| License       | MIT
| Doc PR        | symfony/symfony-docs#8147

Commits
-------

eda7d42955 [Console] Add protected static $defaultName to set the default name of a Command
5d9ae6b56f [Console] Allow commands to provide a default name for compile time registration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Console hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

2 participants
0