Add 'array' return type in Drupal\password_policy\EventSubscriber\PasswordPolicyEventSubscriber

Created on 7 August 2024, 4 months ago
Updated 21 August 2024, 3 months ago

Problem/Motivation

When using this module in tests at Drupal 11 version on local we get the deprecation message

Method "Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()" might add "array" as a native return type declaration in the future. Do the same in implementation "Drupal\password_policy\EventSubscriber\PasswordPolicyEventSubscriber" now to avoid errors or add an explicit @return annotation to suppress this message.

After this error, further test does not perform any execution.

Steps to reproduce

Try to run any of test in local, 'll same error for eg:
password_policy/tests/src/Functional/PasswordResetBehaviorsTest.php

Proposed resolution

Add array return type in the definition of getSubscribedEvents()

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Fixed

Version

4.0

Component

Code

Created by

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