Skip to content

Commit d93ce17

Browse files
author
Côme Chilliet
committed
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.
1 parent 223d535 commit d93ce17

7 files changed

+17
-2
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ PHP NEWS
4141
. Changed default of $variant parameter of idn_to_ascii() and idn_to_utf8().
4242
(cmb)
4343

44+
- LDAP:
45+
. Deprecated ldap_control_paged_result_response and ldap_control_paged_result
46+
4447
- Opcache:
4548
. Implemented preloading RFC: https://wiki.php.net/rfc/preload. (Dmitry)
4649

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ PHP 7.4 UPGRADE NOTES
144144
non-string patterns are interpreted as ASCII codepoints. In PHP 8 the
145145
pattern will be interpreted as a string instead.
146146

147+
- LDAP:
148+
. ldap_control_paged_result_response and ldap_control_paged_result are deprecated.
149+
Pagination controls can be sent along with ldap_search instead.
150+
147151
========================================
148152
5. Changed Functions
149153
========================================

ext/ldap/ldap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4864,8 +4864,8 @@ static const zend_function_entry ldap_functions[] = {
48644864
#endif
48654865

48664866
#ifdef LDAP_CONTROL_PAGEDRESULTS
4867-
PHP_FE(ldap_control_paged_result, arginfo_ldap_control_paged_result)
4868-
PHP_FE(ldap_control_paged_result_response, arginfo_ldap_control_paged_result_response)
4867+
PHP_DEP_FE(ldap_control_paged_result, arginfo_ldap_control_paged_result)
4868+
PHP_DEP_FE(ldap_control_paged_result_response, arginfo_ldap_control_paged_result_response)
48694869
#endif
48704870
PHP_FE_END
48714871
};

ext/ldap/tests/ldap_control_paged_results_variation1.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
3131
remove_dummy_data($link, $base);
3232
?>
3333
--EXPECTF--
34+
Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d
3435
bool(true)
3536
resource(%d) of type (ldap result)
3637
array(2) {

ext/ldap/tests/ldap_control_paged_results_variation2.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
3131
remove_dummy_data($link, $base);
3232
?>
3333
--EXPECTF--
34+
Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d
3435
bool(true)
3536
resource(%d) of type (ldap result)
3637
array(3) {

ext/ldap/tests/ldap_control_paged_results_variation3.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
3636
remove_dummy_data($link, $base);
3737
?>
3838
--EXPECTF--
39+
Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d
40+
41+
Deprecated: Function ldap_control_paged_result_response() is deprecated in %s.php on line %d
42+
43+
Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d
3944
bool(true)
4045
resource(%d) of type (ldap result)
4146
array(3) {

ext/ldap/tests/ldap_parse_result_controls.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
3737
remove_dummy_data($link, $base);
3838
?>
3939
--EXPECTF--
40+
Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d
4041
bool(true)
4142
resource(%d) of type (ldap result)
4243
bool(true)

0 commit comments

Comments
 (0)