Drupal\Core\Http\RequestStack deprecation

Created on 19 August 2023, over 1 year ago
Updated 21 August 2023, over 1 year ago

Problem/Motivation

Drupal\Core\Http\RequestStack is deprecated in Drupal 10: https://www.drupal.org/node/3265357 β†’

Steps to reproduce

Install the module in Drupal 10
Log in as an administrator
Navigate to /admin/reports/paragraphs-report
you will get the following error:
TypeError: Drupal\paragraphs_report\ParagraphsReport::__construct(): Argument #7 ($request_stack) must be of type Drupal\Core\Http\RequestStack, Symfony\Component\HttpFoundation\RequestStack given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\paragraphs_report\ParagraphsReport->__construct() (line 137 of modules/contrib/paragraphs_report/src/ParagraphsReport.php).

Proposed resolution

Update deprecation to Symfony\Component\HttpFoundation\RequestStack;

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom ipwa

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

Comments & Activities

  • Issue created by @ipwa
  • @ipwa opened merge request.
  • πŸ‡¬πŸ‡§United Kingdom ipwa

    In case anyone needs a patch for their composer file before this is released or in case maintainer prefers patches to MR.

  • πŸ‡ΊπŸ‡ΈUnited States generalredneck Texas, USA πŸ‡ΊπŸ‡Έ

    Ammending the steps to reproduce as the original is inaccurate.

  • πŸ‡ΊπŸ‡ΈUnited States generalredneck Texas, USA πŸ‡ΊπŸ‡Έ

    @ipwa,
    A reminder also when you have posted work, Please mark it as "Needs Review". This will help me prioritize the queue for what needs testing. I'll try to get to it as my email will allow me since I get notified for all new issues in this queue, but you know... at a glance this looks like an open ticket with no solutions to review. Figure it was just a slip though.

    All that said, I tested the solution and looks like we are good to go!

  • Status changed to RTBC over 1 year ago
  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States generalredneck Texas, USA πŸ‡ΊπŸ‡Έ

    Pushing this out as 2.0.1 since it's pretty much a hotfix. Should be ready soon.

  • πŸ‡¬πŸ‡§United Kingdom ipwa

    Thanks Allan for the speedy release πŸ™Œ

  • πŸ‡ΊπŸ‡ΈUnited States generalredneck Texas, USA πŸ‡ΊπŸ‡Έ

    No problem. I can't promise it will always be that way as I am a maintainer on several modules.

    I kinda expected to have something like this on this one since it was a large release, I'm unfamiliar with the specifics, and we have 0 automated tests. I'm really surprised that one didn't' show up on rector and that explains a fix I saw in the D10 MRs that someone else made... though this fix is MUCH preferred.

    Thank you for being on top of testing it out and getting us a contributed fix quickly as well.

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

Production build 0.71.5 2024