Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cookbook][Debugging] reflect behavior changes in cache generation #6263

Merged
merged 1 commit into from
Feb 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions cookbook/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ Disabling the Bootstrap File and Class Caching

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you explain that this can cause troubles ... but I'm missing the reason for it. What about rewording this:

However, this behavior can confuse your debugger.

to something like this:

However, this behavior can confuse your debugger, because the same class can be located in
two different places: the original class file and the big file which aggregates lots of classes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change made :)

debugger. This recipe shows you how you can tweak this caching mechanism
to make it friendlier when you need to debug code that involves Symfony classes.

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

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

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

// ...

Expand All @@ -57,7 +56,5 @@ below::
session.

Some IDEs do not like the fact that some classes are stored in different
locations. To avoid problems, you can either tell your IDE to ignore the PHP
cache files, or you can change the extension used by Symfony for these files::

$kernel->loadClassCache('classes', '.php.cache');
locations. To avoid problems, you can tell your IDE to ignore the PHP cache
file.