Closed (fixed)
Project:
Drupal core
Version:
8.1.x-dev
Component:
user.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Jul 2014 at 16:46 UTC
Updated:
30 Jul 2016 at 22:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
a_thakur commentedPlease find the attached patch. The patch removes the usage of the function.
Comment #3
undertext commented@a_thakur You have a typo in the patch : $accout variable obviously should be $account.
Also we should remove 'label_callback' from core/modules/user/src/Entity/User model
Here is a new patch.
Waiting for testbot.
Comment #5
damiankloip commentedI think this issue should wait on #2112679: getUsername() should return the username getDisplayName() for the formatted user name. Then it can just use getDisplayName() ?
Comment #6
ianthomas_ukComment #7
mile23I think this issue is more important than the other, in terms of preparing for release. It only deprecates a @deprecated function, while #2112679: getUsername() should return the username getDisplayName() for the formatted user name is more disruptive.
The patch in #3 needed a reroll, so here it is.
Comment #9
mile23Ewps... Missed a <<<<<<< HEAD.
Comment #11
mile23This takes care of all usages I could find, but it's doubtful this will pass the testbot.
Comment #13
mile23Did some analysis, and we really need to fix #2450793: Properly deprecate support for entity type label callbacks before another reroll here.
Comment #14
mile23Comment #15
xjmPer #2450793: Properly deprecate support for entity type label callbacks, it looks like this was deprecated when it's not possible to remove it yet. So we should change the deprecation to remove it for 9.0 instead. We can then proceed with removing the internal uses in 8.1.x.
Comment #16
cilefen commented#2495301: Deprecate user_format_name() and the label_callback for 9.x (not 8.x)
Comment #17
cilefen commentedComment #18
xjmThanks @cilefen!
Comment #19
cilefen commentedI removed this from the list in the issue summary of the META.
Comment #20
xjmComment #21
xjmComment #22
vadim.hirbu commentedComment #23
vadim.hirbu commentedComment #25
cilefen commented@vadim.hirbu I recommend starting by re-rolling the #11 patch.
Comment #26
xjmThanks @vadim.hirbu and @cilefen -- To clarify, this issue is postponed until 8.1.x opens for development. These sorts of internal cleanups are postponed now so that we can focus on the prioritized changes for the beta.
We could use your help in #2495301: Deprecate user_format_name() and the label_callback for 9.x (not 8.x) though!
Comment #27
xjmComment #28
mile23user_format_name()is still marked as deprecated for removal before 8.0.0. Adding the appropriate parent. Change this if the other issue ever commits.Comment #30
mile23user_format_name()only appears in API documentation at this point.This patch removes it.
Related: #2649216: Add missing type hinting to User module docblocks, Part II
Comment #31
mile23Comment #33
mile23Patch in #30 still applies. Setting to 8.1.x because it's a docs-only change. (All usages of
user_format_name()are gone.)Comment #34
jaheer3 commentedI have applied the the patch #30 on 8.1.x branch it works fine so I will push this to RTBC.
Comment #35
daffie commented@jahirul.islam@srijan.in: If you follow the proces of reviewing a patch you may change the status to RTBC.
The patch is for me too RTBC.
Comment #36
a_thakur commented+1 for RTBC
Comment #38
mile23Setting back to RTBC after unrelated fail.
Comment #41
xjmActually, this still appears to be used as a label callback:
core/modules/user/src/Entity/User.php: * label_callback = "user_format_name",That said, that can be covered by the removal of all deprecated function usages that is required to open 9.x, so we do not need a separate issue at this time. (Other references are to the alter hook, so that was the only one I found other than the docs here.) The docs fixes here look fine on their own though, so rescoping slightly to focus on that. Committed 5250997 and pushed to 8.2.x and 8.1.x. Thanks!