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

[5.5] Replace the force shortcut with factory on the make:model command #20800

Merged
merged 1 commit into from
Aug 28, 2017
Merged

[5.5] Replace the force shortcut with factory on the make:model command #20800

merged 1 commit into from
Aug 28, 2017

Conversation

paulredmond
Copy link
Contributor

@paulredmond paulredmond commented Aug 28, 2017

I reported an issue in #20793 where a -fa was defined for the factory shortcut. Two letter shortcuts won't work.

This removes the -f shortcut for --force on the make:model command and defines the -f flag as a shortcut for factory.

As a user I feel like I'd want a factory more than using --force and the verbose force is common in other CLI tools. Using make:model -f feels more intuitive for the factory and less surprises.

You can see some discussion around it in #20798.

Closes #20793 and #20798.

Moves the `-f` flag as a shortcut for `--factory`. The `--force` option
is probably less used and does not have a shortcut.
@srmklive
Copy link
Contributor

I am not in favor of this. If we have to remove the f short code, we may need to remove it everywhere in the framework where its referenced.

@paulredmond
Copy link
Contributor Author

paulredmond commented Aug 28, 2017

I am not in favor of this. If we have to remove the f short code, we may need to remove it everywhere in the framework where its referenced.

I couldn't find anywhere in the framework where -f is a shortcut for --force

@paulredmond paulredmond changed the title Replace the force shortcut with factory Replace the force shortcut with factory on the make:model command Aug 28, 2017
@devcircus
Copy link
Contributor

Looks like f is referenced in #19932.

@paulredmond
Copy link
Contributor Author

Looks like f is referenced in #19932.

@browner12 might have more to say on #19932

@browner12
Copy link
Contributor

again, when I made this PR to 5.4, the factory option did not exist, so I simply when with f as the single letter short code.

now that we have a conflict, I agree with @paulredmond that factory will be put to much more use than force, so factory should get the preference for the single letter code.

running other artisan commands, including

php artisan help migrate

shows precedent for force only using the long form and omitting the short code.

@paulredmond paulredmond changed the title Replace the force shortcut with factory on the make:model command [5.5] Replace the force shortcut with factory on the make:model command Aug 28, 2017
@taylorotwell taylorotwell merged commit a1e126b into laravel:master Aug 28, 2017
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

5 participants