-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
The return TRUE; at DrupalFinder on line 88 stops the execution and makes $drupalRoot and $composerRoot contains the same value and $composerRoot never obtain the real path where the composer.json file is located.
https://github.com/webflo/drupal-finder/blob/master/src/DrupalFinder.php#L88
You can replicate by creating an example.php file containing:
use DrupalFinder\DrupalFinder;
require_once 'vendor/autoload.php';
$drupalFinder = new DrupalFinder();
$drupalFinder->locateRoot('/path/to/drupal/sites/drupal.dev/web');
$drupalRoot = $drupalFinder->getDrupalRoot();
$projectRoot = $drupalFinder->getComposerRoot();
echo 'projectRoot: ' . $projectRoot . PHP_EOL;
echo 'drupalRoot: ' . $drupalRoot . PHP_EOL;
and execute by php example.php and the output will be equal in both:
projectRoot: /path/to/drupal/sites/drupal.dev/web
drupalRoot: /path/to/drupal/sites/drupal.dev/web
Removing the offending line at 88 makes this works as expected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels