Commit a922fea2 authored by voleger's avatar voleger Committed by pifagor

Issue #3134571 by voleger, alex_optim, pifagor: Drupal 9 compatibility

parent 52db265b
......@@ -54,7 +54,7 @@ class XmlSitemapListBuilder extends ConfigEntityListBuilder {
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
$container->get('entity.manager')->getStorage($entity_type->id()),
$container->get('entity_type.manager')->getStorage($entity_type->id()),
$container->get('module_handler'),
$container->get('language_manager')
);
......
......@@ -431,14 +431,14 @@ abstract class XmlSitemapTestBase extends BrowserTestBase {
* Assert Watchdog Message.
*/
protected function assertWatchdogMessage(array $conditions, $message = 'Watchdog message found.') {
$this->assertTrue($this->getWatchdogMessages($conditions), $message);
$this->assertNotEmpty($this->getWatchdogMessages($conditions), $message);
}
/**
* Assert No Watchdog Message.
*/
protected function assertNoWatchdogMessage(array $conditions, $message = 'Watchdog message not found.') {
$this->assertFalse($this->getWatchdogMessages($conditions), $message);
$this->assertEmpty($this->getWatchdogMessages($conditions), $message);
}
/**
......
......@@ -2310,7 +2310,7 @@ function xmlsitemap_transfer_file(Response $response, $uri, array $headers) {
Environment::setTimeLimit(240);
$scheme = \Drupal::config('system.file')->get('default_scheme');
// Transfer file in 16 KB chunks to save memory usage.
if ($scheme && \Drupal::service('file_system')->validScheme($scheme) && $fd = fopen($uri, 'rb')) {
if ($scheme && \Drupal::service('stream_wrapper_manager')->isValidScheme($scheme) && $fd = fopen($uri, 'rb')) {
while (!feof($fd)) {
$content .= fread($fd, 1024 * 16);
}
......
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