Issue #2914033 by alexpott, borisson_: Complete deprecation of install_ensure_config_directory()

8.5.x
xjm 2017-10-19 11:34:47 -05:00
parent 40b143ff9a
commit 119362cef9
2 changed files with 2 additions and 1 deletions

View File

@ -535,6 +535,7 @@ function drupal_install_config_directories() {
* @see https://www.drupal.org/node/2501187
*/
function install_ensure_config_directory($type) {
@trigger_error('install_ensure_config_directory() is deprecated in Drupal 8.1.0 and will be removed before Drupal 9.0.0. Use config_get_config_directory() and file_prepare_directory() instead. See https://www.drupal.org/node/2501187.', E_USER_DEPRECATED);
// The config directory must be defined in settings.php.
global $config_directories;
if (!isset($config_directories[$type])) {

View File

@ -146,7 +146,7 @@ abstract class KernelTestBase extends TestBase {
$path = $this->siteDirectory . '/config_' . CONFIG_SYNC_DIRECTORY;
$GLOBALS['config_directories'][CONFIG_SYNC_DIRECTORY] = $path;
// Ensure the directory can be created and is writeable.
if (!install_ensure_config_directory(CONFIG_SYNC_DIRECTORY)) {
if (!file_prepare_directory($path, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS)) {
throw new \RuntimeException("Failed to create '" . CONFIG_SYNC_DIRECTORY . "' config directory $path");
}
// Provide the already resolved path for tests.