Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Follow up for #1361228: Make the user entity a classed object
We need to revise documentation so that we can properly apply type hinting for code that deals with user entities.
Comment | File | Size | Author |
---|---|---|---|
#31 | 1537434_31.patch | 36.12 KB | cosmicdreams |
#27 | user_entity_type_hinting_27.patch | 34.23 KB | garphy |
#24 | user_entity_type_hinting_24.patch | 34.21 KB | socketwench |
#19 | user_entity_type_hinting_19.patch | 56.29 KB | cosmicdreams |
#17 | user_entity_type_hinting.patch | 33.69 KB | cosmicdreams |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedExperimental patch... Wonna see what happens with the bot :)
Comment #3
aspilicious CreditAttribution: aspilicious commentedReroll, will probably fail again. Have no idea why...
Comment #5
aspilicious CreditAttribution: aspilicious commentedOk after installing I found the nastyness...
global $user is still a std object so most functions get both instances of User and std object. Resulting into failures...
Comment #6
aspilicious CreditAttribution: aspilicious commentedOk this one should install...
Comment #8
tim.plunkettTagging.
Comment #9
cosmicdreams CreditAttribution: cosmicdreams commented#6: 1537434-user-entity-type-hinting-6.patch queued for re-testing.
Comment #11
cosmicdreams CreditAttribution: cosmicdreams commentedneeds reroll
Comment #12
Albert Volkman CreditAttribution: Albert Volkman commentedReroll.
Comment #14
Albert Volkman CreditAttribution: Albert Volkman commentedForgot 'use' statement in user.module.
Comment #16
Albert Volkman CreditAttribution: Albert Volkman commentedPostponing.
Comment #17
cosmicdreams CreditAttribution: cosmicdreams commentedRerolled, provided type hinting in user.module. Checking to see how much this breaks.
Comment #19
cosmicdreams CreditAttribution: cosmicdreams commentedAfter reviewing the patch I found many more places where type hinting could be used.
Comment #21
aspilicious CreditAttribution: aspilicious commentedThis was postponed because session handling isn't a true entity. This will fail all the time. Leave it postponed untill we figured out the session handling.
Comment #23
tim.plunkettComment #24
socketwench CreditAttribution: socketwench commentedRerolled. I hope.
I wonder if I can beg someone to show me how to do this in PHPstorm. Doing manually is just too error prone.
Comment #25
socketwench CreditAttribution: socketwench commentedMight need to redo the patch because of https://drupal.org/node/2053489
Comment #27
garphy CreditAttribution: garphy commentedRerolled
Comment #28
garphy CreditAttribution: garphy commentedchanging status to trigger the bot
Comment #30
cosmicdreams CreditAttribution: cosmicdreams commentedIn general, why are we using User and not UserInterface to type these parameters?
So, I think we need to document the parameters in the function's docblock.
Comment #31
cosmicdreams CreditAttribution: cosmicdreams commentedHere's a patch that explains what I'm saying.
Comment #33
BerdirYes, UserInterface should be used, for example here too :)
Lots of those below, always UserInterface, in @params and hook_*() documentations always fully qualified with a leading \, in actual implementations only UserInterface + a use.
I have absolutely no clue where all this is coming from (not just this, all the added functions around this), but it shouldn't be here :)
Comment #34
cosmicdreams CreditAttribution: cosmicdreams commentedProbably just how I created the patch. Clearly, there's more work to be done.
Comment #37
dpiSafe to say this is outdated.