Unverified Commit 609bcb39 authored by larowlan's avatar larowlan
Browse files

Issue #3055304 by kim.pepper: Properly deprecate file_directory_os_temp

parent 4dfdaaed
......@@ -1229,6 +1229,7 @@ function file_directory_temp() {
* @see https://www.drupal.org/node/2418133
*/
function file_directory_os_temp() {
@trigger_error('file_directory_os_temp() is deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory() instead. See https://www.drupal.org/node/2418133', E_USER_DEPRECATED);
return ComponentFileSystem::getOsTemporaryDirectory();
}
......
......@@ -169,4 +169,11 @@ public function testDeprecatedDefaultScheme() {
$this->assertNotNull(file_default_scheme());
}
/**
* @expectedDeprecation file_directory_os_temp() is deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory() instead. See https://www.drupal.org/node/2418133
*/
public function testDeprecatedDirectoryOsTemp() {
$this->assertNotNull(file_directory_os_temp());
}
}
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