We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6118914 + 3fc7d5f commit 7aa3f75Copy full SHA for 7aa3f75
http_cache.rst
@@ -99,13 +99,9 @@ caching kernel:
99
use App\Kernel;
100
101
// ...
102
- $env = $_SERVER['APP_ENV'] ?? 'dev';
103
- $debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env));
104
- // ...
105
- $kernel = new Kernel($env, $debug);
106
-
+ $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
107
+ // Wrap the default Kernel with the CacheKernel one in 'prod' environment
108
- + if ('prod' === $env) {
+ + if ('prod' === $kernel->getEnvironment()) {
109
+ $kernel = new CacheKernel($kernel);
110
+ }
111
0 commit comments