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 2
2
3
3
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4
4
<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"
6
6
backupGlobals =" false"
7
7
colors =" true"
8
8
bootstrap =" tests/bootstrap.php"
Original file line number Diff line number Diff line change @@ -114,7 +114,11 @@ public static function bootstrapEnv($env = null)
114
114
115
115
private static function loadEnv (Dotenv $ dotenv , $ path )
116
116
{
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
+ }
118
122
119
123
if (null === $ env = isset ($ _SERVER ['APP_ENV ' ]) ? $ _SERVER ['APP_ENV ' ] : (isset ($ _ENV ['APP_ENV ' ]) ? $ _ENV ['APP_ENV ' ] : null )) {
120
124
$ dotenv ->populate (array ('APP_ENV ' => $ env = 'dev ' ));
Original file line number Diff line number Diff line change 2
2
3
3
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4
4
<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"
6
6
backupGlobals =" false"
7
7
colors =" true"
8
8
bootstrap =" vendor/autoload.php"
You can’t perform that action at this time.
0 commit comments