Fix canonicalize depreciation

This commit is contained in:
Yassine Guedidi 2023-12-24 20:29:11 +01:00
parent 3caf65865b
commit a351b0aada
2 changed files with 2 additions and 2 deletions

View file

@ -668,7 +668,7 @@ class ConfigController extends AbstractController
*/ */
public function setLocaleAction(Request $request, ValidatorInterface $validator, $language = null) public function setLocaleAction(Request $request, ValidatorInterface $validator, $language = null)
{ {
$errors = $validator->validate($language, (new LocaleConstraint())); $errors = $validator->validate($language, (new LocaleConstraint(['canonicalize' => true])));
if (0 === \count($errors)) { if (0 === \count($errors)) {
$request->getSession()->set('_locale', $language); $request->getSession()->set('_locale', $language);

View file

@ -98,7 +98,7 @@ class ContentProxy
$errors = $this->validator->validate( $errors = $this->validator->validate(
$value, $value,
(new LocaleConstraint()) (new LocaleConstraint(['canonicalize' => true]))
); );
if (0 === \count($errors)) { if (0 === \count($errors)) {