-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Exclude method "middleware" from discovered routes #30
Conversation
Thanks! Could you add a test for this to prove that it works correctly? |
Hi, yes I can add some tests for this feature. But I cannot fix the fail check from PHPStan, is that okey? |
Only adding a test is ok! |
Dear contributor, because this pull request seems to be inactive for quite some time now, I've automatically closed it. If you feel this pull request deserves some attention from my human colleagues feel free to reopen it. |
Sorry it took me a while, but I added test cases. @freekmurze Could you open the pull request again, or should I make a new? |
Reopened this one |
I have added the test cases, should now be able to be merged. |
@freekmurze I've added test cases. |
It seems that the tests are failing. Could you take a look. Feel free to drop support for older Laravel versions if needed. |
I opted not to drop support for older Laravel versions. Instead, I adjusted the one test to skip execution if the Laravel version does not include the required interface. I have tested this locally with Laravel 8 and Laravel 11. |
Thanks! |
Description
In Laravel 11, an interface has been added that allows middleware to be defined via a method. This package, which automatically detects routes in controllers, should exclude this new method since it returns all middleware classes.
Changes
Reason
The new method in Laravel 11's controllers that returns all middleware classes should not be included in the automatic route detection, as it does not define actual routes.
Additional Notes
Please review the changes and provide any feedback or suggestions for improvement.
Thank you!