Skip to content
Snippets Groups Projects
Commit 500019f5 authored by Neslee Canil Pinto's avatar Neslee Canil Pinto Committed by Rajab Natshah
Browse files

Issue #3121616 by Neslee Canil Pinto: Replace deprecated method...

Issue #3121616 by Neslee Canil Pinto: Replace deprecated method file_unmanaged_move and file_scan_directory
parent 31f7d0a4
No related branches found
No related tags found
No related merge requests found
......@@ -126,7 +126,7 @@ class ConfigBit {
$config_file = drupal_get_path($type, $project) . '/' . $language_config_file;
if (file_exists($config_file)) {
$config_file_backup = $config_file . $config_bit_data['action']['archive_files']['archive_extensiton'];
file_unmanaged_move($config_file, $config_file_backup);
\Drupal::service('file_system')->move($config_file, $config_file_backup);
}
}
}
......@@ -157,7 +157,7 @@ class ConfigBit {
$config_file = drupal_get_path($type, $project) . '/' . $language_config_file;
$config_file_backup = $config_file . $config_bit_data['action']['unarchive_files']['archive_extensiton'];
if (!file_exists($config_file) && file_exists($config_file_backup)) {
file_unmanaged_move($config_file_backup, $config_file);
\Drupal::service('file_system')->move($config_file_backup, $config_file);
}
}
}
......
......@@ -29,7 +29,7 @@ function varbase_install() {
$storage = new FileStorage($optional_install_path, StorageInterface::DEFAULT_COLLECTION);
$config_installer->installOptionalConfig($storage, '');
// Have the .settings.yml configs into the active config.
$settings_config_files = file_scan_directory($optional_install_path, '/^.*(settings.yml)$/i');
$settings_config_files = \Drupal::service('file_system')->scanDirectory($optional_install_path, '/^.*(settings.yml)$/i');
if (isset($settings_config_files) && is_array($settings_config_files)) {
foreach ($settings_config_files as $settings_config_file) {
$settings_config_file_content = file_get_contents(DRUPAL_ROOT . '/' . $settings_config_file->uri);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment