From e7f58bf8385ecbec91149d711942a182746adeda Mon Sep 17 00:00:00 2001 From: Charles Sarrazin Date: Sat, 28 Nov 2015 23:09:12 +0100 Subject: Marked the Ldap component as internal and removed Ldap constants polyfill --- Core/Authentication/Provider/LdapBindAuthenticationProvider.php | 2 +- Core/User/LdapUserProvider.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Authentication/Provider/LdapBindAuthenticationProvider.php b/Core/Authentication/Provider/LdapBindAuthenticationProvider.php index fab7d80..adc42ef 100644 --- a/Core/Authentication/Provider/LdapBindAuthenticationProvider.php +++ b/Core/Authentication/Provider/LdapBindAuthenticationProvider.php @@ -74,7 +74,7 @@ class LdapBindAuthenticationProvider extends UserAuthenticationProvider $password = $token->getCredentials(); try { - $username = $this->ldap->escape($username, '', LdapClientInterface::LDAP_ESCAPE_DN); + $username = $this->ldap->escape($username, '', LDAP_ESCAPE_DN); $dn = str_replace('{username}', $username, $this->dnString); $this->ldap->bind($dn, $password); diff --git a/Core/User/LdapUserProvider.php b/Core/User/LdapUserProvider.php index ec699fc..988a595 100644 --- a/Core/User/LdapUserProvider.php +++ b/Core/User/LdapUserProvider.php @@ -57,7 +57,7 @@ class LdapUserProvider implements UserProviderInterface { try { $this->ldap->bind($this->searchDn, $this->searchPassword); - $username = $this->ldap->escape($username, '', LdapClientInterface::LDAP_ESCAPE_FILTER); + $username = $this->ldap->escape($username, '', LDAP_ESCAPE_FILTER); $query = str_replace('{username}', $username, $this->defaultSearch); $search = $this->ldap->find($this->baseDn, $query); } catch (ConnectionException $e) { -- cgit v1.1 From 713b72a42fc3a5d8bdc75dccda9959c7bb331486 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 29 Nov 2015 17:07:42 +0100 Subject: [Bridge/Doctrine+Ldap] Fix tests --- .../Authentication/Provider/LdapBindAuthenticationProviderTest.php | 3 +++ Core/Tests/User/LdapUserProviderTest.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php b/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php index f1b5c03..844bcef 100644 --- a/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php +++ b/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php @@ -16,6 +16,9 @@ use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\User\User; use Symfony\Component\Ldap\Exception\ConnectionException; +/** + * @requires extension ldap + */ class LdapBindAuthenticationProviderTest extends \PHPUnit_Framework_TestCase { /** diff --git a/Core/Tests/User/LdapUserProviderTest.php b/Core/Tests/User/LdapUserProviderTest.php index f56648b..9b126e9 100644 --- a/Core/Tests/User/LdapUserProviderTest.php +++ b/Core/Tests/User/LdapUserProviderTest.php @@ -14,6 +14,9 @@ namespace Symfony\Component\Security\Core\Tests\User; use Symfony\Component\Security\Core\User\LdapUserProvider; use Symfony\Component\Ldap\Exception\ConnectionException; +/** + * @requires extension ldap + */ class LdapUserProviderTest extends \PHPUnit_Framework_TestCase { /** -- cgit v1.1