-
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
[5.5] Make seeders chainable #22288
[5.5] Make seeders chainable #22288
Conversation
What is the profit from it? Wouldn't it be better to make: $this->call([
SeederA::class,
SeederB::class,
SeederC::class,
]); Or: $this->calls([
SeederA::class,
SeederB::class,
SeederC::class,
]); |
Can't you already do
|
@devcircus yes you can. I'm not really seeing the benefit of chaining, but oh well, it's already in. |
if no one can really see the benefit to this, why bloat the software? |
what @a-komarev proposes its already implemented. Seeder docs |
@lbm-trentm The PR creator, people liking the PR and Taylor seem to disagree with your premise. |
@deleugpn nobody said that we are disagree with this PR. Question of reason was raised and this behavior was available already, as @nachofassini pointed to docs. One minor notice that in first comment bad example is provided. It should be: $this
->call(SeederA::class)
->call(SeederB::class)
->call(SeederC::class); |
to those grumbling about bloating the software without any benefit, this pr adds just 2 extra words to the actual code, |
Lingchi - Death by 1000 cuts. Mostly trolling, but our initial point was this was a solution to a problem that already had a solution. It's in now, so /shrug |
Right now you must call seeders in
DatabaseSeeder
like this:The changes in this PR will enable to do the above like this