Skip to content

Commit 63da666

Browse files
committed
minor #9222 fix creating a CacheKernel in HTTP cache documentation (danrot)
This PR was submitted for the master branch but it was merged into the 4.0 branch instead (closes #9222). Discussion ---------- fix creating a CacheKernel in HTTP cache documentation Hey, I was trying out to use the HTTP Cache for a talk and lecture I am giving, and with the instructions in the HTTP Cache documentation I only got an error that the class was not found. The changes I introduced here were also necessary. However, I am not completely sure if I missed something else, since I just skimmed the documentation, but I thought I send a PR anyway so that you see what I am talking about 😃 Commits ------- cc09426 fix creating a CacheKernel in HTTP cache documentation
2 parents d038da7 + cc09426 commit 63da666

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

http_cache.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ but is a great way to start.
8080
To enable the proxy, first create a caching kernel::
8181

8282
// src/CacheKernel.php
83+
namespace App;
84+
8385
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
8486

8587
class CacheKernel extends HttpCache
@@ -93,6 +95,9 @@ caching kernel:
9395
9496
// public/index.php
9597
98+
use App\Kernel;
99+
+ use App\CacheKernel;
100+
96101
// ...
97102
$kernel = new Kernel($_SERVER['APP_ENV'] ?? 'dev', $_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev')));
98103

0 commit comments

Comments
 (0)