Unverified Commit 87f5ac89 authored by alexpott's avatar alexpott

Issue #3161992 by Hardik_Patel_12, ravi.shankar, catch, longwave: Since...

Issue #3161992 by Hardik_Patel_12, ravi.shankar, catch, longwave: Since symfony/http-foundation 5.1: The "Symfony\Component\HttpFoundation\Response::create()" method is deprecated, use "new Drupal\Core\Render\HtmlResponse()" instead

(cherry picked from commit 91ffbf84)
parent 92da9f80
......@@ -31,7 +31,7 @@ public function testManyNoJsPlaceHolders() {
$this->prophesize(EventDispatcherInterface::class)->reveal(),
$this->prophesize(ConfigFactoryInterface::class)->reveal()
);
$response = new BigPipeResponse(HtmlResponse::create());
$response = new BigPipeResponse(new HtmlResponse());
// Add many placeholders.
$many_placeholders = [];
......
......@@ -203,7 +203,7 @@ protected function getExpectedIncludedResourceResponse(array $include_paths, arr
$basic_cacheability = (new CacheableMetadata())
->addCacheTags($this->getExpectedCacheTags())
->addCacheContexts($this->getExpectedCacheContexts());
return static::decorateExpectedResponseForIncludedFields(ResourceResponse::create($individual_document), $resource_data['responses'])
return static::decorateExpectedResponseForIncludedFields(new ResourceResponse($individual_document), $resource_data['responses'])
->addCacheableDependency($basic_cacheability);
}
......
......@@ -1253,7 +1253,7 @@ protected function getExpectedCollectionResponse(array $collection, $self_link,
$cacheability = static::getExpectedCollectionCacheability($this->account, $collection, NULL, $filtered);
$cacheability->setCacheMaxAge($merged_response->getCacheableMetadata()->getCacheMaxAge());
$collection_response = ResourceResponse::create($merged_document);
$collection_response = new ResourceResponse($merged_document);
$collection_response->addCacheableDependency($cacheability);
if (is_null($included_paths)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment