Unverified Commit 87f5ac89 authored by Alex Pott's avatar Alex Pott
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 = [];
+1 −1
Original line number Diff line number Diff line
@@ -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);
  }

+1 −1
Original line number Diff line number Diff line
@@ -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)) {