Issue #3034072 by kim.pepper, Berdir, alexpott, jibran, larowlan,...
Issue #3034072 by kim.pepper, Berdir, alexpott, jibran, larowlan, claudiu.cristea: Move file uri/scheme functions from file.inc and FileSystem to StreamWrapperManager
@trigger_error('file_uri_scheme() is deprecated in drupal:8.0.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme() instead. See https://www.drupal.org/node/3035273',E_USER_DEPRECATED);
returnStreamWrapperManager::getScheme($uri);
}
/**
* Checks that the scheme of a stream URI is valid.
*
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::validScheme().
* @deprecated in drupal:8.8.0 and will be removed from Drupal 9.0.0. Use
@trigger_error('file_stream_wrapper_valid_scheme() is deprecated in drupal:8.0.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidScheme() instead. See https://www.drupal.org/node/3035273',E_USER_DEPRECATED);
// If nothing was replaced, the URI doesn't have a valid scheme.
return$target!==$uri?$target:FALSE;
@trigger_error('file_uri_target() is deprecated in drupal:8.8.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getTarget() instead. See https://www.drupal.org/node/3035273',E_USER_DEPRECATED);
returnStreamWrapperManager::getTarget($uri);
}
/**
@@ -171,19 +176,16 @@ function file_default_scheme() {
*
* @return string
* The normalized URI.
*
* @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use
@trigger_error('file_stream_wrapper_uri_normalize() is deprecated in drupal:8.8.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::normalizeUri() instead. See https://www.drupal.org/node/3035273',E_USER_DEPRECATED);
@trigger_error('file_valid_uri() is deprecated in drupal:8.8.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidUri() instead. See https://www.drupal.org/node/3035273',E_USER_DEPRECATED);
@trigger_error('Calling LibraryDiscoveryParser::__construct() without the $stream_wrapper_manager argument is deprecated in drupal:8.8.0. The $stream_wrapper_manager argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3035273',E_USER_DEPRECATED);
@trigger_error('fileValidUri() is deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidUri() instead. See https://www.drupal.org/node/3035273',E_USER_DEPRECATED);
// The scheme will always be the last element in the matches array.
returnarray_pop($matches);
}
returnFALSE;
@trigger_error('FileSystem::uriScheme() is deprecated in drupal:8.8.0. It will be removed from drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme() instead. See https://www.drupal.org/node/3035273',E_USER_DEPRECATED);
@trigger_error('FileSystem::validScheme() is deprecated in drupal:8.8.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidScheme() instead. See https://www.drupal.org/node/3035273',E_USER_DEPRECATED);