Skip to content

Route not found with UTF-8 parameter name #41909

@TeLiXj

Description

@TeLiXj

Symfony version(s) affected: 5.3.2 (at least)

Description
Routes with an UTF-8 parameter name can't be found.

How to reproduce
In YAML

informes:
    path: /informes/{año}
    controller: App\Controller\InformesController::anual

or attributes

#[Route("/informes/{año}", name: "informes")]
public function anual(string $año)
{
    dd($año);
}

Possible Solution
I don't know, I suppose that is a regression because I remember using this on Symfony 2 many years ago.

Additional context
I have tried with YAML, annotations and attributes and only in the last 5.3 version.
Any route with UTF-8 characters works fine, only fails with UTF-8 parameters name.
The routing.yaml have

framework:
    router:
        utf8: true

And add utf8: true to route options doesn't work either

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions