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.
Problem/Motivation
Theme functions have been deprecated since 8.0.x. In #3109480: Properly deprecate theme functions for Drupal 10 we added silenced deprecation warnings to 8.8.x and above. For 9.0.x we should unsilence these warnings as theme functions are an XSS security risk and Twig templates are preferred. Theme functions will finally be removed in 10.x in #3097889: Remove deprecated theme functions
Proposed resolution
Remove @
from the trigger_error()
call.
Decide whether to add further deprecations to other functions in the theme function system, e.g. drupal_find_theme_functions()
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#11 | 3117330-11.patch | 3.85 KB | tedbow |
#7 | 3117330-7.patch | 3.7 KB | tedbow |
#4 | 3117330-4.patch | 3.55 KB | longwave |
#2 | 3117330.patch | 1.07 KB | longwave |
Comments
Comment #2
longwaveComment #4
longwaveComment #5
xjmThis needs a reroll following #3120954: Add function name to the deprecation message about theme functions.
In case anyone is wondering about the "Unsilenced deprecation" prefixes in the legacy tests, it appears this is part of the PHPUnit bridge... see the test failure in #2. I checked core and we don't have it anywhere else in 9.0.x, but there's an example in 8.9.x/8.8.x/etc.
Comment #6
tedbowrerolling
Comment #7
tedbowComment #8
tedbowGoing to re-RTBC since it is very simple reroll
Test pass for me locally but obviously shouldn't be committed until tests pass here.
Comment #9
xjmSorry, I should have probably said "updated for #3120954: Add function name to the deprecation message about theme functions" -- the new patch is reverting it for those tests.
Comment #10
longwaveThe deprecation messages were improved to help developers discover exactly what needs fixing, that change needs to be kept here.
edit: crosspost with xjm
Comment #11
tedbow🤦♂️
Ok. now I have this issue and #3120954: Add function name to the deprecation message about theme functions
Fixed
Comment #12
longwaveLooks good now. RTBC if tests agree!
Comment #13
xjmCommitted and pushed to 9.0.x. Thanks!
Comment #17
larowlanCrediting catch from #2641876: Trigger E_USER_DEPRECATED when theme functions are discovered which I closed as a duplicate of this which had essentially the same approach.