Closed (fixed)
Project:
Drupal core
Version:
10.0.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2019 at 23:43 UTC
Updated:
21 Feb 2022 at 10:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
longwaveComment #3
longwaveComment #5
longwaveComment #6
longwaveMissed a file
Comment #7
longwaveInteresting that #5 passed with an empty template file. I think this is because \Drupal\Tests\system\Kernel\Theme\ThemeTest::testThemeDataTypes() only cares about the types and not the actual output.
Comment #8
longwavecommon_test.module and theme_suggestions_test.module still contain some theme functions that need removing. Also interesting that the tests that use these still pass!
views.module also looks like it has some support for theme functions as well.
Comment #9
longwaveAddressed #8.
Comment #10
senthilmohith commentedComment #11
senthilmohith commentedI have reviewed the patch #9 and it's working as we expected in the 9.0.x version. Most of the deprecated theme functions have been removed. Please refer to the attached screens.
Comment #12
wim leersI hate to say this but … it looks like this wasn't deprecated? 🤔
I think this needs review from a theme subsystem maintainer.
Comment #13
longwaveIt might not have been explicitly deprecated but theme functions themselves have not been used for >5 years now so I don't see how it is of use to anyone.
Comment #14
lauriiiIt seems like theme functions are still being used by contrib projects: http://grep.xnddx.ru/search?text=function%20theme_&filename=. 😳 Based on this, it seems risky to remove theme functions without first triggering proper deprecation errors. 😩 In my opinion, we should schedule the removal to Drupal 10. 😭
Comment #15
wim leers#14 is exactly what I feared, but wanted a theme system maintainer to give their more informed stance. Unfortunate. But pragmatic.
Comment #16
longwaveThe original deprecation was done in #2576881: Deprecate theme functions for removal before Drupal 9 (docs only) long before we started using
trigger_error()and friends to notify developers when they use deprecated code. There is some discussion of how we should notify developers in that issue but it looks like the suggested followup to actually add deprecations was never created.So I guess the next step is to create that followup now, get modern deprecation messages committed to 9.1.x for removal in 10.x, and then postpone this issue until 10.x?
Comment #17
lauriiiThese seem like the correct next steps to me. Adding a tag for creating the follow-up to try to ensure that the follow-up gets filed this time 😅
Comment #18
longwaveRaised #3109480: Properly deprecate theme functions for Drupal 10 and postponing this.
Comment #19
lauriiiAwesome, thank you @longwave!
Comment #20
miro_dietikerComment #21
andypostIt's not a part of meta anymore
Comment #23
eric_a commentedComment #24
eric_a commentedComment #25
eric_a commentedComment #26
anushrikumari commentedRerolled for 9.2.x, as patch #9 doesn't apply for the same
Comment #27
longwaveThis can't be committed until 10.x opens so there isn't really a need to reroll this until then.
Comment #28
gábor hojtsyAdding the proper parent.
Comment #29
andypostComment #30
paulocsI'm working on a re-row.
Comment #31
paulocsOnly a re-row for now.
Comment #32
andypostComment #33
longwaveFew minor fixes against the reroll.
Comment #34
longwaveRemoved another few docs comments that still refer to theme functions.
Not sure what to do about this sentence or whether this still applies - maybe this can be refactored away?
Comment #36
longwaveRemove legacy test classes and modules for testing theme functions.
Comment #37
dwwPer @catch at #3244802-8: Remove BC layers in entity system, any deprecation removal issue should be on hold until after 10.0.0-alpha1 is tagged.
Thanks!
-Derek
Comment #38
andypostComment #39
andypostright parent is #3213895: [META] Remove deprecated classes, methods, procedural functions and code paths outside of deprecated modules on the Drupal 10 branch
Comment #40
andypostFaced in #3260778-5: Remove deprecated code from bootstrap.inc more work needed for issue to remove @todo to it
Comment #41
andypostComment #42
catchIronically, this might break upgrade_status...
http://grep.xnddx.ru/search?text=drupal_find_theme_functions&filename=
I think we need a 9.4.x follow-up to deprecate (or mark internal?) drupal_find_theme_functions() for removal in Drupal 10. But since upgrade_status is the only usage in contrib and custom use seems extremely unlikely, seems OK to go ahead here.
Comment #43
andypostUpgrade status could use follow-up to and
drupal_find_theme_functions()++ as wellComment #44
catchOpened the follow-up for drupal_find_theme_functions() #3262500: Mark drupal_find_theme_functions() @internal in Drupal 9 in 9.4.x
I was about to open the follow-up for Upgrade Status, but the 8.3.x branch doesn't have this usage, only the 8.2.x branch, so it's actually fine.
Comment #45
gábor hojtsyThis reminds me Upgrade Status is not even Drupal 10 alpha1 compatible (facepalm). Either way, compatibility with versions later than alpha1 is not intended until it would check for Drupal 11 compatibility :D Opened #3262488: Make Upgrade Status compatible with Drupal 10 in Upgrade Status.
That said, Upgrade Status may be able to just include a copy of this global function I think? The underlying getPrefixGroupedUserFunctions() did not seem to have been modified? Actually, I think we should just make that check optional. Opened #3262503: Don't attempt to use drupal_find_theme_functions() on Drupal 10 in Upgrade Status.
Comment #46
gábor hojtsy@catch: 8.x-3.x of Upgrade Status also uses drupal_find_theme_functions() in ThemeFunctionDeprecationAnalyzer, so it is definitely still there. So I think #3262503: Don't attempt to use drupal_find_theme_functions() on Drupal 10 is valid to fix then.
Comment #47
catch@Gábor Hojtsy ahh thanks, maybe http://grep.xnddx.ru just doesn't have the 3.x branch yet, glad I opened the issue after all.
Comment #49
catchCommitted/pushed to 10.0.x, thanks!
Very glad we don't have to keep this around for another release.
Comment #50
andypostThank you! re-titled #3262500: Mark drupal_find_theme_functions() @internal in Drupal 9 as follow-up