File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 22
33<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
44<phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5- xsi : noNamespaceSchemaLocation =" http://schema.phpunit.de/4.7 /phpunit.xsd"
5+ xsi : noNamespaceSchemaLocation =" http://schema.phpunit.de/6.5 /phpunit.xsd"
66 backupGlobals =" false"
77 colors =" true"
88 bootstrap =" tests/bootstrap.php"
Original file line number Diff line number Diff line change @@ -114,7 +114,11 @@ public static function bootstrapEnv($env = null)
114114
115115 private static function loadEnv (Dotenv $ dotenv , $ path )
116116 {
117- $ dotenv ->load ($ path );
117+ if (file_exists ($ path ) || !file_exists ($ p = "$ path.dist " )) {
118+ $ dotenv ->load ($ path );
119+ } else {
120+ $ dotenv ->load ($ p );
121+ }
118122
119123 if (null === $ env = isset ($ _SERVER ['APP_ENV ' ]) ? $ _SERVER ['APP_ENV ' ] : (isset ($ _ENV ['APP_ENV ' ]) ? $ _ENV ['APP_ENV ' ] : null )) {
120124 $ dotenv ->populate (array ('APP_ENV ' => $ env = 'dev ' ));
Original file line number Diff line number Diff line change 22
33<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
44<phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5- xsi : noNamespaceSchemaLocation =" http://schema.phpunit.de/6.1 /phpunit.xsd"
5+ xsi : noNamespaceSchemaLocation =" http://schema.phpunit.de/6.5 /phpunit.xsd"
66 backupGlobals =" false"
77 colors =" true"
88 bootstrap =" vendor/autoload.php"
You can’t perform that action at this time.
0 commit comments