You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!$passport->hasBadge(PasswordCredentials::class)) {
56
55
thrownew \LogicException(sprintf('LDAP authentication requires a passport containing password credentials, authenticator "%s" does not fulfill these requirements.', $event->getAuthenticator()::class));
@@ -72,6 +71,16 @@ public function onCheckPassport(CheckPassportEvent $event)
@@ -104,8 +113,11 @@ public function onCheckPassport(CheckPassportEvent $event)
104
113
thrownewBadCredentialsException('The presented password is invalid.');
105
114
}
106
115
116
+
if ($nonLdapUserWithoutLdapPasswordAttribute) {
117
+
trigger_deprecation('symfony/ldap', '6.4', 'Authenticate a user that is not an instance of %s is deprecated and won\'t be the default behavior anymore in 7.0. Use the %s attribute to keep this behavior.', LdapUser::class, WithLdapPassword::class);
@@ -46,6 +46,10 @@ public function __construct(string $ldapServiceId, string $dnString = '{user_ide
46
46
trigger_deprecation('symfony/ldap', '6.2', 'Using "{username}" parameter in LDAP configuration is deprecated, consider using "{user_identifier}" instead.');
47
47
}
48
48
$this->queryString = $queryString;
49
+
$this->resolved = $resolved;
50
+
if (false === $this->resolved) {
51
+
trigger_deprecation('symfony/ldap', '6.4', 'Passing "false" as resolved initial value is deprecated, use "true" instead.');
52
+
}
49
53
}
50
54
51
55
publicfunctiongetLdapServiceId(): string
@@ -75,6 +79,8 @@ public function getQueryString(): ?string
75
79
76
80
publicfunctionmarkResolved(): void
77
81
{
82
+
trigger_deprecation('symfony/ldap', '6.4', '%s is deprecated and will be removed in 7.0. %s is intended to bear LDAP information and doesn\'t need to be resolved anymore.', __METHOD__, __CLASS__);
$this->expectDeprecation('Since symfony/ldap 6.4: Authenticate a user that is not an instance of Symfony\Component\Ldap\Security\LdapUser is deprecated and won\'t be the default behavior anymore in 7.0. Use the Symfony\Component\Ldap\Attribute\WithLdapPassword attribute to keep this behavior.');
@@ -86,7 +108,7 @@ public function testInvalidLdapServiceId()
86
108
$this->expectExceptionMessage('Cannot check credentials using the "not_existing_ldap_service" ldap service, as such service is not found. Did you maybe forget to add the "ldap" service tag to this service?');
$this->expectDeprecation('Since symfony/ldap 6.4: Passing "false" as resolved initial value is deprecated, use "true" instead.');
28
+
29
+
newLdapBadge('foo');
30
+
}
31
+
32
+
/**
33
+
* @group legacy
34
+
*/
35
+
publicfunctiontestDeprecationOnMarkAsResolved()
36
+
{
37
+
$this->expectDeprecation('Since symfony/ldap 6.4: Symfony\Component\Ldap\Security\LdapBadge::markResolved is deprecated and will be removed in 7.0. Symfony\Component\Ldap\Security\LdapBadge is intended to bear LDAP information and doesn\'t need to be resolved anymore.');
0 commit comments