Add 'array' return type in Drupal\rules\EventSubscriber\GenericEventSubscriber

Created on 4 August 2024, 4 months ago
Updated 20 August 2024, 3 months ago

Problem/Motivation

When using Rules as a third-party module in testing rules integrations with Drupal 11 we get the following error in the log:

/builds/project/scheduler/vendor/symfony/error-handler/DebugClassLoader.php:341
Method "Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()" might add "array" as a native return type declaration in the future. Do the same in implementation "Drupal\rules\EventSubscriber\GenericEventSubscriber" now to avoid errors or add an explicit @return annotation to suppress this message.

Proposed resolution

Add an : array type hint to the getSubscribedEvents() function definition

Other modules have the same problem and solution
πŸ“Œ Add 'array' return type in getSubscribedEvents() Fixed
πŸ“Œ Add 'array' return type in Drupal\entity\EventSubscriber\EntityDuplicateSubscriber Active

πŸ“Œ Task
Status

Fixed

Version

4.0

Component

Rules Core

Created by

πŸ‡¬πŸ‡§United Kingdom jonathan1055

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024