Luckily, most callbacks seem to be on Render Element plugins, and those already are RenderCallbackInterface through ElementInterface.

Starting here with the ones that I'm seeing in our project, there are more, some functions will need to be converted into static methods or methods on services.

@see Render callbacks must be a closure or implement TrustedCallbackInterface or RenderElementInterface

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir created an issue. See original summary.

Berdir’s picture

Status: Active » Needs review
FileSize
1.23 KB
jrockowitz’s picture

Issue summary: View changes

Adding links to the change record.

jrockowitz’s picture

The only procedural callback function that I have found is _webform_bootstrap_webform_element_webform_likert_pre_render()

Berdir’s picture

Yeah, that's possible, I just fixed the ones that were breaking my tests :) The referenced meta issue has a few more examples too there might also be some that aren't covered by tests.

Berdir’s picture

Did fine one or two more, but not much.

jrockowitz’s picture

Patch looks fine to me. Maybe someone else can review it. Otherwise, we can make it postponed until Drupal 8.7 is no longer support.

strozx’s picture

Status: Needs review » Reviewed & tested by the community

Hi, I also tested the patch and it looks good to me.

Regards, Strozx

jrockowitz’s picture

Status: Reviewed & tested by the community » Postponed
jrockowitz’s picture

Title: [Drupal 8.8] #pre_render callbacks must be implement TrustedCallbackInterface or RenderCallbackInterface » [Drupal 8.8.x] #pre_render callbacks must be implement TrustedCallbackInterface or RenderCallbackInterface

  • Berdir authored a1606a9 on 8.x-5.x
    Issue #3120697 by Berdir: [Drupal 8.8.x] #pre_render callbacks must be...
jrockowitz’s picture

Status: Postponed » Fixed

Status: Fixed » Closed (fixed)

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

Rob230’s picture

This has broken Drupal 8.7 support, so lots of sites on 8.7 have a fatal error - interface not found.

Should release 8.x-5.15 have a depdency or warning added?

jrockowitz’s picture