File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Symfony \Component \Dotenv \Dotenv ;
6
6
7
- require dirname (__DIR__ ). '/vendor/autoload.php ' ;
7
+ require dirname (__DIR__ ) . '/vendor/autoload.php ' ;
8
8
9
9
if (!class_exists (Dotenv::class)) {
10
10
throw new LogicException ('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application. ' );
11
11
}
12
12
13
13
// Load cached env vars if the .env.local.php file exists
14
14
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
15
- if (is_array ($ env = @include dirname (__DIR__ ). '/.env.local.php ' ) && (!isset ($ env ['APP_ENV ' ]) || ($ _SERVER ['APP_ENV ' ] ?? $ _ENV ['APP_ENV ' ] ?? $ env ['APP_ENV ' ]) === $ env ['APP_ENV ' ])) {
15
+ if (is_array ($ env = @include dirname (__DIR__ ) . '/.env.local.php ' ) && (!isset ($ env ['APP_ENV ' ]) || ($ _SERVER ['APP_ENV ' ] ?? $ _ENV ['APP_ENV ' ] ?? $ env ['APP_ENV ' ]) === $ env ['APP_ENV ' ])) {
16
16
(new Dotenv ())->usePutenv (false )->populate ($ env );
17
17
} else {
18
18
// load all the .env files
19
- (new Dotenv ())->usePutenv (false )->loadEnv (dirname (__DIR__ ). '/.env ' );
19
+ (new Dotenv ())->usePutenv (false )->loadEnv (dirname (__DIR__ ) . '/.env ' );
20
20
}
21
21
22
22
$ _SERVER += $ _ENV ;
Original file line number Diff line number Diff line change 4
4
5
5
use App \Kernel ;
6
6
7
- require_once dirname (__DIR__ ). '/vendor/autoload_runtime.php ' ;
7
+ require_once dirname (__DIR__ ) . '/vendor/autoload_runtime.php ' ;
8
8
9
9
// Support CloudFlare Flexible SSL
10
10
// https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-visitor
11
11
if ($ _SERVER ['HTTP_CF_VISITOR ' ] ?? false ) {
12
12
$ _SERVER ['HTTP_X_FORWARDED_PROTO ' ] = json_decode ($ _SERVER ['HTTP_CF_VISITOR ' ], true )['scheme ' ];
13
13
}
14
14
15
- return function (array $ context ) {
15
+ return static function (array $ context ) {
16
16
return new Kernel ($ context ['APP_ENV ' ], (bool ) $ context ['APP_DEBUG ' ]);
17
17
};
You can’t perform that action at this time.
0 commit comments