- Issue created by @thefancywizard
As of Drupal 11.2.0, using \Drupal\Core\Render\Renderer::render() with the second argument $is_root_call is deprecated and will be removed in Drupal 12.0.0.
The current implementation in GeofieldGoogleMapViewStyle::render() calls:
$rendered = $this->renderer->render($build, TRUE);
This triggers a deprecation warning:
Drupal\Core\Render\Renderer::render with $is_root_call is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Use Drupal\Core\Render\Renderer::renderRoot() instead.
This causes noisy logs in test output and will break functionality in Drupal 12.
Replace the deprecated call to Renderer::render() with Renderer::renderRoot() when rendering the $build array.
Suggested code change:
- $rendered = $this->renderer->render($build, TRUE);
+ $rendered = $this->renderer->renderRoot($build);
This eliminates the deprecation and aligns with the forward-compatible API.
None.
Replaces deprecated call to Renderer::render() with Renderer::renderRoot(). No change to public API.
None.
Active
11.0
Code