Get rid of config/bootstrap.php for 5.1 apps

This commit is contained in:
Nicolas Grekas
2020-01-29 16:53:59 +01:00
parent 990f591216
commit a0cb2ea41f
45 changed files with 132 additions and 46 deletions
-1
View File
@@ -1 +0,0 @@
../4.4/config
@@ -0,0 +1 @@
../../../3.3/config/packages/cache.yaml
@@ -0,0 +1,15 @@
framework:
#csrf_protection: true
#http_method_override: true
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session:
handler_id: null
cookie_secure: auto
cookie_samesite: lax
#esi: true
#fragments: true
php_errors:
log: true
+1
View File
@@ -0,0 +1 @@
../../../4.2/config/packages/test/
+1
View File
@@ -0,0 +1 @@
../../4.4/config/routes/
+1
View File
@@ -0,0 +1 @@
../../4.2/config/services.yaml
+1 -1
View File
@@ -1 +1 @@
../4.4/manifest.json
../4.2/manifest.json
@@ -1 +1 @@
../4.4/post-install.txt
../4.2/post-install.txt
-1
View File
@@ -1 +0,0 @@
../4.4/public
@@ -0,0 +1,30 @@
<?php
use App\Kernel;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request;
require dirname(__DIR__).'/vendor/autoload.php';
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
if ($_SERVER['APP_DEBUG']) {
umask(0000);
Debug::enable();
}
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
}
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);