WSOD caused by using wrong RouteObjectInterface for Drupal 10

Created on 22 March 2023, over 1 year ago

Problem/Motivation

The version 8.x-1.4 was marked compatible to Drupal 10.
As said to the related issue, \Symfony\Cmf\Component\Routing\RouteObjectInterface is removed in 10.0.
But the code still use Symfony\Cmf\Component\Routing\RouteObjectInterface;

Steps to reproduce

Install Drupal 10 core
Install and activate the module Current Page Crumb v8.x-1.4
I see the following error on my PHP logs :
NOTICE: PHP message: Uncaught PHP Exception Error: "Class "Symfony\Cmf\Component\Routing\RouteObjectInterface" not found" at /var/www/modules/current_page_crumb/src/BreadcrumbBuilder.php line 32

Proposed resolution

As proposed to the merge request https://git.drupalcode.org/project/current_page_crumb/-/merge_requests/4, change the line :
use Symfony\Cmf\Component\Routing\RouteObjectInterface;
by
use Drupal\Core\Routing\RouteObjectInterface;

For backward compatibility, may be create a new version to start compatibility from Drupal 9.1 to Drupal 10.x
and keep version 8.x-1.x with only compatibility until Drupal 9.x.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

1.4

Component

Code

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