This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Ldap/Adapter
Fabien Potencier 2bd27ffd1b feature #29495 [Ldap] Implement pagination (kevans91)
This PR was squashed before being merged into the 4.3-dev branch (closes #29495).

Discussion
----------

[Ldap] Implement pagination

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yno
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | N/A (cannot test at the moment)
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Implement pagination support in the ExtLdap adapter. In a more abstract sense, other adapters should use a query's pageSize option to determine if pagination is being needed. Pagination is required in some environments that frequently query for more results than the remote server is willing to allow.

BC break was avoided by having Query->getResource() return the first result, if available.

A small hack is included to work around php-ldap failing to reset pagination properly; the LDAP_OPT_SERVER_CONTROLS are sent with every request, whether pagination has been 'reset' by sending a 0-page request or not. This appears to be a php-ldap bug that will need to be addressed there, but we can work-around it for now by doing both: setting the 0-page option *and* unsetting the OID directly. This was resulting in odd results, like queries returning 0 results or returning < server_page_size results for a query that should have returned >= server_page_size.

Commits
-------

b96347485c [Ldap] Implement pagination
2019-03-31 10:40:08 +02:00
..
ExtLdap feature #29495 [Ldap] Implement pagination (kevans91) 2019-03-31 10:40:08 +02:00
AbstractConnection.php switched array() to [] 2019-01-16 10:39:14 +01:00
AbstractQuery.php [Ldap] Implement pagination 2019-03-31 10:39:25 +02:00
AdapterInterface.php switched array() to [] 2019-01-16 10:39:14 +01:00
CollectionInterface.php Improved the Ldap Component 2016-02-11 18:54:23 +01:00
ConnectionInterface.php Improved the Ldap Component 2016-02-11 18:54:23 +01:00
EntryManagerInterface.php [LDAP] fixed typos and CS 2019-03-31 10:31:43 +02:00
QueryInterface.php Merge branch '3.2' 2017-01-12 20:06:21 +01:00