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

[9.x] Refactor register commands in artisan service #44257

Merged
merged 3 commits into from
Sep 22, 2022
Merged

[9.x] Refactor register commands in artisan service #44257

merged 3 commits into from
Sep 22, 2022

Conversation

baselrabia
Copy link
Contributor

@baselrabia baselrabia commented Sep 22, 2022

with 10 line of code, i could remove 364 line from the artisan service provider by refactoring the registerCommands method,
the default behavior to register a command is to create a singleton instance from the abstract class, meanwhile the abstract class have a dependency so you have to write the propitiate registered function in the service
this will help other contributors when they are adding new command to the console,
if the command don't have dependency so they don't have to write the register function.

@taylorotwell taylorotwell merged commit 2a0bff6 into laravel:9.x Sep 22, 2022
@GrahamCampbell GrahamCampbell changed the title refactor: register commands in artisan service [9.x] Refactor register commands in artisan service Nov 6, 2022
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