Problem/Motivation

The request_dumper module needs a fix for the new symfony version:

        W: 
        W: PHP Fatal error:  Declaration of Drupal\request_dumper\StackMiddleware\RequestDumper::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 /app/web/modules/contrib/request_dumper/src/StackMiddleware/RequestDumper.php on line 55

Steps to reproduce

Use the module with Drupal 10+

Proposed resolution

Fix the class
Add some (functional?) tests

CommentFileSizeAuthor
#6 3394620-6.patch2.28 KBpwolanin
#5 3394620-5.patch1.97 KBpwolanin
#4 3394620-1.patch1.95 KBpwolanin

Comments

pwolanin created an issue. See original summary.

pwolanin’s picture

Looks like this just requires changing the 3rd arg to have a bool typehint, which should be back-compatible

pwolanin’s picture

Oops, that's not the actual problem - it's actually the second arg maybe?

pwolanin’s picture

Status: Active » Needs review
StatusFileSize
new1.95 KB
pwolanin’s picture

StatusFileSize
new1.97 KB
pwolanin’s picture

StatusFileSize
new2.28 KB

doh - it's the return value annotation that's the issue

  • pwolanin committed 12cd3ba3 on 2.0.x
    Issue #3394620 by pwolanin: Update middleware class to work with symfony...
pwolanin’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.