From 34a65419c7cdb6089698a24cfbcb11851b0cb4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 28 May 2023 01:57:49 +0200 Subject: [PATCH] Use attributes as route provider (instead of annotations) --- config/routes.yaml | 6 ------ config/routes/annotations.yaml | 8 +++++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/config/routes.yaml b/config/routes.yaml index 980c9508..777ade11 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -1,9 +1,3 @@ -controllers: - resource: - path: ../src/Controller/ - namespace: App\Controller - type: attribute - # Redirect every url without an locale to the locale of the user/the global base locale scan_qr: diff --git a/config/routes/annotations.yaml b/config/routes/annotations.yaml index bd9ea273..72d7c9bc 100644 --- a/config/routes/annotations.yaml +++ b/config/routes/annotations.yaml @@ -1,6 +1,8 @@ controllers: - resource: ../../src/Controller/ - type: annotation + resource: + path: ../../src/Controller/ + namespace: App\Controller + type: attribute prefix: '{_locale}' defaults: @@ -11,4 +13,4 @@ controllers: kernel: resource: ../../src/Kernel.php - type: annotation + type: attribute