Closed (fixed)
Project:
Drupal core
Version:
8.5.x-dev
Component:
locale.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Aug 2015 at 06:03 UTC
Updated:
12 Sep 2023 at 09:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jeremy commentedAttached patch simply removes unused code. As this is an internal helper function, I don't see the need for a CR -- nobody should be invoking this dead code from other modules.
Comment #6
mile23Moving to 8.4.x because removing a function might be disruptive.
Patch no longer applies.
Comment #7
jofitzRe-rolled.
Comment #8
mile23Looks good. Thanks.
Comment #9
cilefen commented#1978928: Convert locale_translation_manual_status to a Controller I am confused.
Comment #10
cilefen commentedOh it looks like this issue added the function back. I have not yet read about why.
Comment #11
webchickTalked to the release managers, and they said that we shouldn't remove these type of functions because they're not explicitly marked @internal, and therefore we have no idea if some esoteric contrib modules might be relying on then, and therefore it's safer to merely deprecate them, so we can find them again and ditch them for good in Drupal 9.
Here's the documentation (I think) on how to do so: https://www.drupal.org/core/deprecation
Comment #12
xjmYeah, to add to #11, it is extremely unlikely that anyone would actually use this, especially given what it actually does (eek!). But since it also costs us nothing to leave it there until the mass removal of @deprecated for D9, it's better to just be in the habit of marking things deprecated for later removal since we don't always think of everything when evaluating potential disruptions, and also to just set a good model for contributors.
Comment #13
xjmOh, and I should note that @webchick, @cilefen, and I discussed whether this should be treated as a controller since it was a page callback. But since it is not a controller and since no route uses it, it's technically just a weird global function. :)
Comment #14
vijaycs85Looks like we just missed it in #1978916: Convert locale_translate_page to a Controller there is a comment on #67 about it but not addressed anywhere after. Marking as Novice for depreciation task.
Comment #15
mile23Comment #16
gaurav.kapoor commentedAdded the deprecation notice.Should @see and @trigger_error be added??
Comment #17
mile23Yes. Here's the deprecation documentation: https://www.drupal.org/core/deprecation#how-function
Comment #18
gaurav.kapoor commentedComment #19
gaurav.kapoor commentedComment #21
sutharsan commentedPatch still applies.
Should now be "8.5.0"
Comment #22
googletorp commentedUpdated depricated version number from 8.0.0 to 8.5.0 per #21.
Comment #23
googletorp commentedComment #24
sutharsan commentedThanks for changing the version number.
Needs a blank line before @see. See https://www.drupal.org/docs/develop/coding-standards/api-documentation-a...
locale_menu() no longer exist and should therefore not be given as replacement. I advise not to give any replacement here because the is none.
Comment #25
jofitzAddressed comments in #24.
Comment #26
sutharsan commentedInterdiff looks good, patch looks good.
Issue summary checked Ok.
Comment #27
xjmThanks for working on this.
This is linking to this issue's NID. It should be linking the relevant change record instead. We also need to tell people what to do instead. If there is no direct replacement, we should say that, and say why (or what code that previously used this function should do instead).
Thanks!
Comment #28
sutharsan commentedAdding tasks to the issue summary.
Comment #29
sutharsan commentedComment #30
mile23Drafted change record: https://www.drupal.org/node/2931188
Updated @see to the CR.
Added a test to make sure the deprecation works since that's our policy: https://www.drupal.org/core/deprecation
Comment #32
mile23Oh yeah.... For kernel tests, the test listener runs in a different process than the test itself, so loaded include files aren't available to
DrupalStandardsListenerafter the test finishes. Thus it can't verify that an extension's global function is available.I guess we'll have to forgo the coveted declared coverage stats for this deprecated method.
Pretty sure that's unrelated.
Comment #34
mile23Previous test fail unrelated.
Comment #35
borisson_Looks solid.
Comment #36
catchCommitted 0308764 and pushed to 8.5.x. Thanks!
Comment #39
quietone commentedpublish the change record