@@ -164,7 +164,7 @@ public function getTestDetails(): \Generator
164164 ];
165165
166166 yield 'auth_login_form_no_entity_custom_username_field ' => [$ this ->createMakerTest ()
167- ->addExtraDependencies ('doctrine/annotations ' , ' twig ' , 'symfony/form ' )
167+ ->addExtraDependencies ('twig ' , 'symfony/form ' )
168168 ->run (function (MakerTestRunner $ runner ) {
169169 $ this ->makeUser ($ runner , 'userEmail ' , false );
170170
@@ -193,7 +193,7 @@ public function getTestDetails(): \Generator
193193 ];
194194
195195 yield 'auth_login_form_user_not_entity_with_hasher ' => [$ this ->createMakerTest ()
196- ->addExtraDependencies ('doctrine/annotations ' , ' twig ' , 'symfony/form ' )
196+ ->addExtraDependencies ('twig ' , 'symfony/form ' )
197197 ->run (function (MakerTestRunner $ runner ) {
198198 $ this ->makeUser ($ runner , 'email ' , false );
199199
@@ -282,6 +282,11 @@ private function runLoginTest(MakerTestRunner $runner, string $userIdentifier, b
282282 ]
283283 );
284284
285+ // @legacy - In 5.4 tests, we need to tell Symfony to look for route attributes in `src/Controller`
286+ if ('60000 ' > $ runner ->getSymfonyVersion ()) {
287+ $ runner ->copy ('make-auth/annotations.yaml ' , 'config/routes/annotations.yaml ' );
288+ }
289+
285290 // plaintext password: needed for entities, simplifies overall
286291 $ runner ->modifyYamlFile ('config/packages/security.yaml ' , function (array $ config ) {
287292 if (isset ($ config ['when@test ' ]['security ' ]['password_hashers ' ])) {
0 commit comments