Problem/Motivation
Running tests of an unrelated module results in this warning:
Method "Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()" might add "array" as a native return type declaration in the future. Do the same in implementation "Drupal\shield\EventSubscriber\ShieldSubscriber" now to avoid errors or add an explicit @return annotation to suppress this message.
Steps to reproduce
Test an unrelated module on D11.4.
Proposed resolution
I'll create an MR.
Remaining tasks
Test the MR.
Issue fork shield-3618153
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
Comment #3
tolstoydotcomThis is getting too deep into the git weeds for me, but I noticed an even more serious issue:
PHP Fatal error: Declaration of Drupal\\shield\\ShieldMiddleware::handle(Symfony\\Component\\HttpFoundation\\Request $request, $type = self::MASTER_REQUEST, $catch = true) must be compatible with Symfony\\Component\\HttpKernel\\HttpKernelInterface::handle(Symfony\\Component\\HttpFoundation\\Request $request, int $type = self::MAIN_REQUEST, bool $catch = true): Symfony\\Component\\HttpFoundation\\Response in shield/src/ShieldMiddleware.php on line 126The solution is simple, change line 126 (or thereabouts) of ShieldMiddleware.php into this:
public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE): Response {Response is already imported.