-
Notifications
You must be signed in to change notification settings - Fork 69
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
split into symfony-cmf/chain-router and symfony-cmf/dynamic-router #274
Comments
Just wondering: What's the use case for having a chain router without a dynamic router? Are there other router implementations I am not aware of? Or do you want to support creating a completely different individual router per project? And is that something people already do? |
i expect some people to have implemented https://github.com/symfony/symfony/blob/6.1/src/Symfony/Component/Routing/RouterInterface.php with their own custom logic. e.g. to bridge into a legacy application, or for a much simpler thing than dynamic router. technically, the 2 parts in this repository have no direct dependency in either direction. the chain router is generic, and the dynamic router would work just fine without the chain router (probably rather in a non symfony-full-stack context). |
If that legacy application already has a router and multiple controllers, maybe that would be the case. Not sure if that would be applicable e.g. for someone migrating from a Silex app. In the case of Contao CMS, we used a simple catch all route (with our custom router loader) in the regular Symfony router when we moved to Symfony initially. It provided all we needed, it just always forwarded to the same controller which then did run the legacy router. We then started actually using the DynamicRouter because it was exactly what we needed: to load dynamic router from database into the routing system. I would never have thought about using the ChainRouter separately 🤷 |
there is at least one application using only the chain router: https://twitter.com/SnakeAAS/status/1526843448644489216 even if most people will install both, i think we would benefit from the added clarity of splitting the repository. |
splitting this into 2 repositories would make the purpose of each repository clearer. the chain router is only a few classes, and shares no code with the dynamic router. this would be a clear benefit for users only wanting the chain router. (most people using the dynamic router probably also want to use chain router to be able to still use configured routing in addition to dynamic)
questions:
The text was updated successfully, but these errors were encountered: