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
parent
610682e945
commit
91ffbf84e7
|
@ -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 = [];
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue