From: Côme Chilliet Date: Mon, 4 Feb 2019 11:09:51 +0000 (+0100) Subject: Mark ldap_control_paged_result and ldap_control_paged_result_response as deprecated X-Git-Tag: php-7.4.0alpha1~1131 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d93ce1795979e31255717fd770a2f0e901c06081;p=php Mark ldap_control_paged_result and ldap_control_paged_result_response as deprecated These functions have serious limitations and may confuse users. Same operations can be done using the new ldap control system in search operations. --- diff --git a/NEWS b/NEWS index fb8b0fcc65..6068331cba 100644 --- 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) diff --git a/UPGRADING b/UPGRADING index 415e22740d..c394f2b82e 100644 --- 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 ======================================== diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 56ff52da06..f58b09acaa 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -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 }; diff --git a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt b/ext/ldap/tests/ldap_control_paged_results_variation1.phpt index cd189ebf09..76084cfb4b 100644 --- a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt +++ b/ext/ldap/tests/ldap_control_paged_results_variation1.phpt @@ -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) { diff --git a/ext/ldap/tests/ldap_control_paged_results_variation2.phpt b/ext/ldap/tests/ldap_control_paged_results_variation2.phpt index 7b1715c21b..6b7eb35537 100644 --- a/ext/ldap/tests/ldap_control_paged_results_variation2.phpt +++ b/ext/ldap/tests/ldap_control_paged_results_variation2.phpt @@ -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) { diff --git a/ext/ldap/tests/ldap_control_paged_results_variation3.phpt b/ext/ldap/tests/ldap_control_paged_results_variation3.phpt index 24eae9615f..0099b1f9a1 100644 --- a/ext/ldap/tests/ldap_control_paged_results_variation3.phpt +++ b/ext/ldap/tests/ldap_control_paged_results_variation3.phpt @@ -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) { diff --git a/ext/ldap/tests/ldap_parse_result_controls.phpt b/ext/ldap/tests/ldap_parse_result_controls.phpt index 711507f6c0..8ce2328d2f 100644 --- a/ext/ldap/tests/ldap_parse_result_controls.phpt +++ b/ext/ldap/tests/ldap_parse_result_controls.phpt @@ -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)