diff --git a/.travis.yml b/.travis.yml index 2ef520a..043fb01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,6 +44,7 @@ jobs: before_install: - nvm use 12.13.1 + - composer self-update 1.10.16 - composer create-project --no-dev acquia/orca ../orca "$ORCA_VERSION" - ../orca/bin/travis/before_install.sh diff --git a/README.md b/README.md index 6f2f539..fb18a15 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,16 @@ Acquia Drupal Environment Detector This package provides a common static class and methods for detecting the current Acquia Cloud environment. +It can report several characteristics of the current 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). + ## Installation and usage In your project, require the plugin with Composer: diff --git a/src/AcquiaDrupalEnvironmentDetector.php b/src/AcquiaDrupalEnvironmentDetector.php index 455bea8..a86d592 100644 --- a/src/AcquiaDrupalEnvironmentDetector.php +++ b/src/AcquiaDrupalEnvironmentDetector.php @@ -46,7 +46,7 @@ public static function isAcsfEnv($ah_group = NULL, $ah_env = NULL) { } /** - * Is AH prod. + * Is this a prod environment on Acquia hosting. * * @param string|null $ah_env * Environment machine name. @@ -63,7 +63,11 @@ public static function isAhProdEnv($ah_env = NULL) { } /** - * Is AH stage. + * Is this a stage environment on Acquia hosting. + * + * Legacy stage environments are typically named 'stg'. More recently they are + * named 'test'. Some applications may have non-standard environment names, + * these are not supported. * * @param string|null $ah_env * Environment machine name. @@ -80,7 +84,7 @@ public static function isAhStageEnv($ah_env = NULL) { } /** - * Is AH dev. + * Is this a dev environment on Acquia hosting. * * @param string|null $ah_env * Environment machine name.