I cannot find any documentation on router changes for Joomla 4. Can anyone advise? It appears that placing a router.php file in the base directory for the component still works - although not in exactly the same way as for Joomla 3.
But Joomla components (e.g. com_banners) do not have a router.php in the base directory, instead having Router.php in src/Service. However, simply placing a similar Router.php file in src/Service in my own component seems to have no effect - it seems not to be activated. Does something have to be done to identify the router to Joomla? If so what and where? Is this preferred? Will the traditional router.php cease working at some point?
Also, can the same structure be used with Joomla 3.10? That is, can a component be built the same way to follow the new router convention and work in both Joomla 3.10 and 4.x?
I'd be grateful for any pointers.
services/provider.php
file? Does it provide an instance ofJoomla\CMS\Extension\ComponentInterface
?Joomla\CMS\MVC\Factory\MVCFactoryInterface
).Joomla\CMS\MVC\Factory\MVCFactory
andJoomla\CMS\MVC\Factory\LegacyFactory
) should provide valuable information.