Skip to content
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

add make:enum command #12

Merged
merged 6 commits into from Aug 5, 2019
Merged

add make:enum command #12

merged 6 commits into from Aug 5, 2019

Conversation

Gummibeer
Copy link
Collaborator

No description provided.

@Gummibeer Gummibeer requested a review from brendt May 17, 2019 15:03
@Gummibeer Gummibeer self-assigned this May 17, 2019
@brendt
Copy link
Collaborator

brendt commented May 27, 2019

Hi @Gummibeer

Looking good already! I'll review this in more depth later this week (hopefully today)

@Gummibeer
Copy link
Collaborator Author

@brendt poke 🤛

@brendt
Copy link
Collaborator

brendt commented Jul 15, 2019

hi Tom 👋😁

I'll do my best to check this out this week! Sorry for the delay, lots of project work going on and some personal stuff also.

public function it_can_make_an_enum_with_methods_studly(): void
{
$values = [
'Monday' => 'monday',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would this command be invoked in real situations? Wouldn't it be quite a hassle to write all values on the commandline?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that it's something like the make commands for models, migrations and so on. They also have a lot of options to configure the resulting model but most times you simply use make:model Post and do the rest in the created file itself.
I would keep them in to allow custom extensions like make:enum:by-model which reads values from DB and puts them in place or whatever.
The other solution would be a JSON file - but I don't think that someone wants to create a JSON file to call a make command?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enough. I do think we need to be a little careful not to "overbloat" this package from the start. It's easy to add new features, but it's a lot harder to maintain remove them afterwards.

But I do think this make command is a valuable one to have, so let's go ahead and merge it 👍

tests/Commands/MakeEnumTest.php Show resolved Hide resolved
src/Commands/MakeEnum.php Outdated Show resolved Hide resolved
@Gummibeer
Copy link
Collaborator Author

@brendt no problem and don't stress yourself! Just wanted to bring up this PR again to "finish" the work for a v1.0.0 release. :)

@Gummibeer Gummibeer mentioned this pull request Aug 4, 2019
@brendt
Copy link
Collaborator

brendt commented Aug 5, 2019

@Gummibeer feel free to merge this one!

@Gummibeer Gummibeer merged commit bf3f884 into master Aug 5, 2019
@Gummibeer Gummibeer deleted the ft-make-command branch August 5, 2019 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants