Skip to content

Commit a6d9327

Browse files
authored
Updated deprecated drupal_rewrite_settings() in ScriptHandler.php. (#634)
1 parent 2abda82 commit a6d9327

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/composer/ScriptHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Composer\Script\Event;
1111
use Composer\Semver\Comparator;
1212
use Drupal\Core\Site\Settings;
13+
use Drupal\Core\Site\SettingsEditor;
1314
use DrupalFinder\DrupalFinder;
1415
use Symfony\Component\Filesystem\Filesystem;
1516
use Symfony\Component\Filesystem\Path;
@@ -46,7 +47,7 @@ public static function createRequiredFiles(Event $event) {
4647
'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot),
4748
'required' => TRUE,
4849
];
49-
drupal_rewrite_settings($settings, $drupalRoot . '/sites/default/settings.php');
50+
SettingsEditor::rewrite($drupalRoot . '/sites/default/settings.php', $settings);
5051
$fs->chmod($drupalRoot . '/sites/default/settings.php', 0666);
5152
$event->getIO()->write("Created a sites/default/settings.php file with chmod 0666");
5253
}

0 commit comments

Comments
 (0)