Skip to content
Snippets Groups Projects
Commit 614874f7 authored by Ashutosh Mishra's avatar Ashutosh Mishra Committed by Joachim Feltkamp
Browse files

Issue #3136577 by yonas.legesse, ashutosh.mishra: Drupal 9 Compatibility

parent 08cc178d
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,6 @@
"homepage": "http://drupal.org/project/file_update",
"license": "GPL-2.0+",
"require": {
"drupal/core": "^8.8.0",
"ext-json": "*"
}
}
......@@ -2,6 +2,7 @@ name: 'File update'
type: module
description: 'Allows to update files for SEO and better structured content.'
core: 8.x
core_version_requirement: ^8 || ^9
package: 'SEO'
dependencies:
- drupal:file
......
......@@ -10,6 +10,7 @@ use Drupal\Core\Image\ImageFactory;
use Drupal\Core\Logger\LoggerChannelInterface;
use Drupal\Core\Messenger\MessengerInterface;
use Drupal\Core\Session\AccountProxyInterface;
use Drupal\Core\StreamWrapper\StreamWrapperManager;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\file\FileInterface;
use Drupal\file_update\Plugin\FileUpdate\FileUpdateManager;
......@@ -579,11 +580,16 @@ class FileUpdateService {
/**
* Check if uri is valid.
*
* @param $uri
* The URI to check.
*
* @return bool
* If uri is valid.
*/
public function isValidUri($uri) {
return $this->fileSystem->validScheme($uri);
/** @var StreamWrapperManager $stream_wrapper_manager */
$stream_wrapper_manager = \Drupal::service('stream_wrapper_manager');
return $stream_wrapper_manager->isValidScheme($uri);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment