Improvement: Artisan make:enum Must Follow Consistent Directory Creation Behavior #53674
-
When generating enums using Artisan, they are currently placed in the root directory if the App/Enums directory does not exist. If the App/Enums directory is present, the generated enums are correctly placed within it. However, this behavior differs from other make commands, which follow a consistent standard for directory creation. To maintain uniformity across all Artisan commands, the EnumMakeCommand should adhere to the same approach, creating the App/Enums directory if it doesn’t already exist. Relevant Command Implementation: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This is a practical suggestion. Other Artisan commands, like make:model, create necessary directories automatically. Aligning |
Beta Was this translation helpful? Give feedback.
At the moment I see this is allowing for folks who 'may' use a directory named 'Enumerations' instead of the shorthand 'Enums' this is probably why it is like it is.. make:job/listener etc it's a simple word that it can be assumed everyone will use...