-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[10.x] Update Kernel::load() to use same classFromFile
logic as events
#47327
Conversation
I don't feel we should do this. I don't think we should encourage people to move these files outside the default |
Why not? I work on a large application and we follow a DDD approach inside another namespace, there's no reason for an artificial restriction that all commands must be inside the I just updated the logic to be consistent with the logic already being used when auto-registering Listeners |
Note that this was just a quick, in-place edit, but longer term it might be a good idea to move this logic to a |
Thanks @taylorotwell! |
Reverted: #47377 |
I agree, I'm also using Laravel as my Infrastructure on a project that I use DDD and I was shocked that the commands for autoloading would be hardcoded to |
Closes #47312
Replaces the logic the
Console\Kernel
uses to parse classes from files with the same logic used by Events inDiscoverEvents::classFromFile()
---this allows commands outside theApp
namespace to be auto-registered if desired.Thanks!