Skip to content

Add --except-vendor and --only-vendor to artisan list#42732

Closed
jwpage wants to merge 2 commits intolaravel:9.xfrom
jwpage:artisan_list_except_vendor
Closed

Add --except-vendor and --only-vendor to artisan list#42732
jwpage wants to merge 2 commits intolaravel:9.xfrom
jwpage:artisan_list_except_vendor

Conversation

@jwpage
Copy link
Copy Markdown
Contributor

@jwpage jwpage commented Jun 9, 2022

This PR replaces the default Symfony ListCommand with an extended ListCommand that supports newly introduced --except-vendor and --only vendor flags. This is similar to the functionality available in the artisan route:list command.

  • Running artisan list normally will include all commands.
  • Running artisan list --except-vendor will include all commands except those defined by vendors (including Laravel)
  • Running artisan list --only-vendor will only include commands that have been defined by vendors (including Laravel)

The inclusion of the --except-vendor flag in particular will make it easy for developers coming into a new Laravel project to see what commands are available that are specific to that project.

@jwpage jwpage marked this pull request as ready for review June 9, 2022 12:01
@jwpage jwpage changed the title Add --except-vendor and --only-vendor to artisan list Add --except-vendor and --only-vendor to artisan list Jun 9, 2022
@fgaroby
Copy link
Copy Markdown
Contributor

fgaroby commented Jun 9, 2022

what is the difference with #42549?

@dennisprudlo
Copy link
Copy Markdown
Contributor

@fgaroby This PR is for the list of commands. #42549 is for the list of routes.

@fgaroby
Copy link
Copy Markdown
Contributor

fgaroby commented Jun 9, 2022

My bad: I didn't read well

@taylorotwell
Copy link
Copy Markdown
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!

If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

@taylorotwell
Copy link
Copy Markdown
Member

I usually solve this issue without any additional code by just prefixing all my commands with "app"... then you can just do "php artisan list app"

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.

4 participants