-
Notifications
You must be signed in to change notification settings - Fork 0
Move cache enablement to framework config #293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,8 +37,18 @@ framework: | |
| # Registers the constructor extractor. | ||
| with_constructor_extractor: ~ | ||
|
|
||
| http_cache: true | ||
|
|
||
| when@test: | ||
| framework: | ||
| test: true | ||
| session: | ||
| storage_factory_id: session.storage.factory.mock_file | ||
|
|
||
| when@prod: | ||
| framework: | ||
| http_cache: true | ||
|
|
||
| when@staging: | ||
| framework: | ||
| http_cache: true | ||
|
Comment on lines
+40
to
+54
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,14 +25,6 @@ | |||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| return function (array $context) { | ||||||||||||||||||
| $kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); | ||||||||||||||||||
| if ('prod' === $kernel->getEnvironment() || | ||||||||||||||||||
| 'staging' === $kernel->getEnvironment()) | ||||||||||||||||||
| { | ||||||||||||||||||
| $kernel = new CacheKernel($kernel); | ||||||||||||||||||
| // https://symfony.com/doc/current/reference/configuration/framework.html#http-method-override | ||||||||||||||||||
| Request::enableHttpMethodParameterOverride(); | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| return $kernel; | ||||||||||||||||||
| return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); | ||||||||||||||||||
|
||||||||||||||||||
| return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); | |
| $kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); | |
| if ('prod' === $kernel->getEnvironment()) { | |
| return new CacheKernel($kernel); | |
| } | |
| return $kernel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment above
http_method_overridesays staging/prod also callenableHttpMethodParameterOverride()inindex.php, but this PR removes that reverse-proxy creation. Please update/remove that comment so the configuration documentation matches the actual bootstrapping approach.