Bonjour.
Il suffit de regarder dans la documentation de Symfony et il y est marqué :
Routes can be configured in YAML, XML and PHP. All formats provide the same features and performance, so choose the one you prefer. If you choose PHP annotations, run this command once in your app to add support for them:
composer require annotations.
Puis :
Source : Routing (Symfony Docs) » Creating Routes.