Adding $listen array to base event service provider #7495
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm in the process of hacking away the default service provider structure in a new L5 build since I'm not a big fan of declaring all of my events in a single place. While doing this, I ran across a weird thing...not sure if it should be counted as a bug.
In app.php, I replaced
App\Providers\EventServiceProviderwithIlluminate\Foundation\Support\Providers\EventServiceProvider, but when it gets here:https://github.com/laravel/framework/blob/5.0/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php#L23
..it gets angry that
$this->listenisn't an array. An easy fix would be to just define that$listenproperty onIlluminate\Foundation\Support\Providers\EventServiceProvider, but I'm not sure if what I'm doing is condoned behavior. As it stands, I have to create anEventServiceProviderclass with just an empty$listenproperty in it, which seems a bit of a waste. Thanks!