Skip to content

Commit

Permalink
Fix loading of parameters from .env.* files (#3224)
Browse files Browse the repository at this point in the history
The documentation [states](http://codeception.com/docs/06-ModulesAndHelpers#Dynamic-Configuration-With-Params) that we can load params from files named `.env` or `.env.something` but the latter doesn't work because the regex only matches filenames ending with `.env` or `.ini`

Change the `.env|.ini` regex
  • Loading branch information
smotesko authored and DavertMik committed Jun 21, 2016
1 parent 8192e36 commit f6d73df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Codeception/Configuration.php
Expand Up @@ -646,7 +646,7 @@ private static function prepareParams($settings)
}

// .env and ini files
if (preg_match('~(\.ini|\.env)$~', $paramStorage)) {
if (preg_match('~(\.ini$|\.env(\.|$))~', $paramStorage)) {
$params = parse_ini_file($paramsFile);
static::$params = array_merge(self::$params, $params);
continue;
Expand Down

0 comments on commit f6d73df

Please sign in to comment.