10000 Fix compatibility of ldap 6.0 with security 5.x · symfony/symfony@3110bc4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3110bc4

Browse files
committed
Fix compatibility of ldap 6.0 with security 5.x
1 parent afa6b85 commit 3110bc4

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

UPGRADE-6.0.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ Inflector
146146

147147
* The component has been removed, use `EnglishInflector` from the String component instead.
148148

149+
Ldap
150+
----
151+
152+
* Deprecate `LdapAuthenticator::createAuthenticatedToken()`, use `LdapAuthenticator::createToken()` instead
153+
149154
Lock
150155
----
151156

UPGRADE-7.0.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
UPGRADE FROM 6.x to 7.0
2+
=======================
3+
4+
Ldap
5+
-----
6+
7+
* Remove `LdapAuthenticator::createAuthenticatedToken()`, use `LdapAuthenticator::createToken()` instead

src/Symfony/Component/Ldap/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66

77
* Removed `LdapUser::getUsername()` method, use `getUserIdentifier()` instead
88
* Removed `LdapUserProvider::loadUserByUsername()` method, use `loadUserByIdentifier()` instead
9+
* Deprecate `LdapAuthenticator::createAuthenticatedToken()`, use `LdapAuthenticator::createToken()` instead
910

1011
5.3
1112
---

src/Symfony/Component/Ldap/Security/LdapAuthenticator.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
1919
use Symfony\Component\Security\Http\Authenticator\InteractiveAuthenticatorInterface;
2020
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
21+
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
2122
use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface;
2223
use Symfony\Component\Security\Http\EntryPoint\Exception\NotAnEntryPointException;
2324

@@ -64,6 +65,16 @@ public function authenticate(Request $request): Passport
6465
return $passport;
6566
}
6667

68+
/**
69+
* @deprecated since Symfony 6.0, use {@link createToken()} instead
70+
*/
71+
public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface
72+
{
73+
trigger_deprecation('symfony/ldap', '6.0', 'Method "%s()" is deprecated, use "%s::createToken()" instead.', __METHOD__, __CLASS__);
74+
75+
return $this->createToken($passport, $firewallName);
76+
}
77+
6778
public function createToken(Passport $passport, string $firewallName): TokenInterface
6879
{
6980
return $this->authenticator->createToken($passport, $firewallName);

0 commit comments

Comments
 (0)
0