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
{{ message }}
This repository was archived by the owner on Oct 28, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+96Lines changed: 96 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,3 +153,99 @@ class Logger extends Facade
153
153
```
154
154
155
155
Although facades are better testable than regular singletons, it is highly recommended to only use them sparringly and always prefer normal dependency injection when possible.
156
+
157
+
## Generator Commands
158
+
159
+
This bundle adds several [maker bundle](https://symfony.com/bundles/SymfonyMakerBundle/current/index.html) commands to generate commonly used components.
160
+
161
+
### Model / Repository
162
+
163
+
This command can be used to generate:
164
+
165
+
- The domain model class.
166
+
- A repository class for the model.
167
+
- The model's identity class as value object (optional).
168
+
- A Doctrine database entity configuration, either as annotation or separate config file (optional).
169
+
- A custom Doctrine type for the model's identity class (optional).
170
+
171
+
#### Command Output
172
+
173
+
```bash
174
+
Description:
175
+
Creates a new domain model class
176
+
177
+
Usage:
178
+
make:ddd:model [options] [--] [<name>]
179
+
180
+
Arguments:
181
+
name The name of the model class (e.g. Customer)
182
+
183
+
Options:
184
+
--aggregate-root Marks the model as aggregate root
185
+
--entity=ENTITY Use this model as Doctrine entity
186
+
--with-identity=WITH-IDENTITY Whether an identity value object should be created
187
+
--with-suffix Adds the suffix "Model" to the model class name
188
+
```
189
+
190
+
### Query / Command
191
+
192
+
These commands can be used to generate:
193
+
194
+
- A query and query handler class.
195
+
- A command and command handler class.
196
+
197
+
The query / command generated is just an empty class. The handler class is registered as a message handler for the configured [Symfony Messenger](https://symfony.com/doc/current/messenger.html).
198
+
199
+
#### Command Output
200
+
201
+
```bash
202
+
Description:
203
+
Creates a new query|command class and handler
204
+
205
+
Usage:
206
+
make:ddd:query|command [<name>]
207
+
208
+
Arguments:
209
+
name The name of the query|command class (e.g. Customer)
210
+
```
211
+
212
+
### Controller
213
+
214
+
This command can be used to generate a controller with optional `QueryBus` and `CommandBus` dependencies.
215
+
216
+
#### Command Output
217
+
218
+
```bash
219
+
Description:
220
+
Creates a new controller class
221
+
222
+
Usage:
223
+
make:ddd:controller [options] [--] [<name>]
224
+
225
+
Arguments:
226
+
name The name of the model class (e.g. Customer)
227
+
228
+
Options:
229
+
--include-query-bus Add a query bus dependency
230
+
--include-command-bus Add a command bus dependency
231
+
```
232
+
233
+
### Resource
234
+
235
+
This command can be used to generate an [Api Platform](https://api-platform.com/) resource. Minimum required version is [2.7](https://api-platform.com/docs/core/upgrade-guide/#api-platform-2730) for the PHP attributes support.
236
+
237
+
#### Command Output
238
+
239
+
```bash
240
+
Description:
241
+
Creates a new API Platform resource
242
+
243
+
Usage:
244
+
make:ddd:resource [options] [--] [<name>]
245
+
246
+
Arguments:
247
+
name The name of the model class to create the resource for (e.g. Customer). Model must exist already.
0 commit comments