D9.1 / Symfony 4.x changes $event_dispatcher->dispatch() parameters order

Created on 4 August 2021, over 3 years ago
Updated 21 May 2023, almost 2 years ago

Problem/Motivation

The auto test does show errors like this in D9.1 (and not in D8.9):

7x: Calling the Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407

Basically https://www.drupal.org/node/3154407 says

The signature of Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() has changed.

Before:

$event_dispatcher->dispatch($event_name, Event $event = NULL);

After:

$event_dispatcher->dispatch(Event $event, $event_name = NULL);

The order of $event and $event_name is switched, this is introduced in D9.1 / Symfony 4.x.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇨🇦Canada yang_yi_cn

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024