Problem/Motivation

The application health check results give a 500 error.

Steps to reproduce

Drupal core 10.1.1
Monitoring 8.x-1.13

Location:
/json/oh-dear-health-check-results

Message:
TypeError: Drupal\ohdear_integration\Controller\OhDearIntegrationController::__construct(): Argument #4 ($request_stack) must be of type Drupal\Core\Http\RequestStack, Symfony\Component\HttpFoundation\RequestStack given, called in /usr/www/users/loginout/production/outfoxlogin/web/modules/contrib/ohdear_integration/src/Controller/OhDearIntegrationController.php on line 84 in Drupal\ohdear_integration\Controller\OhDearIntegrationController->__construct() (line 72 of /usr/www/users/loginout/production/outfoxlogin/web/modules/contrib/ohdear_integration/src/Controller/OhDearIntegrationController.php).

Proposed resolution

Replace Drupal\Core\Http\RequestStack and use the Symfony class Symfony\Component\HttpFoundation\RequestStack directly.

CommentFileSizeAuthor
#8 diffs[1].diff1.19 KBbbrala
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

marceloostdijk created an issue. See original summary.

keshavv’s picture

Status: Needs review » Reviewed & tested by the community

I have checked the MR and confirmed that It is working perfectly, Because use Drupal\Core\Http\RequestStack; is deprecated
so it will encounter the error.
https://www.drupal.org/node/3265357

We can go with the MR.
Thank you.

useernamee’s picture

Status: Reviewed & tested by the community » Needs review

Thank you for your contribution.

I've reproduced the issue on d10. Code change fixes the issue.
I've tested it on d9.5 - code change doesn't broke the controller output.

I'm a bit vary about the d8 compatibility but currently I don't have capacity to test. I'm not sure, maybe we should just stop supporting d8.

useernamee’s picture

Status: Needs review » Fixed

d9 and d10 tests are passing.
merged & done

Will be part of next release (not sure when this will happen).

Status: Fixed » Closed (fixed)

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

bbrala’s picture

StatusFileSize
new1.19 KB

Uploading patch