Skip to content

[5.8] Add event:list command - #28085

Merged
taylorotwell merged 2 commits into
laravel:5.8from
themsaid:eventListCommand
Apr 1, 2019
Merged

[5.8] Add event:list command#28085
taylorotwell merged 2 commits into
laravel:5.8from
themsaid:eventListCommand

Conversation

@themsaid

@themsaid themsaid commented Apr 1, 2019

Copy link
Copy Markdown
Member

This PR adds a event:list artisan command which lists all the events discovered in your application and the list of listeners.

Screen Shot 2019-04-01 at 8 27 40 PM

$events = [];

foreach ($this->laravel->getProviders(EventServiceProvider::class) as $provider) {
$providerEvents = array_merge($provider->discoverEvents(), $provider->listens());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we be calling $provider->discoveredEvents() here? I am seeing discovered events in event:list even with event auto-discovery disabled.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping @themsaid

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.

4 participants