PHP RFC: LDAP controls
- Version: 0.1
- Date: 2017-07-13
- Author: Côme Chilliet, firstname.lastname@example.org
- Status: Draft
- First Published at: http://wiki.php.net/rfc/ldap_controls
This RFC is an attempt at providing a complete and practical support for controls in php-ldap. People should be able to create controls, send them with a request, and get the controls from the results as well.
There is a patch for this from 2012: https://bugs.php.net/bug.php?id=61921
In the actual state, controls can be set or get with ldap_get_option and ldap_set_option, in which case they are represented by associative arrays like this:
array( 'oid' => <string>, 'iscritical' => <boolean>, 'value' => <ber encoded value> )
The value is directly the ber encoded value, and PHP provides no easy way to encode/decode ber encoding directly.
The other way controls can be used is through ldap_control_paged_results/ldap_control_paged_result_response for the control for paged results.
Backward Incompatible Changes
ldap_control_paged_results and ldap_control_paged_result_response may get deprecated. Using ldap_get_option and ldap_set_option with LDAP_OPT_SERVER_CONTROLS or LDAP_OPT_CLIENT_CONTROLS may not work exactly the same.
Proposed PHP Version(s)
PHP 7.3 or PHP 8
Describe any new constants so they can be accurately and comprehensively explained in the PHP documentation.
Make sure there are no open issues when the vote starts!
Unaffected PHP Functionality
List existing areas/features of PHP that will not be changed by the RFC.
This helps avoid any ambiguity, shows that you have thought deeply about the RFC's impact, and helps reduces mail list noise.
Support for controls should be added directly in ldap_search and others.
Proposed Voting Choices
Include these so readers know where you are heading and can discuss the proposed voting options.
State whether this project requires a 2/3 or 50%+1 majority (see voting)
Patches and Tests
Links to any external patches and tests go here.
After the project is implemented, this section should contain
- the version(s) it was merged to
- a link to the git commit(s)
- a link to the PHP manual entry for the feature
- a link to the language specification section (if any)
Keep this updated with features that were discussed on the mail lists.