schmittjoh / JMSI18nRoutingBundle

Allows you to internationalize your routing
http://jmsyst.com/bundles/JMSI18nRoutingBundle
358 stars 159 forks source link

Too many Routes ? #171

Closed AntoineLemaire closed 7 years ago

AntoineLemaire commented 8 years ago

In my application, I got lot of locales (nearly 40), according to this calculation, I got lot of routes :

(nb_of_Locales * nb_of_routes) + nb_of_routes + 16 = nb_total_of_routes

(16 is the number of routes for symfony _profiler, _configuration and _twig)

For each other routes, I got this kind of routes (here, example with 2 locales, but I got ~40):

fr_FR_en_FR_RG_homepage
fr_FR__RG__homepage
en_FR__RG__homepage

Actually, I've just realise that if my nb_total_of_routes exceeds 32 760 routes, it's fails.

I tested it on a new symfony project, with just 1 bundle, 1 controller, 1 action, with lot, lot of routes

    /**
     * @Route("/1", name="homepage1")
     * @Route("/2", name="homepage2")
     * @Route("/3", name="homepage3")
    [...]
     * @Route("/1000", name="homepage1000")
     */
    public function indexAction(Request $request)
    {
        echo $this->generateUrl('homepage1');
        exit;
    }

The Exception is this one :

Unable to generate a URL for the named route "homepage1" as such route does not exist.

If I delete 100 routes, it's works again.

Anyone had same issue?