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

Make backing type a bool, since it defaults anyway on 1 of 2 options. #971

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

dereuromark
Copy link
Member

#968

I would still like to at least propose this for consideration.
Given that there are now only 2 - and string by default, it seems kind of overkill to have a full option for it.
It seems -i could suffice?

@othercorey
Copy link
Member

othercorey commented Dec 26, 2023

Sorry, but I think this is a confusing option. Maybe if it was --int or --string that would be clear.

@dereuromark
Copy link
Member Author

So just --int ?

)->addOption('int', [
'help' => 'Using backed enums with int instead of string as return type',
'boolean' => true,
'short' => 'i',
Copy link
Member

Choose a reason for hiding this comment

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

I don't know if we need a short option for this as int isn't that long.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, it can still be convinient :)

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough.

@dereuromark dereuromark merged commit 8d042a5 into model-enum Dec 27, 2023
7 of 8 checks passed
@dereuromark dereuromark deleted the model-enum-bool-flag branch December 27, 2023 12:37
dereuromark added a commit that referenced this pull request Dec 27, 2023
* Allow baking enums.

* Allow baking enums.

* Rephrase options help.

* Update templates/bake/Model/enum.twig

Co-authored-by: ADmad <ADmad@users.noreply.github.com>

* Fix tests

* Rename option `backed` to `backing-type` defaulting to `string`.

* Clarify backed.

* Make backing type a bool, since it defaults anyway on 1 of 2 options. (#971)

* Make backing type a bool, since it defaults anyway on 1 of 2 options.

* Use --int / -i as flag.

---------

Co-authored-by: ADmad <ADmad@users.noreply.github.com>
Co-authored-by: ADmad <admad.coder@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants