]> granicus.if.org Git - php/commitdiff
Mark ldap_control_paged_result and ldap_control_paged_result_response as deprecated
authorCôme Chilliet <mcmic@php.net>
Mon, 4 Feb 2019 11:09:51 +0000 (12:09 +0100)
committerCôme Chilliet <mcmic@php.net>
Mon, 4 Feb 2019 11:20:51 +0000 (12:20 +0100)
These functions have serious limitations and may confuse users.
Same operations can be done using the new ldap control system in search
 operations.

NEWS
UPGRADING
ext/ldap/ldap.c
ext/ldap/tests/ldap_control_paged_results_variation1.phpt
ext/ldap/tests/ldap_control_paged_results_variation2.phpt
ext/ldap/tests/ldap_control_paged_results_variation3.phpt
ext/ldap/tests/ldap_parse_result_controls.phpt

diff --git a/NEWS b/NEWS
index fb8b0fcc65d016b54a7da08b4f12d3b4950dd32e..6068331cba0d62d52acce49d7b40d3ed2155ef19 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -41,6 +41,9 @@ PHP                                                                        NEWS
   . Changed default of $variant parameter of idn_to_ascii() and idn_to_utf8().
     (cmb)
 
+- LDAP:
+  . Deprecated ldap_control_paged_result_response and ldap_control_paged_result
+
 - Opcache:
   . Implemented preloading RFC: https://wiki.php.net/rfc/preload. (Dmitry)
 
index 415e22740d2729cf5725776789c91b84d3713129..c394f2b82e9dc45f9a7d3bb271a4299f76f96292 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -144,6 +144,10 @@ PHP 7.4 UPGRADE NOTES
     non-string patterns are interpreted as ASCII codepoints. In PHP 8 the
     pattern will be interpreted as a string instead.
 
+- LDAP:
+  . ldap_control_paged_result_response and ldap_control_paged_result are deprecated.
+    Pagination controls can be sent along with ldap_search instead.
+
 ========================================
 5. Changed Functions
 ========================================
index 56ff52da06648d13bdb0f7eb8ed6c92f9545bde9..f58b09acaafad834a3dd38ade2806e2a308c9330 100644 (file)
@@ -4864,8 +4864,8 @@ static const zend_function_entry ldap_functions[] = {
 #endif
 
 #ifdef LDAP_CONTROL_PAGEDRESULTS
-       PHP_FE(ldap_control_paged_result,                                                       arginfo_ldap_control_paged_result)
-       PHP_FE(ldap_control_paged_result_response,              arginfo_ldap_control_paged_result_response)
+       PHP_DEP_FE(ldap_control_paged_result,                           arginfo_ldap_control_paged_result)
+       PHP_DEP_FE(ldap_control_paged_result_response,          arginfo_ldap_control_paged_result_response)
 #endif
        PHP_FE_END
 };
index cd189ebf096ca82dae55e4b04d4b96854f4a3ca4..76084cfb4b7db1e7bb90a0da7b8f309cb3d14476 100644 (file)
@@ -31,6 +31,7 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
 remove_dummy_data($link, $base);
 ?>
 --EXPECTF--
+Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d
 bool(true)
 resource(%d) of type (ldap result)
 array(2) {
index 7b1715c21b70bec5bda5cc18dc5fff8ef2a66f71..6b7eb3553744d771200693a1358477347a411572 100644 (file)
@@ -31,6 +31,7 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
 remove_dummy_data($link, $base);
 ?>
 --EXPECTF--
+Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d
 bool(true)
 resource(%d) of type (ldap result)
 array(3) {
index 24eae9615f6ddd3ac19e9a68e3466a29b2c89a2a..0099b1f9a1dcd9b72c531cdcabd3a9b0f6927935 100644 (file)
@@ -36,6 +36,11 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
 remove_dummy_data($link, $base);
 ?>
 --EXPECTF--
+Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d
+
+Deprecated: Function ldap_control_paged_result_response() is deprecated in %s.php on line %d
+
+Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d
 bool(true)
 resource(%d) of type (ldap result)
 array(3) {
index 711507f6c02fd9bcf46920507bca48842a7ae55c..8ce2328d2feaa3fadb33194b7ef37ff4ecea69d8 100644 (file)
@@ -37,6 +37,7 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
 remove_dummy_data($link, $base);
 ?>
 --EXPECTF--
+Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d
 bool(true)
 resource(%d) of type (ldap result)
 bool(true)