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
When generating a component, the command will automatically check if a component with the same name already exists in your codebase:
224
224
225
225
1. **Same format exists**: If you're generating a YAML file and a YAML file with the same component already exists (or PHP for PHP), you will be prompted to confirm if you want to overwrite it.
226
+
- **Diff View**: If the file exists, the command will display a colored diff (green for additions, red for deletions) showing exactly what will change if you overwrite the file.
226
227
227
228
2. **Different format exists**: If you're generating a YAML file but a PHP file with the same component already exists (or vice versa), you will be warned about potential duplicate definitions and asked to confirm before continuing.
228
229
229
230
**Example output:**
230
231
```
231
232
Component already exists in YAML file: /path/to/schemas/UserDTO.yaml
232
-
Do you want to overwrite this file with new values ? (yes or no, default is YES)
233
+
Differences found:
234
+
--- Original
235
+
+++ New
236
+
- type: string
237
+
+ type: integer
238
+
239
+
Do you want to overwrite this file? (yes or no, default is YES)
233
240
234
241
Component also exists in PHP file: /path/to/schemas/UserDTO.php
235
242
Do you want to continue generating the YAML file? This may cause duplicate definitions. (yes or no, default is YES)
0 commit comments