-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Router service name should be configurable #69
Comments
WHY would the router not properly aliased to the interface? if that is the case, the application would not pick that router up for routing either and thus would not match? thats the whole point of how routing works in mezzio: https://github.com/mezzio/mezzio-router/blob/4.0.x/src/RouteCollectorFactory.php Everything basically uses that service aliased to the interface, so the cors component should do that as well. I would suggest to streamline those projects you have issues with rather than adding workarounds in components. |
We have existing form for this: https://github.com/mezzio/mezzio-helpers/blob/5.17.x/src/UrlHelperFactory.php In my case, I have 2 applications running out of the same code-base, each with a different router instance in the container along with a different set of routes. |
Interesting. I'd rather ensure having proper configuration when bootstrapping but as there is already this kind of magic, go ahead. 🤷🏼♂️ |
I don't think I'd call it magic though - it's just configuration for "what service id gives me a router?", defaulting to the accepted norm. |
If the router service name was configurable, we wouldn't have to re-implement this factory when the router you want to use is not aliased to
RouterInterface::class
mezzio-cors/src/Service/ConfigurationLocatorFactory.php
Line 22 in a61a344
The text was updated successfully, but these errors were encountered: