Closed
Description
Is there a limit with the number of routes we can create ?
My application is using JMSI18nRoutingBundle, and we have more than 30 locales.
JMS create in app/cache/prod/appProdUrlGenerator.php
all routes for each locales in $declaredRoutes
I opened a ticket an issue on JMSI18nRoutingBundle (link), but it seems the issue is the same in symfony without JMSI18nRoutingBundle.
I just try to create a basic project, with 20 controllers, and foreach of them, on function with 2000 routes.
/**
* @Route("/1", name="homepage1")
* @Route("/2", name="homepage2")
* @Route("/3", name="homepage3")
[...]
* @Route("/2000", name="homepage2000")
*/
public function indexAction(Request $request)
{
echo $this->generateUrl('homepage1');
exit;
}
When number of routes approaches 32 760, echo $this->generateUrl('homepage1');
is failing :
Unable to generate a URL for the named route "homepage1" as such route does not exist.