You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Q | A
| ------------- | ---
| Doc fix? | yes
| New docs? | no
| Applies to | 2.4+
| Fixed tickets | N/A
Command as a service can be useful to give access to services and
configuration parameters in the `configure` method.
A simple use case: you want to allow the user to set an option's default
value in the `app/config/parameters.yml` file. Or the default value
needs to be computed by a service (database retrieval for instance).
With a `ContainerAwareCommand`, this wouldn't be possible because the
`configure` method is called from the constructor, so the container
isn't set yet.
0 commit comments