Files
2024-07-15 12:33:27 +02:00

26 lines
787 B
Markdown

# Drupal Finder
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/webflo/drupal-finder/ci.yml)](https://github.com/webflo/drupal-finder/actions/workflows/ci.yml)
[![Packagist](https://img.shields.io/packagist/v/webflo/drupal-finder.svg)](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+