Hi everyone.
Côme Bernigaud and myself are currently cleaning up the LDAP-Extension
(Well, Côme is doing the hard work and I'm trying to assist in some
way). We would like to bring it in line with a more recent version of
the OpenLDAP-lib. Currently the plan is to require OpenLDAP 2.4 as the
minimum version to build ext/ldap against. This is on a very good way [1].
But in said OpenLDAP-library the ldap_sort-function already has been
marked as deprecated [2]. Therefore we'd like to at least mark PHPs
ldap_sort function as deprecated also.
The current rewrite will make it possible to later use the server-sided
sort functionality so there will be only limited need for the current
(client sided) ldap_sort function.
As it's a BC-break to remove the ldap_sort function will we have to
setup an RFC for that? Or is it a plain "mark it deprecated in PHP7 and
throw it away in PHP8" kind of decission? And will it be possible to get
that marked deprecated in 7 at all?
Thanks for your help in getting this right.
Cheers
Andreas
[1] https://github.com/php/php-src/pull/1357
[2]
http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=include/ldap.h;h=c05489766510af132e562a60418fc27d5f2aae50;hb=HEAD#l2018
,,,
(o o)
+---------------------------------------------------------ooO-(_)-Ooo-+
| Andreas Heigl |
| mailto:andreas@heigl.org N 50°22'59.5" E 08°23'58" |
| http://andreas.heigl.org http://hei.gl/wiFKy7 |
+---------------------------------------------------------------------+
| http://hei.gl/root-ca |
+---------------------------------------------------------------------+
Hi Andreas,
-----Original Message-----
From: Andreas Heigl [mailto:andreas@heigl.org]
Sent: Wednesday, June 24, 2015 5:40 PM
To: internals@lists.php.net
Cc: Côme BERNIGAUD
Subject: [PHP-DEV] Deprecating ldap_sortHi everyone.
Côme Bernigaud and myself are currently cleaning up the LDAP-Extension
(Well, Côme is doing the hard work and I'm trying to assist in some
way). We would like to bring it in line with a more recent version of
the OpenLDAP-lib. Currently the plan is to require OpenLDAP 2.4 as the
minimum version to build ext/ldap against. This is on a very good way [1].But in said OpenLDAP-library the ldap_sort-function already has been
marked as deprecated [2]. Therefore we'd like to at least mark PHPs
ldap_sort function as deprecated also.The current rewrite will make it possible to later use the server-sided
sort functionality so there will be only limited need for the current
(client sided) ldap_sort function.As it's a BC-break to remove the ldap_sort function will we have to
setup an RFC for that? Or is it a plain "mark it deprecated in PHP7 and
throw it away in PHP8" kind of decission? And will it be possible to get
that marked deprecated in 7 at all?
I've a few questions to this. Can it be implemented with non deprecated symbols? Or maybe, can the server side sort not be done with the same function, as it's probably the same job? Or it will be really not required? Any info about the plans on the openldap side to remove the deprecated symbols (AFAIR those are kept already for years)?
We're currently don't know, how wide this function is used and how much it would break. In general, deprecating it if there's a strong reason, could be sufficient. If there's a small possibility to keep this function, we should use it. Fe maybe it could kept and enabled with a configure option, that way it'll be still usable.
Any feedback from the ldap users were appreciated here, as well.
Regards
Anatol
Le 25/06/2015 17:56, Anatol Belski a écrit :
I've a few questions to this. Can it be implemented with non deprecated symbols? Or maybe, can the server side sort not be done with the same function, as it's probably the same job? Or it will be really not required? Any info about the plans on the openldap side to remove the deprecated symbols (AFAIR those are kept already for years)?
No, it can’t be implemented without deprecated symbol, neither with
server side sort.
Here is the workflow:
call to ldap_search
call to ldap_sort
call to get the results (for instance ldap_get_entries)
Server sort would have to be set before the search itself. Other tools
like php array sorting features will take place after the results.
So, this function have no easy drop in replacement, we’ve looked into
that. I also asked on openldap mailing list.
But it is useless as it can be replaced by either server side sort or
classic PHP array sorting functions.
We're currently don't know, how wide this function is used and how much it would break. In general, deprecating it if there's a strong reason, could be sufficient. If there's a small possibility to keep this function, we should use it. Fe maybe it could kept and enabled with a configure option, that way it'll be still usable.
It’s mainly a proxy to an openldap function which is deprecated since at
least 2007. And the function is useless and easily replacable by other
PHP functions.
Any feedback from the ldap users were appreciated here, as well.Regards
Anatol
Côme
Hi Anatol.
Côme already replied to the technical aspects of what we are trying to do.
Am 25.06.15 um 17:56 schrieb Anatol Belski:
Hi Andreas,
-----Original Message-----
From: Andreas Heigl [mailto:andreas@heigl.org]
Sent: Wednesday, June 24, 2015 5:40 PM
To: internals@lists.php.net
Cc: Côme BERNIGAUD
Subject: [PHP-DEV] Deprecating ldap_sortHi everyone.
Côme Bernigaud and myself are currently cleaning up the LDAP-Extension
(Well, Côme is doing the hard work and I'm trying to assist in some
way). We would like to bring it in line with a more recent version of
the OpenLDAP-lib. Currently the plan is to require OpenLDAP 2.4 as the
minimum version to build ext/ldap against. This is on a very good way [1].But in said OpenLDAP-library the ldap_sort-function already has been
marked as deprecated [2]. Therefore we'd like to at least mark PHPs
ldap_sort function as deprecated also.The current rewrite will make it possible to later use the server-sided
sort functionality so there will be only limited need for the current
(client sided) ldap_sort function.As it's a BC-break to remove the ldap_sort function will we have to
setup an RFC for that? Or is it a plain "mark it deprecated in PHP7 and
throw it away in PHP8" kind of decission? And will it be possible to get
that marked deprecated in 7 at all?I've a few questions to this. Can it be implemented with non deprecated symbols? Or maybe, can the server side sort not be done with the same function, as it's probably the same job? Or it will be really not required? Any info about the plans on the openldap side to remove the deprecated symbols (AFAIR those are kept already for years)?
We're currently don't know, how wide this function is used and how much it would break. In general, deprecating it if there's a strong reason, could be sufficient. If there's a small possibility to keep this function, we should use it. Fe maybe it could kept and enabled with a configure option, that way it'll be still usable.
I might have not expressed myself correctly about the deprecated thingy.
I was actually refering to whether it would be possible to raise an
E_DEPRECATED
for calling ldap_sort. If we could bring that into PHP7.0
we would be able to remove it from PHP7.1 and get a clean codebase
without any functions marked as deprecated in the underlying lib.
If we'd have to wait for PHP7.1 for the E_DEPRECATED
that would mean we
can remove the deprecated function_calls at the earliest in PHP7.2.
That's a long timescale ;)
Any feedback from the ldap users were appreciated here, as well.
I don't use it ;)
I've checked phpLdapAdmin (not used), GOsa (not used) and Zend\Ldap
(sadly used, but I can rewrite that part) but that are just three libs
out there out of so many self-written scripts....
Cheers
Andreas
Regards
Anatol
--
,,,
(o o)
+---------------------------------------------------------ooO-(_)-Ooo-+
| Andreas Heigl |
| mailto:andreas@heigl.org N 50°22'59.5" E 08°23'58" |
| http://andreas.heigl.org http://hei.gl/wiFKy7 |
+---------------------------------------------------------------------+
| http://hei.gl/root-ca |
+---------------------------------------------------------------------+
Hi guys,
Kalle and me have now agreed, that the deprecation is feasible. In a normal case it would require an RFC, but this particular case wouldn't profit from it anyway. If the dependency library doesn't provide the symbols required, there's nothing to discuss or decide.
-----Original Message-----
From: Andreas Heigl [mailto:andreas@heigl.org]
Sent: Thursday, June 25, 2015 8:58 PM
To: Anatol Belski; internals@lists.php.net
Cc: 'Côme BERNIGAUD'; 'Kalle Sommer Nielsen'; 'Ferenc Kovacs'
Subject: Re: [PHP-DEV] Deprecating ldap_sortHi Anatol.
Côme already replied to the technical aspects of what we are trying to do.
Am 25.06.15 um 17:56 schrieb Anatol Belski:
Hi Andreas,
-----Original Message-----
From: Andreas Heigl [mailto:andreas@heigl.org]
Sent: Wednesday, June 24, 2015 5:40 PM
To: internals@lists.php.net
Cc: Côme BERNIGAUD
Subject: [PHP-DEV] Deprecating ldap_sortHi everyone.
Côme Bernigaud and myself are currently cleaning up the LDAP-Extension
(Well, Côme is doing the hard work and I'm trying to assist in some
way). We would like to bring it in line with a more recent version of
the OpenLDAP-lib. Currently the plan is to require OpenLDAP 2.4 as the
minimum version to build ext/ldap against. This is on a very good way [1].But in said OpenLDAP-library the ldap_sort-function already has been
marked as deprecated [2]. Therefore we'd like to at least mark PHPs
ldap_sort function as deprecated also.The current rewrite will make it possible to later use the server-sided
sort functionality so there will be only limited need for the current
(client sided) ldap_sort function.As it's a BC-break to remove the ldap_sort function will we have to
setup an RFC for that? Or is it a plain "mark it deprecated in PHP7 and
throw it away in PHP8" kind of decission? And will it be possible to get
that marked deprecated in 7 at all?I've a few questions to this. Can it be implemented with non deprecated
symbols? Or maybe, can the server side sort not be done with the same
function, as it's probably the same job? Or it will be really not required? Any info
about the plans on the openldap side to remove the deprecated symbols (AFAIR
those are kept already for years)?We're currently don't know, how wide this function is used and how much it
would break. In general, deprecating it if there's a strong reason, could be
sufficient. If there's a small possibility to keep this function, we should use it. Fe
maybe it could kept and enabled with a configure option, that way it'll be still
usable.I might have not expressed myself correctly about the deprecated thingy.
I was actually refering to whether it would be possible to raise an
E_DEPRECATED
for calling ldap_sort. If we could bring that into PHP7.0
we would be able to remove it from PHP7.1 and get a clean codebase
without any functions marked as deprecated in the underlying lib.
Yes, I've understood what you do. I was working/reviewing some ext/ldap patches previously, and also I'm building the windows dependencies for ext/ldap. And I think your work is very much appreciated - it brings PHP in a good position with the future, also with the todays distributions which already compile openldap without deprecated symbols.
If we'd have to wait for PHP7.1 for the
E_DEPRECATED
that would mean we
can remove the deprecated function_calls at the earliest in PHP7.2.
That's a long timescale ;)Any feedback from the ldap users were appreciated here, as well.
I don't use it ;)
I've checked phpLdapAdmin (not used), GOsa (not used) and Zend\Ldap
(sadly used, but I can rewrite that part) but that are just three libs
out there out of so many self-written scripts....
Yeah, deprecating will give enough time to update these parts. Especially if you jump in and do a PR.
Regards
Anatol
Zitat von Andreas Heigl andreas@heigl.org:
Hi Anatol.
Côme already replied to the technical aspects of what we are trying to do.
Am 25.06.15 um 17:56 schrieb Anatol Belski:
Hi Andreas,
-----Original Message-----
From: Andreas Heigl [mailto:andreas@heigl.org]
Sent: Wednesday, June 24, 2015 5:40 PM
To: internals@lists.php.net
Cc: Côme BERNIGAUD
Subject: [PHP-DEV] Deprecating ldap_sortHi everyone.
Côme Bernigaud and myself are currently cleaning up the LDAP-Extension
(Well, Côme is doing the hard work and I'm trying to assist in some
way). We would like to bring it in line with a more recent version of
the OpenLDAP-lib. Currently the plan is to require OpenLDAP 2.4 as the
minimum version to build ext/ldap against. This is on a very good way [1].But in said OpenLDAP-library the ldap_sort-function already has been
marked as deprecated [2]. Therefore we'd like to at least mark PHPs
ldap_sort function as deprecated also.The current rewrite will make it possible to later use the server-sided
sort functionality so there will be only limited need for the current
(client sided) ldap_sort function.As it's a BC-break to remove the ldap_sort function will we have to
setup an RFC for that? Or is it a plain "mark it deprecated in PHP7 and
throw it away in PHP8" kind of decission? And will it be possible to get
that marked deprecated in 7 at all?I've a few questions to this. Can it be implemented with non
deprecated symbols? Or maybe, can the server side sort not be done
with the same function, as it's probably the same job? Or it will
be really not required? Any info about the plans on the openldap
side to remove the deprecated symbols (AFAIR those are kept already
for years)?We're currently don't know, how wide this function is used and how
much it would break. In general, deprecating it if there's a strong
reason, could be sufficient. If there's a small possibility to keep
this function, we should use it. Fe maybe it could kept and enabled
with a configure option, that way it'll be still usable.I might have not expressed myself correctly about the deprecated thingy.
I was actually refering to whether it would be possible to raise an
E_DEPRECATED
for calling ldap_sort. If we could bring that into PHP7.0
we would be able to remove it from PHP7.1 and get a clean codebase
without any functions marked as deprecated in the underlying lib.If we'd have to wait for PHP7.1 for the
E_DEPRECATED
that would mean we
can remove the deprecated function_calls at the earliest in PHP7.2.
That's a long timescale ;)Any feedback from the ldap users were appreciated here, as well.
I don't use it ;)
I've checked phpLdapAdmin (not used), GOsa (not used) and Zend\Ldap
(sadly used, but I can rewrite that part) but that are just three libs
out there out of so many self-written scripts....
FWIW Net_LDAP and its successors Net_LDAP2 and Horde_Ldap don't use
ldap_sort anymore since 2006 either.
--
Jan Schneider
The Horde Project
http://www.horde.org/
https://www.facebook.com/hordeproject
Hi all.
Am 25.06.15 um 17:56 schrieb Anatol Belski:
Any feedback from the ldap users were appreciated here, as well.
- https://github.com/smalot/ldap uses ldap_sort, issue is raised
- https://github.com/matgou/GorgLdapOrmBundle uses ldap_sort, informed
the maintainer via email
Cheers
Andreas
--
,,,
(o o)
+---------------------------------------------------------ooO-(_)-Ooo-+
| Andreas Heigl |
| mailto:andreas@heigl.org N 50°22'59.5" E 08°23'58" |
| http://andreas.heigl.org http://hei.gl/wiFKy7 |
+---------------------------------------------------------------------+
| http://hei.gl/root-ca |
+---------------------------------------------------------------------+