Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e16cd64

Browse files
committed
updated for latest Symfony2
1 parent 5f01099 commit e16cd64

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

guides/cache/http.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ caching::
438438

439439
// wrap the default AppKernel with the AppCache one
440440
$kernel = new AppCache(new AppKernel('prod', false));
441-
$kernel->handle(new Request())->send();
441+
$kernel->handle(Request::createFromGlobals())->send();
442442

443443
.. tip::
444444

@@ -453,7 +453,7 @@ finely tuned via a set of options you can set by overriding the
453453
``getOptions()`` method::
454454

455455
// app/AppCache.php
456-
class AppCache extends Cache
456+
class AppCache extends HttpCache
457457
{
458458
protected function getOptions()
459459
{
@@ -759,7 +759,7 @@ Here is how you can configure the Symfony2 reverse proxy to support the
759759
``PURGE`` HTTP method::
760760

761761
// app/AppCache.php
762-
class AppCache extends Cache
762+
class AppCache extends HttpCache
763763
{
764764
protected function invalidate(Request $request)
765765
{

quick_tour/the_architecture.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ lives::
3535
use Symfony\Component\HttpFoundation\Request;
3636

3737
$kernel = new AppKernel('prod', false);
38-
$kernel->handle(new Request())->send();
38+
$kernel->handle(Request::createFromGlobals())->send();
3939

4040
Like any front controller, ``app.php`` uses a Kernel Class, ``AppKernel``, to
4141
bootstrap the application.

0 commit comments

Comments
 (0)