PHPackages                             acquia/drupal-environment-detector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. acquia/drupal-environment-detector

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

acquia/drupal-environment-detector
==================================

Provides common methods for detecting the current Acquia environment

1.7.0(1y ago)105.9M↓13.2%16[5 issues](https://github.com/acquia/drupal-environment-detector/issues)17GPL-2.0-or-laterPHPCI passing

Since May 7Pushed 5mo ago9 watchersCompare

[ Source](https://github.com/acquia/drupal-environment-detector)[ Packagist](https://packagist.org/packages/acquia/drupal-environment-detector)[ RSS](/packages/acquia-drupal-environment-detector/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (18)Used By (17)

Acquia Drupal Environment Detector
==================================

[](#acquia-drupal-environment-detector)

This package provides a static class that your application can use to **detect** various characteristics of the **current** hosting environment.

It also provides static **helper** classes that provide canonical information about **any** arbitrary environment.

Detector class
--------------

[](#detector-class)

Scans environment variables and settings files to determine several characteristics of the current hosting environment, including:

- Hosting provider (Acquia or non-Acquia)
- Hosting type (ACE, ACSF)
- Hosting realm (prod, devcloud, gardens, etc)
- Environment stage (dev, stage, prod)
- Environment type (IDE, ODE/CDE)
- Common site properties (name, file path)

See all available methods in [src/AcquiaDrupalEnvironmentDetector.php](src/AcquiaDrupalEnvironmentDetector.php).

Helper classes
--------------

[](#helper-classes)

The additional static classes allow you to predict the characteristics of any Acquia hosting environment given the site group and environment name, including:

- A mapping of Acquia environment names (e.g. `01test`, `stg`, `live`) to human-readable standard names (`dev`, `stage`, `prod`)
- A set of standard filesystem paths for things like the private files directory or `sites.json` file on ACSF.

Installation and usage
----------------------

[](#installation-and-usage)

In your project, require the plugin with Composer:

`composer require acquia/drupal-environment-detector`

License
=======

[](#license)

Copyright (C) 2020 Acquia, Inc.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance46

Moderate activity, may be stable

Popularity53

Moderate usage in the ecosystem

Community35

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 70.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~128 days

Recently: every ~206 days

Total

14

Last Release

538d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/514789?v=4)[Acquia](/maintainers/acquia)[@acquia](https://github.com/acquia)

![](https://avatars.githubusercontent.com/u/1984514?v=4)[Dane Powell](/maintainers/danepowell)[@danepowell](https://github.com/danepowell)

---

Top Contributors

[![danepowell](https://avatars.githubusercontent.com/u/1984514?v=4)](https://github.com/danepowell "danepowell (100 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (25 commits)")[![grasmash](https://avatars.githubusercontent.com/u/539205?v=4)](https://github.com/grasmash "grasmash (9 commits)")[![msherron](https://avatars.githubusercontent.com/u/1399395?v=4)](https://github.com/msherron "msherron (2 commits)")[![mikemadison13](https://avatars.githubusercontent.com/u/22753451?v=4)](https://github.com/mikemadison13 "mikemadison13 (1 commits)")[![joshirohit100](https://avatars.githubusercontent.com/u/1336423?v=4)](https://github.com/joshirohit100 "joshirohit100 (1 commits)")[![rajeshreeputra](https://avatars.githubusercontent.com/u/19570710?v=4)](https://github.com/rajeshreeputra "rajeshreeputra (1 commits)")[![Raksha-Bharuka](https://avatars.githubusercontent.com/u/43320617?v=4)](https://github.com/Raksha-Bharuka "Raksha-Bharuka (1 commits)")[![ssu-carlsoni](https://avatars.githubusercontent.com/u/115494275?v=4)](https://github.com/ssu-carlsoni "ssu-carlsoni (1 commits)")[![violinist-bot](https://avatars.githubusercontent.com/u/27495990?v=4)](https://github.com/violinist-bot "violinist-bot (1 commits)")

### Embed Badge

![Health badge](/badges/acquia-drupal-environment-detector/health.svg)

```
[![Health](https://phpackages.com/badges/acquia-drupal-environment-detector/health.svg)](https://phpackages.com/packages/acquia-drupal-environment-detector)
```

###  Alternatives

[dedi/sylius-seo-plugin

Sylius SEO plugin by Dedi.

28138.9k](/packages/dedi-sylius-seo-plugin)[flownative/neos-compressor

Output compression for Neos

1679.6k](/packages/flownative-neos-compressor)[swoole/zmq

ZeroMQ bindings for Swoole.

373.3k](/packages/swoole-zmq)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
