Skip to content
New issue

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

[7.x] Fix compiled route actions without a namespace #32512

Merged
merged 1 commit into from
Apr 23, 2020
Merged

[7.x] Fix compiled route actions without a namespace #32512

merged 1 commit into from
Apr 23, 2020

Conversation

riasvdv
Copy link
Contributor

@riasvdv riasvdv commented Apr 23, 2020

Currently when using invokeable controllers in actions, using compiled routes will not work properly.

For example

action(\Spatie\MailcoachSesFeedback\SesWebhookController::class)

Will look in the compiled routes for a controller Spatie\MailcoachSesFeedback\SesWebhookController because of the trim here https://github.com/laravel/framework/blob/7.x/src/Illuminate/Routing/UrlGenerator.php#L480

But inside the compiled routes, the route gets saved as \Spatie\MailcoachSesFeedback\SesWebhookController

So to correctly match the compiled routes against the action we want, we also have to trim that backslash when comparing.

@GrahamCampbell GrahamCampbell changed the title [7.x] Fixes compiled route actions without a namespace [7.x] Fix compiled route actions without a namespace Apr 23, 2020
@taylorotwell taylorotwell merged commit 4e6b788 into laravel:7.x Apr 23, 2020
@riasvdv riasvdv deleted the fix-compiled-route-namespacing branch April 26, 2020 12:27
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.

3 participants