summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2015-11-29 17:26:49 +0100
committerNicolas Grekas <nicolas.grekas@gmail.com>2015-11-29 17:26:49 +0100
commit7b07ea0cbd2ceb901b2b6bca0f6a76714285cd22 (patch)
treef23e2315b9068132b699372cd07389a438452270
parentf48bdc7c4234c9adc53c348f6a73f3bbd65991ba (diff)
parent713b72a42fc3a5d8bdc75dccda9959c7bb331486 (diff)
downloadsymfony-security-7b07ea0cbd2ceb901b2b6bca0f6a76714285cd22.zip
symfony-security-7b07ea0cbd2ceb901b2b6bca0f6a76714285cd22.tar.gz
symfony-security-7b07ea0cbd2ceb901b2b6bca0f6a76714285cd22.tar.bz2
Merge branch '2.8'
* 2.8: [Bridge/Doctrine+Ldap] Fix tests Marked the Ldap component as internal and removed Ldap constants polyfill Conflicts: src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
-rw-r--r--Core/Authentication/Provider/LdapBindAuthenticationProvider.php2
-rw-r--r--Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php3
-rw-r--r--Core/Tests/User/LdapUserProviderTest.php3
-rw-r--r--Core/User/LdapUserProvider.php2
4 files changed, 8 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/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
{
/**
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) {