Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
[BC\Break] Remove Filter subcomponent
Browse files Browse the repository at this point in the history
Now use symfony/polyfill-php56 for compatibility with PHP <5.6
  • Loading branch information
Maks3w committed Feb 12, 2016
1 parent 653faa9 commit cf97250
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 250 deletions.
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ Ldap driver:
See [Create a custom hydrator](Resources/doc/cookbook/custom_hydrator.md) for more details.
- [BC Break] This bundle is now PSR-3 (Logger) compliant. Typehints has been updated in favor of `Psr\Log\LoggerInterface`.
- [BC Break] Remove `FR3D\LdapBundle\Ldap\Converter`
- [BC Break] Remove `escapeValue()` and `unescapeValue()` methods from `LdapManagerInterface` and `LdapManager`.
- [Feature] `FR3D\LdapBundle\Ldap\Filter\FilterValue` has been added for to provide the same functionality as PHP 5.6
[ldap_escape()](http://php.net/manual/function.ldap-escape.php)
- [BC Break] Remove `escapeValue()` and `unescapeValue()` methods from `LdapManagerInterface` and `LdapManager`. Now use
PHP 5.6 [ldap_escape()](http://php.net/manual/function.ldap-escape.php) polyfill.

Config:
- [BC Break] Added `fr3d_ldap.user.usernameAttribute` for indicate the attribute which holds the username.
Expand Down
22 changes: 0 additions & 22 deletions Ldap/Filter/FilterInterface.php

This file was deleted.

49 changes: 0 additions & 49 deletions Ldap/Filter/FilterValue.php

This file was deleted.

81 changes: 0 additions & 81 deletions Ldap/Filter/ldap_escape.php

This file was deleted.

3 changes: 1 addition & 2 deletions Ldap/LdapManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ protected function buildFilter(array $criteria, $condition = '&')
{
$filters = [];
$filters[] = $this->params['filter'];
$filter = new Filter\FilterValue();
foreach ($criteria as $key => $value) {
$value = $filter->filter($value);
$value = ldap_escape($value, '', LDAP_ESCAPE_FILTER);
$filters[] = sprintf('(%s=%s)', $key, $value);
}

Expand Down
49 changes: 0 additions & 49 deletions Tests/Ldap/Filter/FilterInterfaceTestTrait.php

This file was deleted.

44 changes: 0 additions & 44 deletions Tests/Ldap/Filter/FilterValueTest.php

This file was deleted.

1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"psr/log": "~1.0",
"symfony/config": "~2.1",
"symfony/dependency-injection": "~2.1",
"symfony/polyfill-php56": "^1.1",
"symfony/security": "~2.1",
"symfony/security-bundle": "~2.1",
"zendframework/zend-ldap": "~2"
Expand Down

0 comments on commit cf97250

Please sign in to comment.