Closed kernusr closed 2 years ago
@nibra , can you answer why write code that depends on other libraries that are optional?
The router is used by WebApplication to gather all request information for the controller. The router is optional for the Application package as a whole, because it is not needed by the other Application flavours.
I am using the framework at work but not using a router However, the abstract application code contains the inclusion of a router For example: https://github.com/joomla-framework/application/blob/66fe4a557fe5b43a9f759b845160f80652e85b35/src/WebApplication.php#L14
But in composer.json, I do not see the router as required https://github.com/joomla-framework/application/blob/66fe4a557fe5b43a9f759b845160f80652e85b35/composer.json#L8
I see it in dev section (for tests to complete successfully) https://github.com/joomla-framework/application/blob/66fe4a557fe5b43a9f759b845160f80652e85b35/composer.json#L22
So what is my question?
Why is there deliberately dead code in the framework? If I do not use (I do not have to use) a router from Joomla Framework, then I have to implement all methods that are associated with a router. It will add a lot of unnecessary work.