Description
Symfony version(s) affected: 4.1.x
Description
We know that UrlGenerator is cached on Symfony. Code is generated by PhpGeneratorDumper in Routing component. We can easily see that if $name
arg is null and $locale
exists in context (_locale parameter), RouteNotFoundException will not be thrown.
How to reproduce
Easy, install skeleton, install translations and call dump($this->container->get('router')->generate(null));
, you will see "Undefined index: .en"
Possible Solution
I already write a fix but... I see that PhpGeneratorDumper is greatly improved on master, so what I can do ? Purpose my fix on 4.1 ? (Feature code only exists from 4.1 not before) Or we simply wait 4.2 release and code will fallback to 4.1 with branch strategy ?