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.4] Allow dependency injection on seeders run method. #15959

Merged
merged 1 commit into from
Oct 18, 2016

Conversation

guiwoda
Copy link
Contributor

@guiwoda guiwoda commented Oct 17, 2016

This makes Seeder classes look a lot more like how Command classes work: instead of using an abstract method with no parameters, implement a method that delegates the call to the DI container.

Should be 99.9% backwards compatible. Added a SeedCommandTest to be sure.
Also, used the __invoke magic method but never really invoked any seeder, so that could be changed as well.

@guiwoda guiwoda force-pushed the seeder_run_injection branch from a8d7bde to 8980477 Compare October 17, 2016 14:42
@guiwoda guiwoda force-pushed the seeder_run_injection branch from 8980477 to 32a389c Compare October 17, 2016 14:42
@taylorotwell taylorotwell merged commit 32a389c into laravel:master Oct 18, 2016
@taylorotwell
Copy link
Member

Thanks

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.

2 participants