Skip to content

Commit

Permalink
Updated deprecated drupal_rewrite_settings() in ScriptHandler.php. (#634
Browse files Browse the repository at this point in the history
)
  • Loading branch information
AlexSkrypnyk authored Feb 28, 2024
1 parent 2abda82 commit a6d9327
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/composer/ScriptHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Composer\Script\Event;
use Composer\Semver\Comparator;
use Drupal\Core\Site\Settings;
use Drupal\Core\Site\SettingsEditor;
use DrupalFinder\DrupalFinder;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Filesystem\Path;
Expand Down Expand Up @@ -46,7 +47,7 @@ public static function createRequiredFiles(Event $event) {
'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot),
'required' => TRUE,
];
drupal_rewrite_settings($settings, $drupalRoot . '/sites/default/settings.php');
SettingsEditor::rewrite($drupalRoot . '/sites/default/settings.php', $settings);
$fs->chmod($drupalRoot . '/sites/default/settings.php', 0666);
$event->getIO()->write("Created a sites/default/settings.php file with chmod 0666");
}
Expand Down

0 comments on commit a6d9327

Please sign in to comment.