diff --git a/components/dependency_injection/autowiring.rst b/components/dependency_injection/autowiring.rst index 46196cc846d..b2707a33411 100644 --- a/components/dependency_injection/autowiring.rst +++ b/components/dependency_injection/autowiring.rst @@ -13,8 +13,8 @@ typehint which is useful in the field of `Rapid Application Development`_, when designing prototypes in early stages of large projects. It makes it easy to register a service graph and eases refactoring. -Imagine you're building an API to publish statuses on a Twitter feed, which -has to be obfuscated with ``ROT13`` (a special case of the Caesar cipher). +Imagine you're building an API to publish statuses on a Twitter feed, obfuscated +with `ROT13`_ (a special case of the Caesar cipher). Start by creating a ROT13 transformer class:: diff --git a/cookbook/debugging.rst b/cookbook/debugging.rst index 2333bd65665..d56c36f3656 100644 --- a/cookbook/debugging.rst +++ b/cookbook/debugging.rst @@ -21,10 +21,12 @@ 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 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. + +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:: @@ -38,8 +40,8 @@ The ``app_dev.php`` front controller reads as follows by default:: $request = Request::createFromGlobals(); // ... -To make your debugger happier, disable all PHP class caches by removing (or -commenting) the call to ``loadClassCache()``:: +To make your debugger happier, disable the loading of all PHP class caches +by removing the call to ``loadClassCache()``:: // ... @@ -56,7 +58,5 @@ commenting) the call to ``loadClassCache()``:: 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. diff --git a/cookbook/form/data_transformers.rst b/cookbook/form/data_transformers.rst index 255e64c6e8c..680758ddd6d 100644 --- a/cookbook/form/data_transformers.rst +++ b/cookbook/form/data_transformers.rst @@ -254,7 +254,7 @@ Next, you need to instantiate the ``IssueToNumberTransformer`` class from inside of the entity manager (because ``IssueToNumberTransformer`` needs this). No problem! Just add a ``__construct()`` function to ``TaskType`` and force this -to be passed in by registering ``TaskType`` as a service.:: +to be passed in by registering ``TaskType`` as a service:: // src/AppBundle/Form/TaskType.php namespace AppBundle\Form\Type;