Skip to content

Commit 278bbe7

Browse files
Merge branch '5.4' into 6.0
* 5.4: [Ldap] Fix test Remove flex from appveyor
2 parents 8b4cff2 + ef3cc76 commit 278bbe7

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

Tests/Security/CheckLdapCredentialsListenerTest.php

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -205,29 +205,31 @@ private function createListener()
205205
}
206206
}
207207

208-
class TestAuthenticator implements AuthenticatorInterface
209-
{
210-
public function supports(Request $request): ?bool
208+
if (interface_exists(AuthenticatorInterface::class)) {
209+
class TestAuthenticator implements AuthenticatorInterface
211210
{
212-
}
211+
public function supports(Request $request): ?bool
212+
{
213+
}
213214

214-
public function authenticate(Request $request): Passport
215-
{
216-
}
215+
public function authenticate(Request $request): Passport
216+
{
217+
}
217218

218-
/**
219-
* @internal for compatibility with Symfony 5.4
220-
*/
221-
public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface
222-
{
223-
}
219+
/**
220+
* @internal for compatibility with Symfony 5.4
221+
*/
222+
public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface
223+
{
224+
}
224225

225-
public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response
226-
{
227-
}
226+
public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response
227+
{
228+
}
228229

229-
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response
230-
{
230+
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response
231+
{
232+
}
231233
}
232234

233235
public function createToken(Passport $passport, string $firewallName): TokenInterface

0 commit comments

Comments
 (0)