-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[9.x] Change class option to argument #35536
Conversation
I don't think this break is worth it? At the least, we should support both the old and new syntax for a few years. |
@GrahamCampbell I wouldn't think carrying both options for years is worth it. 😉 However, if it means the argument could be merged into 8.x, then I'm all for it. 😂 |
your option forces you to preserve a certain order of arguments, which can interfere with optional arguments. Therefore, the old syntax is still valid |
@jasonmccreary can you rebase with master? After that feel free to markt his PR as ready for review. Taylor doesn't sees draft PRs. |
@driesvints, no problem. Didn't realized I marked it as draft. 😅 |
d660c62
to
1523d4e
Compare
@Davidnadejdin not sure who your comment was intended for, however, neither the before nor after versions require ordering the parameters as far as I'm aware. |
I thought that you are proposing to globally change the way of passing arguments to commands, sorry |
Hmm, I'm also not sure I'm willing to take on the breaking change unless it has more clear user benefit. |
@taylorotwell would you be open to supporting both syntaxes as suggested by Graham. I feel this has user benefit in the obvious less keystrokes, but more importantly the symmetry with other artisan commands. I can't be the only Laravel developer to mistakenly type |
A long standing paper-cut for me has been the
--class
option for thedb:seed
command. Most other artisan commands accept an argument for the subject.This PR converts the
class
option to an argument. It has the same default (Database\Seeders\DatabaseSeeder
). Just saves on typing to improve the developer experience.Before
After