drupal-finder
drupal-finder copied to clipboard
Problem in drupalRoot and composerRoot detection if the installer paths of package drupal/core is dynamically set and not in composer.json
DrupalFinder is unable to detect drupalRoot and composerRoot in the following cases :
- a project has a composer.json at its root path but installs drupal core (package drupal/core) in a subdirectory
- the rule to place the package drupal/core is not written into the composer.json, but it is set inside a composer plug-in which patches the "extra" section when composer runs.
I saw in the source code of Drupalfinder, composer.json files may be opended and parsed to search for the target installation path of the drupal/core package. One way to improve this, if possible, may be to change the code of DrupalFinder to use the composer object and retrieve the content of the extra section directly in PHP... what do you think?
Same problem here!