Skip to content

Commit

Permalink
bug #3039 use DebugClassLoader class from Debug component instead of …
Browse files Browse the repository at this point in the history
…the one from ... (xabbuh)

This PR was submitted for the master branch but it was merged into the 2.4 branch instead (closes #3039).

Discussion
----------

use DebugClassLoader class from Debug component instead of the one from ...

...the Class Loader component

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.4
| Fixed tickets | #2955

Commits
-------

e78c1ca use DebugClassLoader class from Debug component instead of the one from the Class Loader component
  • Loading branch information
weaverryan committed Mar 5, 2014
2 parents 1065855 + 9a93879 commit fc28453
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 19 deletions.
14 changes: 3 additions & 11 deletions components/class_loader/debug_class_loader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 </components/debug/class_loader>`.
22 changes: 22 additions & 0 deletions components/debug/class_loader.rst
Original file line number Diff line number Diff line change
@@ -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();
8 changes: 8 additions & 0 deletions components/debug/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Debug
=====

.. toctree::
:maxdepth: 2

introduction
class_loader
5 changes: 2 additions & 3 deletions components/debug.rst → components/debug/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
</components/class_loader/introduction>` is available, a special class loader
is also registered.
error handler, an exception handler and
:doc:`a special class loader </components/debug/class_loader>`.

Read the following sections for more information about the different available
tools.
Expand Down
2 changes: 1 addition & 1 deletion components/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Components
config/index
console/index
css_selector
debug
debug/index
dependency_injection/index
dom_crawler
event_dispatcher/index
Expand Down
5 changes: 3 additions & 2 deletions components/map.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
4 changes: 2 additions & 2 deletions cookbook/configuration/front_controllers_and_kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <symfony-gateway-cache>`;
* Enabling (or skipping) the :doc:`ClassCache </cookbook/debugging>`
* Enabling the :doc:`Debug component </components/debug>`.
* Enabling (or skipping) the :doc:`ClassCache </cookbook/debugging>`;
* Enabling the :doc:`Debug Component </components/debug/introduction>`.

The front controller can be chosen by requesting URLs like:

Expand Down

0 comments on commit fc28453

Please sign in to comment.