Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Ldap] Bypass the use ofldap_control_paged_result on PHP >= 7.3#38392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
lucasaba commentedOct 4, 2020
Side note: to test the component I've created an OpenLDAP instance on docker using latest osixia/openldap. TO make test working, I had to add Even with this configuration, some test fails with message It would be a good idea to have a docker environment prepared to test those methods....at least in order to have a common environment. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ldap_control_paged_result if PHP version is 8.0 o…ldap_control_paged_result on PHP >= 7.3Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please add types (arguments+return) on methods when possible.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedOct 5, 2020
I agree. We run such tests in |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
2458d2a tod332b30Comparenicolas-grekas commentedOct 7, 2020
Thank you@lucasaba. |
lucasaba commentedOct 7, 2020
Thanks to you all! Has been a pleasure and a precious lesson! |
After PRsymfony#38392 there is a little issue in the Symfony code base thatoccurs only for PHP 7.4 and PHP 8.0.This is related to issuesymfony#38874
After PRsymfony#38392 there is a little issue in the Symfony code base thatoccurs only for PHP 7.4 and PHP 8.0.This is related to issuesymfony#38874
After PRsymfony#38392 there is a little issue in the Symfony code base thatoccurs only for PHP 7.4 and PHP 8.0.This is related to issuesymfony#38874
After PRsymfony#38392 there is a little issue in the Symfony code base thatoccurs only for PHP 7.4 and PHP 8.0.This is related to issuesymfony#38874
This PR was merged into the 4.4 branch.Discussion----------[Ldap] Fix pagination| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |#38874| License | MIT| Doc PR | N/AThis replaces#38875 to fix a bug introduced by#38392Commits-------4fe0a6f Fix LDAP pagination
This PR was merged into the 4.4 branch.Discussion----------Fix critical extension when reseting paged control| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -The issue has been introduced here in#38392 and prevent performing an operation after fetched a paginated result => ldap throws an `Could not XXX: Critical extension is unavailable`At this line:https://github.com/symfony/symfony/pull/38392/files#diff-24b79f3ac1a99938f5acb158a450e38d30c1984a5d333b5b20f2c38a73d10e31L183, the previous code called `ldap_control_paged_result($con, 0);` using the default value (`false`) for the `$critical` argument.The replaced version always use `true`.This PR restore the previous behavior by using `false` when reseting the pagination.Commits-------a2b7476 Fix critical extension when reseting paged control
Uh oh!
There was an error while loading.Please reload this page.
As stated on#38352ldap_control_paged_result andldap_control_paged_result_response have been deprecated since PHP 7.4 and will be removed on PHP 8.0.
With this fix, Query uses serverctrls to handle LDAP results pagination.
Since
serverctrlswhere introduced in PHP 7.3 and they are the only way to circumvent the usage ofldap_control_paged_result, I've added a new Query class implementation which usesserverctrlsto control pagination.To do so I've also had to update the LDAP Adapter in order to use the new class if PHP version 7.3 or greater are found