Commit 3c7a7782 authored by Gábor Hojtsy's avatar Gábor Hojtsy

Issue #2873775 by josephcheek, gaurav.kapoor, John Cook, cilefen: Add Change...

Issue #2873775 by josephcheek, gaurav.kapoor, John Cook, cilefen: Add Change record to @deprecated for all deprecated functions in file.inc
parent e496c7b3
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::CHMOD_DIRECTORY. * Use \Drupal\Core\File\FileSystem::CHMOD_DIRECTORY.
*
* @see https://www.drupal.org/node/2418133
*/ */
const FILE_CHMOD_DIRECTORY = FileSystem::CHMOD_DIRECTORY; const FILE_CHMOD_DIRECTORY = FileSystem::CHMOD_DIRECTORY;
...@@ -28,6 +30,8 @@ ...@@ -28,6 +30,8 @@
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::CHMOD_FILE. * Use \Drupal\Core\File\FileSystem::CHMOD_FILE.
*
* @see https://www.drupal.org/node/2418133
*/ */
const FILE_CHMOD_FILE = FileSystem::CHMOD_FILE; const FILE_CHMOD_FILE = FileSystem::CHMOD_FILE;
...@@ -77,6 +81,8 @@ ...@@ -77,6 +81,8 @@
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::uriScheme(). * Use \Drupal\Core\File\FileSystem::uriScheme().
*
* @see https://www.drupal.org/node/2418133
*/ */
function file_uri_scheme($uri) { function file_uri_scheme($uri) {
return \Drupal::service('file_system')->uriScheme($uri); return \Drupal::service('file_system')->uriScheme($uri);
...@@ -87,6 +93,8 @@ function file_uri_scheme($uri) { ...@@ -87,6 +93,8 @@ function file_uri_scheme($uri) {
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::validScheme(). * Use \Drupal\Core\File\FileSystem::validScheme().
*
* @see https://www.drupal.org/node/2418133
*/ */
function file_stream_wrapper_valid_scheme($scheme) { function file_stream_wrapper_valid_scheme($scheme) {
return \Drupal::service('file_system')->validScheme($scheme); return \Drupal::service('file_system')->validScheme($scheme);
...@@ -386,6 +394,8 @@ function file_save_htaccess($directory, $private = TRUE, $force_overwrite = FALS ...@@ -386,6 +394,8 @@ function file_save_htaccess($directory, $private = TRUE, $force_overwrite = FALS
* *
* @deprecated in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0.
* Use \Drupal\Component\PhpStorage\FileStorage::htaccessLines(). * Use \Drupal\Component\PhpStorage\FileStorage::htaccessLines().
*
* @see https://www.drupal.org/node/2418133
*/ */
function file_htaccess_lines($private = TRUE) { function file_htaccess_lines($private = TRUE) {
return FileStorage::htaccessLines($private); return FileStorage::htaccessLines($private);
...@@ -919,6 +929,8 @@ function file_unmanaged_delete_recursive($path, $callback = NULL) { ...@@ -919,6 +929,8 @@ function file_unmanaged_delete_recursive($path, $callback = NULL) {
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::moveUploadedFile(). * Use \Drupal\Core\File\FileSystem::moveUploadedFile().
*
* @see https://www.drupal.org/node/2418133
*/ */
function drupal_move_uploaded_file($filename, $uri) { function drupal_move_uploaded_file($filename, $uri) {
return \Drupal::service('file_system')->moveUploadedFile($filename, $uri); return \Drupal::service('file_system')->moveUploadedFile($filename, $uri);
...@@ -1103,6 +1115,8 @@ function file_upload_max_size() { ...@@ -1103,6 +1115,8 @@ function file_upload_max_size() {
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::chmod(). * Use \Drupal\Core\File\FileSystem::chmod().
*
* @see https://www.drupal.org/node/2418133
*/ */
function drupal_chmod($uri, $mode = NULL) { function drupal_chmod($uri, $mode = NULL) {
return \Drupal::service('file_system')->chmod($uri, $mode); return \Drupal::service('file_system')->chmod($uri, $mode);
...@@ -1113,6 +1127,8 @@ function drupal_chmod($uri, $mode = NULL) { ...@@ -1113,6 +1127,8 @@ function drupal_chmod($uri, $mode = NULL) {
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::unlink(). * Use \Drupal\Core\File\FileSystem::unlink().
*
* @see https://www.drupal.org/node/2418133
*/ */
function drupal_unlink($uri, $context = NULL) { function drupal_unlink($uri, $context = NULL) {
return \Drupal::service('file_system')->unlink($uri, $context); return \Drupal::service('file_system')->unlink($uri, $context);
...@@ -1123,6 +1139,8 @@ function drupal_unlink($uri, $context = NULL) { ...@@ -1123,6 +1139,8 @@ function drupal_unlink($uri, $context = NULL) {
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::realpath(). * Use \Drupal\Core\File\FileSystem::realpath().
*
* @see https://www.drupal.org/node/2418133
*/ */
function drupal_realpath($uri) { function drupal_realpath($uri) {
return \Drupal::service('file_system')->realpath($uri); return \Drupal::service('file_system')->realpath($uri);
...@@ -1133,6 +1151,8 @@ function drupal_realpath($uri) { ...@@ -1133,6 +1151,8 @@ function drupal_realpath($uri) {
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::dirname(). * Use \Drupal\Core\File\FileSystem::dirname().
*
* @see https://www.drupal.org/node/2418133
*/ */
function drupal_dirname($uri) { function drupal_dirname($uri) {
return \Drupal::service('file_system')->dirname($uri); return \Drupal::service('file_system')->dirname($uri);
...@@ -1143,6 +1163,8 @@ function drupal_dirname($uri) { ...@@ -1143,6 +1163,8 @@ function drupal_dirname($uri) {
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::basename(). * Use \Drupal\Core\File\FileSystem::basename().
*
* @see https://www.drupal.org/node/2418133
*/ */
function drupal_basename($uri, $suffix = NULL) { function drupal_basename($uri, $suffix = NULL) {
return \Drupal::service('file_system')->basename($uri, $suffix); return \Drupal::service('file_system')->basename($uri, $suffix);
...@@ -1154,6 +1176,8 @@ function drupal_basename($uri, $suffix = NULL) { ...@@ -1154,6 +1176,8 @@ function drupal_basename($uri, $suffix = NULL) {
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::mkdir(). * Use \Drupal\Core\File\FileSystem::mkdir().
*
* @see https://www.drupal.org/node/2418133
*/ */
function drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) { function drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) {
return \Drupal::service('file_system')->mkdir($uri, $mode, $recursive, $context); return \Drupal::service('file_system')->mkdir($uri, $mode, $recursive, $context);
...@@ -1164,6 +1188,8 @@ function drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) { ...@@ -1164,6 +1188,8 @@ function drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) {
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::rmdir(). * Use \Drupal\Core\File\FileSystem::rmdir().
*
* @see https://www.drupal.org/node/2418133
*/ */
function drupal_rmdir($uri, $context = NULL) { function drupal_rmdir($uri, $context = NULL) {
return \Drupal::service('file_system')->rmdir($uri, $context); return \Drupal::service('file_system')->rmdir($uri, $context);
...@@ -1174,6 +1200,8 @@ function drupal_rmdir($uri, $context = NULL) { ...@@ -1174,6 +1200,8 @@ function drupal_rmdir($uri, $context = NULL) {
* *
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Core\File\FileSystem::tempnam(). * Use \Drupal\Core\File\FileSystem::tempnam().
*
* @see https://www.drupal.org/node/2418133
*/ */
function drupal_tempnam($directory, $prefix) { function drupal_tempnam($directory, $prefix) {
return \Drupal::service('file_system')->tempnam($directory, $prefix); return \Drupal::service('file_system')->tempnam($directory, $prefix);
...@@ -1218,6 +1246,8 @@ function file_directory_temp() { ...@@ -1218,6 +1246,8 @@ function file_directory_temp() {
* *
* @deprecated in Drupal 8.3.x-dev, will be removed before Drupal 9.0.0. * @deprecated in Drupal 8.3.x-dev, will be removed before Drupal 9.0.0.
* Use \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory(). * Use \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory().
*
* @see https://www.drupal.org/node/2418133
*/ */
function file_directory_os_temp() { function file_directory_os_temp() {
return ComponentFileSystem::getOsTemporaryDirectory(); return ComponentFileSystem::getOsTemporaryDirectory();
......
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