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 way to create alias within option value. Use it for migrate #6

Conversation

bscheshirwork
Copy link
Contributor

yiisoft/yii2#16789

Q A
Is bugfix? no
New feature? yes
Breaks BC? -
Tests pass? yes/no
Fixed issues #3 #4

@samdark
Copy link
Member

samdark commented Oct 19, 2018

While it's good to have a shortcut for it, I'm not sure it's the best possible choice of letter.

@bscheshirwork
Copy link
Contributor Author

-y for yes

@samdark
Copy link
Member

samdark commented Oct 19, 2018

Yes, I understand that. Want @cebe, @hiqsol and @SilverFire opinions on that though.

@cebe
Copy link
Member

cebe commented Oct 24, 2018

having a short option that behaves differently from the long option can result in very confusing interface and is also not easy to explain in docs. I would prefer to keep it more intuitive to use.

e.g.

./yii migrate --interactive
./yii migrate --non-interactive

The thing with boolean flags is a bit complicated. While having a boolean flag that is false when not specified and true when specified is straight forward, with --interactive we have one that is default true, so setting it to false requires the weird concept of --interactive=0. It might be better to drop interactive and replace it with something that disables interactiveness when specified, so that it is default false.

@bscheshirwork
Copy link
Contributor Author

bscheshirwork commented Oct 24, 2018

intuitive to use.

Answer "yes" for question "apply something?"

Like to shell apt update -y

So... In this case

            'y' => ['-non-interactive', 1],

@samdark
Copy link
Member

samdark commented Oct 31, 2018

@bscheshirwork Good change overall. Going to have it. Would you please do #6 (comment) as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants