From e78c1cad39d319ec929ffcb49ad4977030c590c8 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 5 Oct 2013 10:17:03 +0200 Subject: [PATCH] use DebugClassLoader class from Debug component instead of the one from the Class Loader component --- .../class_loader/debug_class_loader.rst | 14 +++--------- components/debug/class_loader.rst | 22 +++++++++++++++++++ components/debug/index.rst | 8 +++++++ .../{debug.rst => debug/introduction.rst} | 5 ++--- components/index.rst | 2 +- components/map.rst.inc | 5 +++-- .../front_controllers_and_kernel.rst | 4 ++-- 7 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 components/debug/class_loader.rst create mode 100644 components/debug/index.rst rename components/{debug.rst => debug/introduction.rst} (92%) diff --git a/components/class_loader/debug_class_loader.rst b/components/class_loader/debug_class_loader.rst index 7c724fb6a01..c56d7ffe095 100644 --- a/components/class_loader/debug_class_loader.rst +++ b/components/class_loader/debug_class_loader.rst @@ -4,14 +4,6 @@ Debugging a Class Loader ======================== -The :class:`Symfony\\Component\\ClassLoader\\DebugClassLoader` attempts to -throw more helpful exceptions when a class isn't found by the registered -autoloaders. All autoloaders that implement a ``findFile()`` method are replaced -with a ``DebugClassLoader`` wrapper. - -Using the ``DebugClassLoader`` is as easy as calling its static -:method:`Symfony\\Component\\ClassLoader\\DebugClassLoader::enable` method:: - - use Symfony\Component\ClassLoader\DebugClassLoader; - - DebugClassLoader::enable(); +Since Symfony 2.4, the ``DebugClassLoader`` of the Class Loader component is +deprecated. Use the +:doc:`DebugClassLoader provided by the Debug component `. diff --git a/components/debug/class_loader.rst b/components/debug/class_loader.rst new file mode 100644 index 00000000000..090b230baf4 --- /dev/null +++ b/components/debug/class_loader.rst @@ -0,0 +1,22 @@ +.. index:: + single: Class Loader; DebugClassLoader + single: Debug; DebugClassLoader + +Debugging a Class Loader +======================== + +.. versionadded:: 2.4 + The ``DebugClassLoader`` of the Debug component is new in Symfony 2.4. + Previously, it was located in the Class Loader component. + +The :class:`Symfony\\Component\\Debug\\DebugClassLoader` attempts to +throw more helpful exceptions when a class isn't found by the registered +autoloaders. All autoloaders that implement a ``findFile()`` method are replaced +with a ``DebugClassLoader`` wrapper. + +Using the ``DebugClassLoader`` is as easy as calling its static +:method:`Symfony\\Component\\Debug\\DebugClassLoader::enable` method:: + + use Symfony\Component\ClassLoader\DebugClassLoader; + + DebugClassLoader::enable(); diff --git a/components/debug/index.rst b/components/debug/index.rst new file mode 100644 index 00000000000..6797789cb1b --- /dev/null +++ b/components/debug/index.rst @@ -0,0 +1,8 @@ +Debug +===== + +.. toctree:: + :maxdepth: 2 + + introduction + class_loader diff --git a/components/debug.rst b/components/debug/introduction.rst similarity index 92% rename from components/debug.rst rename to components/debug/introduction.rst index 0d20a13ee9a..5691ca58be4 100644 --- a/components/debug.rst +++ b/components/debug/introduction.rst @@ -30,9 +30,8 @@ Enabling them all is as easy as it can get:: Debug::enable(); The :method:`Symfony\\Component\\Debug\\Debug::enable` method registers an -error handler and an exception handler. If the :doc:`ClassLoader component -` is available, a special class loader -is also registered. +error handler, an exception handler and +:doc:`a special class loader `. Read the following sections for more information about the different available tools. diff --git a/components/index.rst b/components/index.rst index b53785bb642..8e167cd2ac9 100644 --- a/components/index.rst +++ b/components/index.rst @@ -9,7 +9,7 @@ The Components config/index console/index css_selector - debug + debug/index dependency_injection/index dom_crawler event_dispatcher/index diff --git a/components/map.rst.inc b/components/map.rst.inc index a5f2d0f8db7..b472a607d3d 100644 --- a/components/map.rst.inc +++ b/components/map.rst.inc @@ -27,9 +27,10 @@ * :doc:`/components/css_selector` -* **Debug** +* :doc:`/components/debug/index` - * :doc:`/components/debug` + * :doc:`/components/debug/introduction` + * :doc:`/components/debug/class_loader` * :doc:`/components/dependency_injection/index` diff --git a/cookbook/configuration/front_controllers_and_kernel.rst b/cookbook/configuration/front_controllers_and_kernel.rst index c49788f9056..8c4264a2161 100644 --- a/cookbook/configuration/front_controllers_and_kernel.rst +++ b/cookbook/configuration/front_controllers_and_kernel.rst @@ -45,8 +45,8 @@ to `decorate`_ the kernel with additional features. Examples include: * Configuring the autoloader or adding additional autoloading mechanisms; * Adding HTTP level caching by wrapping the kernel with an instance of :ref:`AppCache `; -* Enabling (or skipping) the :doc:`ClassCache ` -* Enabling the :doc:`Debug component `. +* Enabling (or skipping) the :doc:`ClassCache `; +* Enabling the :doc:`Debug Component `. The front controller can be chosen by requesting URLs like: