Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
911f2499
Commit
911f2499
authored
Jan 08, 2015
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed Symfony Http Kernel Cache deprecations
parent
3af0b910
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/Silex/Provider/HttpCacheServiceProvider.php
src/Silex/Provider/HttpCacheServiceProvider.php
+5
-0
No files found.
src/Silex/Provider/HttpCacheServiceProvider.php
View file @
911f2499
...
...
@@ -17,6 +17,7 @@ use Silex\HttpCache;
use
Symfony\Component\HttpKernel\HttpCache\Esi
;
use
Symfony\Component\HttpKernel\HttpCache\Store
;
use
Symfony\Component\HttpKernel\EventListener\EsiListener
;
use
Symfony\Component\HttpKernel\EventListener\SurrogateListener
;
/**
* Symfony HttpKernel component Provider for HTTP cache.
...
...
@@ -46,6 +47,10 @@ class HttpCacheServiceProvider implements ServiceProviderInterface
});
$app
[
'http_cache.esi_listener'
]
=
$app
->
share
(
function
(
$app
)
{
if
(
class_exists
(
'Symfony\Component\HttpKernel\EventListener\SurrogateListener'
))
{
return
new
SurrogateListener
(
$app
[
'http_cache.esi'
]);
}
return
new
EsiListener
(
$app
[
'http_cache.esi'
]);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment