Symfony 5.1 route issue

I installed symfony 5.1.3 today and found the route configuration is something broken. I’m not sure if that is intended. But at least it’s different from symfony 4.4. I have the follow setting in 4.4 and it works fine.

homepage:
   path: 
      en-us: /
      others: /{_locale}/
   controller: AppControllerIndexController::homepage
   requirements:
      _locale: en-us|zh-cn|zh-hk

The above settings allow me to access domain.com and other mydomain.com/en-us, mydomain.com/zh-cn and mydomain.com/zh-hk successfully.

But now in symfony 5.1, the above setting does not work now. I believe the _locale with special meaning to the system maybe the root cause. Can anyone give me a help?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *