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.

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

imot3k created an issue. See original summary.

imot3k’s picture

Status: Active » Needs review
mandclu’s picture

Status: Needs review » Reviewed & tested by the community

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

mhmhartman’s picture

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

rajeshreeputra’s picture

Priority: Major » Critical

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

phenaproxima’s picture

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

phenaproxima’s picture

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

phenaproxima’s picture

Status: Reviewed & tested by the community » Needs work

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

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

rajeshreeputra’s picture

Status: Needs work » Needs review
StatusFileSize
new1.05 KB

added patch against MR

phenaproxima’s picture

Status: Needs review » Needs work

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.

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

vishalkhode’s picture

Status: Needs work » Needs review

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

rajeshreeputra’s picture

Status: Needs review » Reviewed & tested by the community

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

phenaproxima’s picture

Status: Reviewed & tested by the community » Fixed
phenaproxima’s picture

Committed and released in Subrequests 3.0.7.

2dareis2do’s picture

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 tests?

Status: Fixed » Closed (fixed)

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