Use Drupal's RouteObjectInterface Fixes Drupal 10 compatibility

Created on 8 August 2023, 11 months ago

Problem/Motivation

Location
/admin/expense-tracker/income-reports

Referrer
/admin/expense-tracker/income-expense-statements

Message

Error: Class "Symfony\Cmf\Component\Routing\RouteObjectInterface" not found in Drupal\expense_tracker\Form\ReportFilterForm->buildForm() (line 75 of \modules\contrib\expense_tracker\src\Form\ReportFilterForm.php).

Steps to reproduce

Install latest Druapl 10 and this module and visit /admin/expense-tracker/income-reports
Website encounterd an error page appears

Proposed resolution

Use Drupal's RouteObjectInterface Fixes Drupal 10 compatibility

in \modules\contrib\expense_tracker\src\Form\ReportFilterForm.php

namespace Drupal\expense_tracker\Form;

- use Symfony\Cmf\Component\Routing\RouteObjectInterface;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;

To

namespace Drupal\expense_tracker\Form;

+ use Drupal\Core\Routing\RouteObjectInterface;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
πŸ› Bug report
Status

Needs review

Version

1.3

Component

Code

Created by

πŸ‡ΏπŸ‡¦South Africa Vlooi Vlerke

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

Comments & Activities

Production build 0.69.0 2024