Skip to content

Commit

Permalink
Mark ldap_control_paged_result and ldap_control_paged_result_response…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
Côme Chilliet committed Feb 4, 2019
1 parent 223d535 commit d93ce17
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NEWS
Expand Up @@ -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)

Expand Down
4 changes: 4 additions & 0 deletions UPGRADING
Expand Up @@ -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
========================================
Expand Down
4 changes: 2 additions & 2 deletions ext/ldap/ldap.c
Expand Up @@ -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
};
Expand Down
1 change: 1 addition & 0 deletions ext/ldap/tests/ldap_control_paged_results_variation1.phpt
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions ext/ldap/tests/ldap_control_paged_results_variation2.phpt
Expand Up @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions ext/ldap/tests/ldap_control_paged_results_variation3.phpt
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions ext/ldap/tests/ldap_parse_result_controls.phpt
Expand Up @@ -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)
Expand Down

0 comments on commit d93ce17

Please sign in to comment.