Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Open
Description
Symfony version(s) affected
7.3.0
Description
I'm trying to use the newalias
introduced on the#[Route]
attribute in 7.3, but getting unexpected results.
How to reproduce
with configuration
# config/routing.yamlgeneral:resource:'../src/Controller/'type:attributeprefix:nl_NL:/nl_BE:/fr_FR:/fr_BE:/fren_US:/host:nl_NL:'%nl_host%'nl_BE:'%be_host%'fr_FR:'%fr_host%'fr_BE:'%be_host%'en_US:'%en_host%'
using
#[Route(path: ['nl_NL' =>'/','nl_BE' =>'/','fr_FR' =>'/','fr_BE' =>'/','en_US' =>'/',], name:'default', methods: ['GET'], alias: ['my-alias'])]
yieldsTarget route "default" for alias "my-alias" does not exist.
from the template where i try to generateurl(app.current_route)
but using
#[Route(path:'/', name:'default', methods: ['GET'], alias: ['my-alias'])]
yieldsUnable to generate a URL for the named route "my-alias" as such route does not exist.
later on in the same template when trying to generateurl('my-alias')
Possible Solution
No response
Additional Context
No response