Skip to content

[5.8] Replace first occurrence instead of last for event discovery - #28426

Merged
taylorotwell merged 1 commit into
laravel:5.8from
paul-thebaud:5.8
May 7, 2019
Merged

taylorotwell merged 1 commit into
laravel:5.8from
paul-thebaud:5.8

Conversation

@paul-thebaud

@paul-thebaud paul-thebaud commented May 6, 2019

Copy link
Copy Markdown
Contributor

This PR fix the previous PR about event discovery : #28421.

The goal is to replace only the first occurrence instead of the last one because this is not the correct behavior.
Here is an example where the previous PR will create a bug :
/app is the project directory.
/app/app/Listeners/app/FooListener.php is the listener file path.
In this example, the resolved class path was /app/app/Listeners/FooListener.php with the previous PR. This is incorrect as a namespace part is missing.

With this PR, the class is correctly resolved as /app/Listeners/app/FooListener.php.

@taylorotwell
taylorotwell merged commit 2b539a3 into laravel:5.8 May 7, 2019
@paul-thebaud

Copy link
Copy Markdown
Contributor Author

Thx @taylorotwell for the quick merge.

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.

2 participants