We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems that classFromFile doesn't resolve the class name correctly from packages. Also, might be related to #28187 and #28121.
classFromFile
Listeners
<?php declare(strict_types=1); namespace My\Package; use Illuminate\Foundation\Support\Providers\EventServiceProvider; class EventsProvider extends EventServiceProvider { public function shouldDiscoverEvents(): bool { return true; } public function discoverEventsWithin(): array { return [ __DIR__.'/Listeners' ]; } }
php artisan event:list
Events won't be discovered because classFromFile will return Vendor\my\package\Listeners\ListenerName instead of My\Package\Listeners\MyListener.
Vendor\my\package\Listeners\ListenerName
My\Package\Listeners\MyListener
https://github.com/laravel/framework/blob/7.x/src/Illuminate/Foundation/Events/DiscoverEvents.php#L75
The error is supressed with a continue
continue
https://github.com/laravel/framework/blob/7.x/src/Illuminate/Foundation/Events/DiscoverEvents.php#L47
I'm wondering, is this going to be supported eventually?
The text was updated successfully, but these errors were encountered:
Event discovery is only available for your app atm. If you want this to be supported feel free to open an issue on the ideas repo.
Sorry, something went wrong.
No branches or pull requests
Description:
It seems that
classFromFile
doesn't resolve the class name correctly from packages.Also, might be related to #28187 and #28121.
Steps To Reproduce:
Listeners
folderphp artisan event:list
no events loadedEvents won't be discovered because
classFromFile
will returnVendor\my\package\Listeners\ListenerName
instead ofMy\Package\Listeners\MyListener
.https://github.com/laravel/framework/blob/7.x/src/Illuminate/Foundation/Events/DiscoverEvents.php#L75
The error is supressed with a
continue
https://github.com/laravel/framework/blob/7.x/src/Illuminate/Foundation/Events/DiscoverEvents.php#L47
I'm wondering, is this going to be supported eventually?
The text was updated successfully, but these errors were encountered: