[PP-1]Allow RenderableInterface objects to be passed as the $elements parameter in RendererInterface::render* methods

Created on 5 July 2025, 1 day ago

Problem/Motivation

In πŸ“Œ Slowly, very slowly start OOPifying the render system Needs review , RenderableInterface objects now can be used as wrappers for render arrays. The Render API should be updated to be able render these objects.

Steps to reproduce

Proposed resolution

The following method signatures in RendererInterface and its implementing classes should be updated to:
public function renderRoot(array|RenderableInterface &$elements)
public function renderInIsolation(array|RenderableInterface &$elements)
public function renderPlain(array|RenderableInterface &$elements)
public function renderPlaceholder($placeholder, array|RenderableInterface $elements)
public function render(array|RenderableInterface &$elements, $is_root_call = FALSE)

Note that first the deprecation step should be done per https://www.drupal.org/about/core/policies/core-change-policies/how-to-d... β†’ . A follow up to actually change the method type declarations will done in the next major.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

render system

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024