Skip to content

Commit fc28453

Browse files
committed
bug #3039 use DebugClassLoader class from Debug component instead of 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
2 parents 1065855 + 9a93879 commit fc28453

File tree

7 files changed

+41
-19
lines changed

7 files changed

+41
-19
lines changed

components/class_loader/debug_class_loader.rst

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44
Debugging a Class Loader
55
========================
66

7-
The :class:`Symfony\\Component\\ClassLoader\\DebugClassLoader` attempts to
8-
throw more helpful exceptions when a class isn't found by the registered
9-
autoloaders. All autoloaders that implement a ``findFile()`` method are replaced
10-
with a ``DebugClassLoader`` wrapper.
11-
12-
Using the ``DebugClassLoader`` is as easy as calling its static
13-
:method:`Symfony\\Component\\ClassLoader\\DebugClassLoader::enable` method::
14-
15-
use Symfony\Component\ClassLoader\DebugClassLoader;
16-
17-
DebugClassLoader::enable();
7+
Since Symfony 2.4, the ``DebugClassLoader`` of the Class Loader component is
8+
deprecated. Use the
9+
:doc:`DebugClassLoader provided by the Debug component </components/debug/class_loader>`.

components/debug/class_loader.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. index::
2+
single: Class Loader; DebugClassLoader
3+
single: Debug; DebugClassLoader
4+
5+
Debugging a Class Loader
6+
========================
7+
8+
.. versionadded:: 2.4
9+
The ``DebugClassLoader`` of the Debug component is new in Symfony 2.4.
10+
Previously, it was located in the Class Loader component.
11+
12+
The :class:`Symfony\\Component\\Debug\\DebugClassLoader` attempts to
13+
throw more helpful exceptions when a class isn't found by the registered
14+
autoloaders. All autoloaders that implement a ``findFile()`` method are replaced
15+
with a ``DebugClassLoader`` wrapper.
16+
17+
Using the ``DebugClassLoader`` is as easy as calling its static
18+
:method:`Symfony\\Component\\Debug\\DebugClassLoader::enable` method::
19+
20+
use Symfony\Component\ClassLoader\DebugClassLoader;
21+
22+
DebugClassLoader::enable();

components/debug/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Debug
2+
=====
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
introduction
8+
class_loader

components/debug.rst renamed to components/debug/introduction.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ Enabling them all is as easy as it can get::
3030
Debug::enable();
3131

3232
The :method:`Symfony\\Component\\Debug\\Debug::enable` method registers an
33-
error handler and an exception handler. If the :doc:`ClassLoader component
34-
</components/class_loader/introduction>` is available, a special class loader
35-
is also registered.
33+
error handler, an exception handler and
34+
:doc:`a special class loader </components/debug/class_loader>`.
3635

3736
Read the following sections for more information about the different available
3837
tools.

components/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The Components
99
config/index
1010
console/index
1111
css_selector
12-
debug
12+
debug/index
1313
dependency_injection/index
1414
dom_crawler
1515
event_dispatcher/index

components/map.rst.inc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727

2828
* :doc:`/components/css_selector`
2929

30-
* **Debug**
30+
* :doc:`/components/debug/index`
3131

32-
* :doc:`/components/debug`
32+
* :doc:`/components/debug/introduction`
33+
* :doc:`/components/debug/class_loader`
3334

3435
* :doc:`/components/dependency_injection/index`
3536

cookbook/configuration/front_controllers_and_kernel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ to `decorate`_ the kernel with additional features. Examples include:
4545
* Configuring the autoloader or adding additional autoloading mechanisms;
4646
* Adding HTTP level caching by wrapping the kernel with an instance of
4747
:ref:`AppCache <symfony-gateway-cache>`;
48-
* Enabling (or skipping) the :doc:`ClassCache </cookbook/debugging>`
49-
* Enabling the :doc:`Debug component </components/debug>`.
48+
* Enabling (or skipping) the :doc:`ClassCache </cookbook/debugging>`;
49+
* Enabling the :doc:`Debug Component </components/debug/introduction>`.
5050

5151
The front controller can be chosen by requesting URLs like:
5252

0 commit comments

Comments
 (0)