Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Warning: Parameter 1 to ldap_user_user_presave() expected to be a reference, value given in Drupal\Core\Extension\ModuleHandler->invokeAll() (line 393 of core/lib/Drupal/Core/Extension/ModuleHandler.php).
•Warning: Parameter 1 to ldap_user_user_update() expected to be a reference, value given in Drupal\Core\Extension\ModuleHandler->invokeAll() (line 393 of core/lib/Drupal/Core/Extension/ModuleHandler.php).
Comment | File | Size | Author |
---|---|---|---|
#19 | interdiff-2727653-19.patch | 8.48 KB | grahl |
#10 | wrong_parameters_in-2727653-10.patch | 17.58 KB | queenvictoria |
Comments
Comment #2
grahlThe patch updates the helper functions for the current format, no guarantees that the dependent functionality actually works.
Comment #3
grahlNext patch for further issues
Comment #4
grahlAttached is an additional patch which fixes issues with the insert hook. Due to the number of dependent patches I'm having trouble producing a combined patch, please apply #3 and #4 sequentially. Should you merge other issues in the meantime into -dev, I can of course produce an updated single patch.
Comment #5
larowlanPlease import the FQDN with a use statement and use the short class name.
Can you type-hint this too
We can use $user->isNew() here
Can you type-hint here too
these two are back to front
Let's type-hint this to UserInterface
Let's remove this while we're here
Comment #6
grahlThanks for your feedback larowlan, updated combined patch is attached. I added a few more hints while I was at it plus the error from ldap_help. I presume you wanted UserInterface on all user hooks? I'm not 100% certain what the difference there is but harmonized them as such.
Comment #7
grahlMinor update to ldap_help, I missed an l().
Comment #8
grahlComment #9
grahlSorry, one last thing, runs fine for me now.
Comment #10
queenvictoria CreditAttribution: queenvictoria at Holly commentedI've rerolled this after https://www.drupal.org/node/2726479. Could someone take a look? It was a lot of manual work.
Comment #18
queenvictoria CreditAttribution: queenvictoria at Holly commentedComment #19
grahlThanks for the effort, the patch looks fine to me with three minor issues:
- RouteMatchInterface is declared absolutely in ldap_user_help()
- $user->id == 0 is used instead of $user->isAnonymous()
- ldap_authentication_show_reset_pwd() no longer has a hint, but I'm not sure if that even is a full user class
Attached is a diff between a) patch #9 before phpcbf was committed and phpcbf manually run afterwards and b) patch #12 applied to 8.x-3.x from today, where you can see those.
Comment #21
grahlCommitted per feedback in #2730841 based on patch #10 with the first two points I mentioned above. Also added two more type hints.