Bug #78389 [Nab]: ldap_control_paged_result deprecated - A bug or feature?
| From: | call dot user dot func at gmail dot com | Date: | Tue, 13 Aug 2019 15:26:30 +0000 |
| Subject: | Bug #78389 [Nab]: ldap_control_paged_result deprecated - A bug or feature? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222229@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78389&edit=1
ID: 78389
User updated by: call dot user dot func at gmail dot com
Reported by: call dot user dot func at gmail dot com
Summary: ldap_control_paged_result deprecated - A bug or
feature?
Status: Not a bug
Type: Bug
Package: LDAP related
Operating System: Windows 10
PHP Version: 7.4.0beta2
Assigned To: mcmic
Block user comment: N
Private report: N
New Comment:
Thanks. Ive already integrated this behaviour with ldap_search and the new controls. Can be closed.
Previous Comments:
------------------------------------------------------------------------
[2019-08-13 07:26:39] mcmic@php.net
The comment above is correct.
You can look at example 5 on this page to have an example of the new syntax: https://www.php.net/manual/en/ldap.examples-controls.php
ldap_control_paged_result was setting controls for all future searches with no way of going back to
no paging.
------------------------------------------------------------------------
[2019-08-09 04:53:36] requinix@php.net
This is intentional, and will be covered by the 7.4 changelog and migration guide.
https://github.com/php/php-src/commit/d93ce1795979e31255717fd770a2f0e901c06081
I'm no LDAP expert but according to the commit message, those functions "have serious
limitations and may confuse users". Pagination is apparently covered by ldap_search() and its
$serverctrls parameter.
https://www.php.net/manual/en/function.ldap-search.php
https://www.php.net/manual/en/ldap.controls.php
------------------------------------------------------------------------
[2019-08-09 04:45:09] call dot user dot func at gmail dot com
Description:
------------
Starting with PHP 7.4 the function "ldap_control_paged_result" and
"ldap_control_paged_result_response" is deprecated.
I have read the deprecations RFC from 7.4 and even 7.3 and i cannot find that should be deprecated.
https://wiki.php.net/rfc/deprecations_php_7_4
https://wiki.php.net/rfc/deprecations_php_7_3
If this is intended, please provide us with some information how we should work without that 2
functions to archive the same result.
Thank you.
Test script:
---------------
<?php
// make sure you have extension=ldap enabled in php.ini
ldap_control_paged_result(null, 0);
ldap_control_paged_result_response(null, null);
Expected result:
----------------
Funtions should not be deprecated
Actual result:
--------------
They are deprecated
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78389&edit=1