26 lines
787 B
Markdown
26 lines
787 B
Markdown
# Drupal Finder
|
|
|
|
[](https://github.com/webflo/drupal-finder/actions/workflows/ci.yml)
|
|
[](https://packagist.org/packages/webflo/drupal-finder)
|
|
|
|
Drupal Finder provides a class to locate a Drupal installation based on Composer metadata.
|
|
|
|
## Usage
|
|
|
|
```PHP
|
|
$drupalFinder = new \DrupalFinder\DrupalFinderComposerRuntime();
|
|
|
|
$drupalRoot = $drupalFinder->getDrupalRoot();
|
|
$composerRoot = $drupalFinder->getComposerRoot();
|
|
$vendorDir = $drupalFinder->getVendorDir();
|
|
```
|
|
|
|
## Examples
|
|
|
|
- [Drush](https://github.com/drush-ops/drush)
|
|
- [phpstan-drupal](https://github.com/mglaman/phpstan-drupal)
|
|
|
|
## License
|
|
|
|
GPL-2.0+
|