Problem/Motivation

Geting the following error while doing unit testing:

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\RouteNormalizerRequestSubscriber" now to avoid errors or add an explicit @return annotation to suppress this message.
1x in RouteNormalizerRequestSubscriberTest::testSkipIfFlagNotEnabled 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/RouteNormalizerRequestSubscriberTest.php

Proposed resolution

Fix the warning.

CommentFileSizeAuthor
#2 3382195-2.patch608 bytesmukhtarm

Issue fork redirect-3382195

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

MukhtarM created an issue. See original summary.

mukhtarm’s picture

StatusFileSize
new608 bytes

Please review the patch. Please note that its not a major issue on the module, its just fix the warning on unit test.

mukhtarm’s picture

Status: Active » Needs review

kumareshbaksi made their first commit to this issue’s fork.

berdir’s picture

Status: Needs review » Closed (duplicate)

This is a duplicate of an existing issue, which also happens to be from you: #3382275: Warning on unit testing

mukhtarm’s picture

@Berdir Thanks for the update.