Warning on unit testing

Created on 21 August 2023, about 1 year ago
Updated 30 August 2023, about 1 year ago

Problem/Motivation

Geting the following warning while doing unit testing RedirectRequestSubscriber:

1x: Method "Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()" might add "array" as a native return type declaration in the future. Do the same in implementation "Drupal\redirect\EventSubscriber\RedirectRequestSubscriber" now to avoid errors or add an explicit @return annotation to suppress this message.
1x in RedirectRequestSubscriberTest::testRedirectLogicWithQueryRetaining from Drupal\Tests\redirect\Unit

Steps to reproduce

Install the module. run unit test:
ddev exec vendor/bin/phpunit -c core modules/contrib/redirect/tests/src/Unit/RedirectRequestSubscriberTest.php

Proposed resolution

Fix the warning.

📌 Task
Status

Fixed

Version

1.8

Component

Code

Created by

🇮🇳India mukhtarm

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

Comments & Activities

Production build 0.71.5 2024