Skip to content

Conversation

iamgergo
Copy link
Contributor

@iamgergo iamgergo commented Feb 24, 2023

This PR changes the default command:name based on the current app namespace and the command class name.


I know there is a --command option, but – at least for me – it feels a bit more streamlined generating a default command name based on the given class.

For example the php artisan make:command MigrateOldDb will generate $signature = 'app:migrate-old-db'.


Right now, it uses the application namespace. So, when changing from the default App namespace, the generated command signature will change as well. For example if the base namespace is Laravel\Forge, the generated command signature will be laravel-forge:migrate-old-db.

To simplify this, we might just use the app: prefix, since by using the --command option, the command name can be changed easily.


I didn't find tests related to the make:* commands. Am I missing something? If you're willing to merge, I would gladly add some tests as well.

Thanks.

@taylorotwell taylorotwell merged commit 3b7f6d0 into laravel:10.x Feb 25, 2023
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