Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tests/Maker/MakeAuthenticatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public function getTestDetails(): \Generator
];

yield 'auth_login_form_no_entity_custom_username_field' => [$this->createMakerTest()
->addExtraDependencies('doctrine/annotations', 'twig', 'symfony/form')
->addExtraDependencies('twig', 'symfony/form')
->run(function (MakerTestRunner $runner) {
$this->makeUser($runner, 'userEmail', false);

Expand Down Expand Up @@ -193,7 +193,7 @@ public function getTestDetails(): \Generator
];

yield 'auth_login_form_user_not_entity_with_hasher' => [$this->createMakerTest()
->addExtraDependencies('doctrine/annotations', 'twig', 'symfony/form')
->addExtraDependencies('twig', 'symfony/form')
->run(function (MakerTestRunner $runner) {
$this->makeUser($runner, 'email', false);

Expand Down Expand Up @@ -282,6 +282,11 @@ private function runLoginTest(MakerTestRunner $runner, string $userIdentifier, b
]
);

// @legacy - In 5.4 tests, we need to tell Symfony to look for route attributes in `src/Controller`
if ('60000' > $runner->getSymfonyVersion()) {
$runner->copy('make-auth/annotations.yaml', 'config/routes/annotations.yaml');
}

// plaintext password: needed for entities, simplifies overall
$runner->modifyYamlFile('config/packages/security.yaml', function (array $config) {
if (isset($config['when@test']['security']['password_hashers'])) {
Expand Down
7 changes: 7 additions & 0 deletions tests/fixtures/make-auth/annotations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
controllers:
resource: ../../src/Controller/
type: annotation

kernel:
resource: ../../src/Kernel.php
type: annotation