We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various hacks are needed if drupal/core is in the vendor directory. The drupal-finder package doesn't support this (and probably shouldn't.) But we can in the autoloader: https://github.com/mglaman/phpstan-drupal/blob/main/src/Drupal/DrupalAutoloader.php#L60-L69
drupal/core
drupal-finder
$drupalRoot = $finder->getDrupalRoot(); $drupalVendorRoot = $finder->getVendorDir(); if (! (bool) $drupalRoot || ! (bool) $drupalVendorRoot) { throw new \RuntimeException("Unable to detect Drupal at {$drupalParams['drupal_root']}"); }
Instead of throwing a runtime exception here, try using Composer's installed paths to find drupal/core:
\Composer\InstalledVersions::getInstallPath('drupal/core')
Then less hacks are needed.
The text was updated successfully, but these errors were encountered:
See webflo/drupal-finder#64
Sorry, something went wrong.
I've added a PR to provide a temp workaround #702
No branches or pull requests
Feature request
Various hacks are needed if
drupal/core
is in the vendor directory. Thedrupal-finder
package doesn't support this (and probably shouldn't.) But we can in the autoloader: https://github.com/mglaman/phpstan-drupal/blob/main/src/Drupal/DrupalAutoloader.php#L60-L69Instead of throwing a runtime exception here, try using Composer's installed paths to find
drupal/core
:Then less hacks are needed.
The text was updated successfully, but these errors were encountered: