Incompatible with latest versions of symfony/http-foundation

Created on 1 February 2023, almost 2 years ago
Updated 9 May 2023, over 1 year ago

Problem/Motivation

This module is incompatible with the latest versions of the symfony/http-foundation package. Because the Response::create method has been removed in 6.0 an exception is thrown when making a request to the subrequests endpoint.

Steps to reproduce

This is reproduceable on a fresh D10 install.

Proposed resolution

Replace the CacheableResponse::create call in BlueprintManager with new CacheableResponse.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇧🇪Belgium imot3k

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

Comments & Activities

  • Issue created by @imot3k
  • @imot3k opened merge request.
  • Status changed to Needs review almost 2 years ago
  • Status changed to RTBC over 1 year ago
  • 🇨🇦Canada mandclu

    I ran into this same error, and this fixed it for me.

  • 🇳🇱Netherlands mhmhartman

    We also ran into this issue; the fix in the MR indeed fixes the issue.

  • 🇮🇳India rajeshreeputra Pune

    This works like charm, any update on merging and releasing this change.

  • 🇺🇸United States phenaproxima Massachusetts

    This seems like a very innocuous change to me. If it passes tests on Drupal 9 and 10, I'd be comfortable committing it.

  • 🇺🇸United States phenaproxima Massachusetts

    For the record... https://www.drupal.org/pift-ci-job/2642108 confirms that HEAD is currently failing on Drupal 10, due to this problem.

  • 🇺🇸United States phenaproxima Massachusetts

    😞 Looks like tests still fail on Drupal 10. Probably just another call to create() that needs to be adjusted.

  • First commit to issue fork.
  • @chandu7929 opened merge request.
  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    8 pass
  • 🇮🇳India rajeshreeputra Pune

    added patch against MR

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    2 pass, 6 fail
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    2 pass, 6 fail
  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States phenaproxima Massachusetts

    Okay, but the tests are still failing against Drupal 10.

    Please don't re-request review here unless you have a patch or MR that passes on Drupal 9.5, 10.0.x, and 10.1.x.

  • 🇮🇳India vishalkhode

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

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    8 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    2 pass, 6 fail
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    2 pass, 6 fail
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    8 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    8 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    8 pass
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India vishalkhode

    @phenaproxima The MR !14 is ready for review/merge.
    Thanks.

  • Status changed to RTBC over 1 year ago
  • 🇮🇳India rajeshreeputra Pune

    Reviewed changes and looks good, all tests with 9.5, 10.0 10.1 passing.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    8 pass
  • Status changed to Fixed over 1 year ago
  • 🇺🇸United States phenaproxima Massachusetts
  • 🇺🇸United States phenaproxima Massachusetts

    Committed and released in Subrequests 3.0.7.

  • 🇬🇧United Kingdom 2dareis2do

    When running the tests on 3.0.7 branch I am still getting

    lando phpunit --group subrequests
    PHPUnit 9.5.26 by Sebastian Bergmann and contributors.

    Warning: Your XML configuration validates against a deprecated schema.
    Suggestion: Migrate your XML configuration using "--migrate-configuration"!

    Testing
    ..............EE......... 25 / 25 (100%)

    Time: 00:00.895, Memory: 341.00 MB

    There were 2 errors:

    1) Error
    The data provider specified for Drupal\Tests\subrequests\Normalizer\MultiresponseJsonNormalizerTest::testSupportsNormalization is invalid.
    Error: Call to undefined method Symfony\Component\HttpFoundation\Response::create()
    /app/web/modules/contrib/subrequests/tests/src/Unit/Normalizer/MultiresponseJsonNormalizerTest.php:37
    /app/web/vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php:426
    /app/web/vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php:283
    /app/web/vendor/phpunit/phpunit/src/Util/Test.php:328
    /app/web/vendor/phpunit/phpunit/src/Framework/TestBuilder.php:74
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:879
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:229
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:359
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:500
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:525
    /app/web/core/tests/TestSuites/TestSuiteBase.php:63
    /app/web/core/tests/TestSuites/UnitTestSuite.php:22
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:474
    /app/web/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php:84
    /app/web/vendor/phpunit/phpunit/src/TextUI/Command.php:391
    /app/web/vendor/phpunit/phpunit/src/TextUI/Command.php:112
    /app/web/vendor/phpunit/phpunit/src/TextUI/Command.php:97

    /app/web/vendor/phpunit/phpunit/src/Framework/ErrorTestCase.php:64
    /app/web/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
    /app/web/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:661
    /app/web/vendor/phpunit/phpunit/src/TextUI/Command.php:144
    /app/web/vendor/phpunit/phpunit/src/TextUI/Command.php:97

    2) Drupal\Tests\subrequests\Normalizer\MultiresponseJsonNormalizerTest::testNormalize
    Error: Call to undefined method Symfony\Component\HttpFoundation\Response::create()

    /app/web/modules/contrib/subrequests/tests/src/Unit/Normalizer/MultiresponseJsonNormalizerTest.php:51
    /app/web/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
    /app/web/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
    /app/web/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:661
    /app/web/vendor/phpunit/phpunit/src/TextUI/Command.php:144
    /app/web/vendor/phpunit/phpunit/src/TextUI/Command.php:97

    It looks like Response::create() is still being used is testNormalize and testSupportsNormalization

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

Production build 0.71.5 2024