-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix: Commands::discoverCommands() loads incorrect classname #5849
Conversation
This PR basically does two parts:
In 2, I understand the change will be more "intelligent" as it no longer guesses the class name from the path but rather checks the file itself to get the class name. This is +1 for me. For 1, I don't understand why the need to filter out the directories? Maybe because the method is |
Very simple. If it contains directories, spark does not work.
|
Ah, yes! I missed the |
Description
Fixes #5818
Supersedes #5834
Cannot write a unit test for
Cannot declare class ..., because the name is already in use
.To check manually using this repo:
"App\\": "app/"
in theautoload.psr4
section in the root composer.jsoncomposer dump -o
to regenerate the class map.'MyNameSpace' => APPPATH . 'ThirdParty/MyFolder'
inConfig\Autoload::$psr4
array.php spark make:command TeseCommand --namespace MyNameSpace
php spark
. This will now error.fix-discoverCommands
).php spark
. No errors should appear.Checklist: