-
Notifications
You must be signed in to change notification settings - Fork 11.7k
[10.x] Create new command EnumMakeCommand #50004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| namespace {{ namespace }}; | ||
|
|
||
| enum {{ class }}: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only a string and not an int?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the int|string suggestion?
|
| * | ||
| * @return void | ||
| */ | ||
| protected function createTest() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enum will not need tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not? I think testing enums are fairly commonplace.
|
Thanks for your pull request to Laravel! Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include. If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions! If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response. |
Within the commands defined in the structure there is currently no option to create enums, whenever I create a new project I need to create a custom command to create enums, the same applies to external actions and services.
For example: when I need to create an action, I created a make:action command.
For an external service, for integrations with other products I generally use a make:service command.
In this case, I always need to create a new command to create enums, I believe that make:enum would be very useful for Laravel developers' daily lives.
php artisan make:enum
Att. Felipe Arnold.