-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
laravel/framework 9.35+ action middleware not being resolved #199
Comments
I can confirm the same on one of my projects where I'm using a few actions |
😢 Thanks for raising this! I don't think there's anything Laravel Actions can do aside from making a PR to Laravel to relax that last if statement. |
Was issue created at laravel/framework ? |
Yes, in this PR: laravel/framework#44516 |
No, what I meant to say was. Was an issue logged with Laravel about this issue. |
Oh sorry. No, not yet, I've been trying to fix it on Laravel Actions first. I've been trying to hijack the middleware logic but I sadly end up running route middleware twice. See #200. |
I'm writing a PR for laravel/framework right now. |
I've done some debugging on my own. My conclusions
In short the __invoke is the problem |
That's not quite true. The |
And I was so proud for finding this. |
I've created a PR in |
PR merged on |
* add more middleware tests * fix AsJobSerializedTest * add empty getMiddleware to trigger controller middleware * Update composer.json * Fix tests * Try to downgrade pest * Try to downgrade orchestra * Update run-tests.yml * Update composer.json * Update run-tests.yml * Update run-tests.yml * Update composer.json
Fix merged and released as Let me know if you have any more issues. 🙏 |
Hello!
From
laravel/framework
9.35+ actions runasController
have a regression in behaviour.Controller middleware is not being resolved properly, leading to things like route model binding not working.
Due to:
laravel/framework@6cdf03e#diff-efe2a07687b9b821bbd99ae38a9329253f032e6df04bdea02bba9303a2b2beadL1084-R1103
Current workaround: make actions extend
Illuminate\Routing\Controller
.Not sure how best to proceed, I'm happy using the workaround mentioned above at the moment.
The text was updated successfully, but these errors were encountered: