Skip to content

Commit 05b84ac

Browse files
tannguyen04AlexSkrypnyk
authored andcommitted
Use new Drupal Finder API. (#673)
1 parent 483f9fb commit 05b84ac

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"drush/drush": "^13@beta",
1818
"oomphinc/composer-installers-extender": "^2.0",
1919
"vlucas/phpdotenv": "^5.1",
20-
"webflo/drupal-finder": "^1.2"
20+
"webflo/drupal-finder": "^1.3"
2121
},
2222
"require-dev": {
2323
"drupal/core-dev": "^11@alpha",

scripts/composer/ScriptHandler.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@
1212
use Drupal\Core\Site\Settings;
1313
use Drupal\Core\Site\SettingsEditor;
1414
use DrupalFinder\DrupalFinder;
15+
use DrupalFinder\DrupalFinderComposerRuntime;
1516
use Symfony\Component\Filesystem\Filesystem;
16-
use Symfony\Component\Filesystem\Path;
1717

1818
class ScriptHandler {
1919

2020
public static function createRequiredFiles(Event $event) {
2121
$fs = new Filesystem();
22-
$drupalFinder = new DrupalFinder();
23-
$drupalFinder->locateRoot(getcwd());
22+
$drupalFinder = new DrupalFinderComposerRuntime();
2423
$drupalRoot = $drupalFinder->getDrupalRoot();
2524

2625
$dirs = [
@@ -44,7 +43,7 @@ public static function createRequiredFiles(Event $event) {
4443
require_once $drupalRoot . '/core/includes/install.inc';
4544
new Settings([]);
4645
$settings['settings']['config_sync_directory'] = (object) [
47-
'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot),
46+
'value' => '../config/sync',
4847
'required' => TRUE,
4948
];
5049
SettingsEditor::rewrite($drupalRoot . '/sites/default/settings.php', $settings);

0 commit comments

Comments
 (0)