Skip to content

Commit 49e24b9

Browse files
author
Fabien Bourigault
committed
remove debugging class cache and bootstrap section
1 parent 47024b4 commit 49e24b9

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

debug/debugging.rst

-47
Original file line numberDiff line numberDiff line change
@@ -14,53 +14,6 @@ configuration is optimized for two main purposes:
1414
* Be as similar as possible as the production environment to avoid problems
1515
when deploying the project.
1616

17-
Disabling the Bootstrap File and Class Caching
18-
----------------------------------------------
19-
20-
And to make the production environment as fast as possible, Symfony creates
21-
big PHP files in your cache containing the aggregation of PHP classes your
22-
project needs for every request. However, this behavior can confuse your debugger,
23-
because the same class can be located in two different places: the original class
24-
file and the big file which aggregates lots of classes.
25-
26-
This recipe shows you how you can tweak this caching mechanism to make it friendlier
27-
when you need to debug code that involves Symfony classes.
28-
29-
The ``app_dev.php`` front controller reads as follows by default::
30-
31-
// ...
32-
33-
$loader = require __DIR__.'/../app/autoload.php';
34-
Debug::enable();
35-
36-
$kernel = new AppKernel('dev', true);
37-
$kernel->loadClassCache();
38-
$request = Request::createFromGlobals();
39-
// ...
40-
41-
To make your debugger happier, disable the loading of all PHP class caches
42-
by removing the call to ``loadClassCache()``::
43-
44-
// ...
45-
46-
$loader = require_once __DIR__.'/../app/autoload.php';
47-
Debug::enable();
48-
49-
$kernel = new AppKernel('dev', true);
50-
// $kernel->loadClassCache();
51-
$request = Request::createFromGlobals();
52-
53-
.. tip::
54-
55-
If you disable the PHP caches, don't forget to revert after your debugging
56-
session.
57-
58-
Some IDEs do not like the fact that some classes are stored in different
59-
locations. To avoid problems, you can either tell your IDE to ignore the PHP
60-
cache files, or you can change the extension used by Symfony for these files::
61-
62-
$kernel->loadClassCache('classes', '.php.cache');
63-
6417
Useful Debugging Commands
6518
-------------------------
6619

0 commit comments

Comments
 (0)