Skip to content

Commit 6ef2099

Browse files
committed
reflect behavior changes in cache generation
Starting with Symfony 2.8, the class cache is generated when the cache is warmed up. This means that you cannot prevent the cache from being generated, but you must simply not load it to ease debugging. Also, this means that you have to ignore the cache files in your IDE now if it cannot deal with them properly.
1 parent 0103364 commit 6ef2099

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

cookbook/debugging.rst

+8-11
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ Disabling the Bootstrap File and Class Caching
2121

2222
And to make the production environment as fast as possible, Symfony creates
2323
big PHP files in your cache containing the aggregation of PHP classes your
24-
project needs for every request. However, this behavior can confuse your IDE
25-
or your debugger. This recipe shows you how you can tweak this caching
26-
mechanism to make it friendlier when you need to debug code that involves
27-
Symfony classes.
24+
project needs for every request. However, this behavior can confuse your
25+
debugger. This recipe shows you how you can tweak this caching mechanism
26+
to make it friendlier when you need to debug code that involves Symfony classes.
2827

2928
The ``app_dev.php`` front controller reads as follows by default::
3029

@@ -37,9 +36,9 @@ The ``app_dev.php`` front controller reads as follows by default::
3736
$kernel->loadClassCache();
3837
$request = Request::createFromGlobals();
3938

40-
To make your debugger happier, disable all PHP class caches by removing the
41-
call to ``loadClassCache()`` and by replacing the require statements like
42-
below::
39+
To make your debugger happier, disable the loading of all PHP class caches
40+
by removing the call to ``loadClassCache()`` and by replacing the require
41+
statements like below::
4342

4443
// ...
4544

@@ -57,7 +56,5 @@ below::
5756
session.
5857

5958
Some IDEs do not like the fact that some classes are stored in different
60-
locations. To avoid problems, you can either tell your IDE to ignore the PHP
61-
cache files, or you can change the extension used by Symfony for these files::
62-
63-
$kernel->loadClassCache('classes', '.php.cache');
59+
locations. To avoid problems, you can tell your IDE to ignore the PHP cache
60+
file.

0 commit comments

Comments
 (0)