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

merge-requests/2/head
Alex Pott 2020-07-31 15:25:38 +01:00
parent 610682e945
commit 91ffbf84e7
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
3 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ class ManyPlaceholderTest extends UnitTestCase {
$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 = [];

View File

@ -203,7 +203,7 @@ trait ResourceResponseTestTrait {
$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);
}

View File

@ -1253,7 +1253,7 @@ abstract class ResourceTestBase extends BrowserTestBase {
$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)) {