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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
FileSize
1.07 KB

Status: Needs review » Needs work

The last submitted patch, 2: 3117330.patch, failed testing. View results

longwave’s picture

Status: Needs work » Needs review
FileSize
3.55 KB
xjm’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

This 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.

tedbow’s picture

Assigned: Unassigned » tedbow

rerolling

tedbow’s picture

Assigned: tedbow » Unassigned
Status: Needs work » Needs review
FileSize
3.7 KB
tedbow’s picture

Status: Needs review » Reviewed & tested by the community

Going to re-RTBC since it is very simple reroll

Test pass for me locally but obviously shouldn't be committed until tests pass here.

xjm’s picture

Status: Reviewed & tested by the community » Needs work

Sorry, 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.

longwave’s picture

The deprecation messages were improved to help developers discover exactly what needs fixing, that change needs to be kept here.

edit: crosspost with xjm

tedbow’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
3.85 KB

Going to re-RTBC since it is very simple reroll

🤦‍♂️

Ok. now I have this issue and #3120954: Add function name to the deprecation message about theme functions

Fixed

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Looks good now. RTBC if tests agree!

xjm’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 9.0.x. Thanks!

  • xjm committed f3069cc on 9.0.x
    Issue #3117330 by longwave, tedbow, xjm: Trigger errors in deprecated...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

larowlan credited catch.

larowlan’s picture

Crediting 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.