Closed adamculp closed 5 years ago
I'm using this in a few projects as well. But I'm not really liking it for the default application, especially if you have a lot of routes. I prefer to have the default application routes in the config/routes.php file as it is in the release-3.0.0 branch.
For modules this solution is perfect though. I would rather see this in the zend-expressive-tooling package as an addition to creating a new module.
I can agree with that.
I think including it in the tooling for module:create, and possibly middleware:create, could be a good step.
Closing this in favor of https://github.com/zendframework/zend-expressive-tooling/issues/57
I've grown accustomed to using a RoutesDelegator.php in my v2 Expressive projects, and specified it as follows in the ConfigProvider.php
When creating an Expressive driven modular application it makes module specific routes easier to maintain. (Not sure of the implications for a flat application.)
What are the thoughts of including this in the skeleton starting with v3?
So, other than adding the 'delegators' key to the ConfigProvider.php as part of the getDependencies() return, we could add the RouteDelegator.php with something like:
Thoughts?