-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
refactor: [Router] extract a class for auto-routing #5877
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this conceptually. This PR is larger than what I want to review on mobile, but it looks like mostly just move methods to the new class.
I think this is overall a "simplification", in the it distinguishes two features and leaves each in its own class, but @lonnieezell might want to weigh in as well.
e302a3d
to
ddb816b
Compare
Does anybody know why these tests fail?
|
I found the root cause: 5e5f3fc |
I would like to merge this PR. Maintainers, please at least comment on the following parts of the PR:
Reviews are of course welcome. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no preference with naming methods. As long as it is obvious what a method does, then it's fine with me. Minor comments only on the bug fix.
Co-authored-by: Mostafa Khudair <59371810+mostafakhudair@users.noreply.github.com>
… placeholder as a method Example: $routes->setAutoRoute(true); $routes->cli('hello/(:segment)', 'Home::$1'); Navigate to http://localhost:8080/home - remove RouteCollection in AutoRouter - improve TestCase
This method is used by Toolbar.
In setUp() Event simulate is set to true, so it should be restored in tearDown().
Co-authored-by: John Paul E. Balandan, CPA <51850998+paulbalandan@users.noreply.github.com>
Thank you, @paulbalandan ! |
Description
AutoRouter
for auto-routingRouteCollection::getRegisteredControllers()
I want to introduce a new, more secure auto-routing.
In this PR, I extract the AutoRouter class from the Router class in order to be able to easily replace the functionality.
Thoughts:
I wanted to avoid instantiating AutoRouter when auto routing is off. But the current implementation mixes the processing of defined routes and auto routes. So it was impossible.Checklist: