webflo/drupal-finder
A small PHP utility that locates the root of a Drupal installation from any directory, supporting both Drupal 7 and 8+. It detects the Drupal version, core path, and site directory, making it easy for tools like Drush, Composer plugins, and custom scripts to work reliably across project layouts.
web/, docroot/, project root), Drupal 7 vs. 8+ structures, multisite installs, and symlinked vendor paths is deceptively fiddly. drupal-finder already encodes those heuristics and is pulled in transitively by tooling like Drush and PHPStan Drupal extensions.drupal/recommended-project, custom docroots, legacy Drupal 7 trees, multisite — rather than a single repo you control.Look elsewhere when:
For executives: This is a small, free, open-source PHP utility that reliably answers one question — "where does Drupal live in this project?" Rather than paying engineers to build and maintain that logic ourselves, we adopt a proven component already used across the Drupal tooling ecosystem. It accelerates our developer-tooling roadmap at near-zero cost, but it carries a GPL-2.0 license, so we route it through legal review before embedding it in anything proprietary.
For engineering: webflo/drupal-finder gives us one API for root detection instead of brittle, hand-rolled path guessing. It handles Composer docroots, legacy layouts, multisite, and symlinks, and it's already a transitive dependency of mainstream Drupal tooling, so it's effectively de-risked. It's stable and recently released (June 2024) but intentionally narrow in scope — expect a small, single-purpose library, not a framework. Keep it confined to CLI/dev-time tooling, and confirm GPL-2.0 compatibility with legal before shipping it in a closed-source context.
How can I help you explore Laravel packages today?