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.
Attaching a patch that fixes them.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2022207-user-to-userinterface-8.patch | 5.23 KB | pcambra |
#1 | 2022207-user-to-userinterface-d8.patch | 5.86 KB | pcambra |
user-to-userinterface-d8.patch | 6.1 KB | pcambra | |
Comments
Comment #1
pcambraIt should be actually \Drupal\user\UserInterface
Comment #2
jhodgdonThis seems reasonable to me, and the documentation syntax is correct. Our documentation/coding standards do say to use interfaces in favor of classes whenever possible... But maybe one of the maintainers of the user module can comment on the accuracy of doing that here?
Comment #3
BerdirLooks good to me.
There are a lot more $account and $user variables, arguments which aren't documented at all yet or possibly still as Drupal\user\User and all kinds of broken things. I'm not sure if we should fix that here too, that might end up being a bigger patch or if we should simply make incremental improvements (fine with me, also less conflicts with other, more important patches)
Comment #4
pcambraTagging
Comment #5
jhodgdonLet's leave this issue as it is now. Thanks for the review, Berdir -- I'll get this one committed soon.
Regarding other spots... If someone wants to file a "meta" issue with a title something like:
[meta] User variables should be documented as UserInterface not Plugin\Core\User
and reference this as a sub-issue, that would not be a bad idea. As a bonus, a grep through core for references to Drupal\user\Plugin\Core\Entity\User in documentation would help us figure out the scope.
Comment #6
pcambra#2023033: [meta] User variables should be documented as UserInterface not Plugin\Core\User
Comment #7
jhodgdonThe patch no longer applies in
core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageAwareCombinationTest.php
Comment #8
pcambraHere we go
Comment #9
jhodgdonThanks! Committed to 8.x.