From 11001fa4807758d3dce8269f4f3a6556ce3b972b Mon Sep 17 00:00:00 2001 From: Jesse Rushlow Date: Tue, 3 Jan 2023 04:23:02 -0500 Subject: [PATCH] [make:security:form-login] configure route attributes for 5.4 --- tests/Maker/Security/MakeFormLoginTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Maker/Security/MakeFormLoginTest.php b/tests/Maker/Security/MakeFormLoginTest.php index 4e1c90c21..a3c3bf4a7 100644 --- a/tests/Maker/Security/MakeFormLoginTest.php +++ b/tests/Maker/Security/MakeFormLoginTest.php @@ -103,6 +103,11 @@ public function getTestDetails(): \Generator private function runLoginTest(MakerTestRunner $runner): void { + if (60000 > $runner->getSymfonyVersion()) { + // @legacy - In 5.4 tests, we need to tell Symfony to look for the route attributes in `src/Controller` + $runner->copy('router-annotations.yaml', 'config/routes/annotations.yaml'); + } + $fixturePath = 'security/make-form-login/'; $runner->renderTemplateFile($fixturePath.'/LoginTest.php', 'tests/LoginTest.php', []);