Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit947ad92

Loïc Chardonnet
[Console] Adding use cases to command as service
| Q | A| ------------- | ---| Doc fix? | yes| New docs? | no| Applies to | 2.4+| Fixed tickets | N/ACommand as a service can be useful to give access to services andconfiguration parameters in the `configure` method.A simple use case: you want to allow the user to set an option's defaultvalue in the `app/config/parameters.yml` file. Or the default valueneeds 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 containerisn't set yet.1 parent5c4336a commit947ad92
1 file changed
+20
-6
lines changedLines changed: 20 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
74 |
| - | |
75 |
| - | |
76 |
| - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
77 | 80 |
| |
78 | 81 |
| |
79 | 82 |
| |
| |||
111 | 114 |
| |
112 | 115 |
| |
113 | 116 |
| |
114 |
| - | |
115 |
| - | |
116 |
| - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
117 | 131 |
| |
118 | 132 |
| |
119 | 133 |
| |
|
0 commit comments
Comments
(0)