Skip to content

Commit 758a9f7

Browse files
committed
Removed doc on load cache class
1 parent 779983d commit 758a9f7

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

debug.rst

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -24,51 +24,6 @@ with any PHP debug environment, among them:
2424
* `PsySH`_, a PHP `REPL`_ (Read-eval-print loop) debugger. Use the
2525
`FidryPsyshBundle`_ for a dedicated Symfony integration of PsySH.
2626

27-
Disabling the Bootstrap File and Class Caching
28-
----------------------------------------------
29-
30-
To make Symfony run as fast as possible, it creates big PHP files in your cache
31-
containing the aggregation of PHP classes your project needs for every request.
32-
However, this behavior can confuse your IDE or your debugger. This recipe shows
33-
you how you can tweak this caching mechanism to make it friendlier when you
34-
need to debug code that involves Symfony classes.
35-
36-
The ``app_dev.php`` front controller reads as follows by default::
37-
38-
// ...
39-
40-
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
41-
require_once __DIR__.'/../app/AppKernel.php';
42-
43-
$kernel = new AppKernel('dev', true);
44-
$kernel->loadClassCache();
45-
$request = Request::createFromGlobals();
46-
47-
To make your debugger happier, disable all PHP class caches by removing the
48-
call to ``loadClassCache()`` and by replacing the require statements like
49-
below::
50-
51-
// ...
52-
53-
// $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
54-
$loader = require_once __DIR__.'/../app/autoload.php';
55-
require_once __DIR__.'/../app/AppKernel.php';
56-
57-
$kernel = new AppKernel('dev', true);
58-
// $kernel->loadClassCache();
59-
$request = Request::createFromGlobals();
60-
61-
.. tip::
62-
63-
If you disable the PHP caches, don't forget to revert these changes after
64-
your debugging session.
65-
66-
Some IDEs do not like the fact that some classes are stored in different
67-
locations. To avoid problems, you can either tell your IDE to ignore the PHP
68-
cache files, or you can change the extension used by Symfony for these files::
69-
70-
$kernel->loadClassCache('classes', '.php.cache');
71-
7227
Dumping Variables with the VarDumper
7328
------------------------------------
7429

0 commit comments

Comments
 (0)