Skip to content

Commit

Permalink
Fix event:list shows non-registered events (#31444)
Browse files Browse the repository at this point in the history
  • Loading branch information
4refael authored Feb 12, 2020
1 parent d811c47 commit 1b6484e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/EventListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function getEvents()
$events = [];

foreach ($this->laravel->getProviders(EventServiceProvider::class) as $provider) {
$providerEvents = array_merge_recursive($provider->discoverEvents(), $provider->listens());
$providerEvents = array_merge_recursive($provider->shouldDiscoverEvents() ? $provider->discoverEvents() : [], $provider->listens());

$events = array_merge_recursive($events, $providerEvents);
}
Expand Down

0 comments on commit 1b6484e

Please sign in to comment.