Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 795 Bytes

class_loader.rst

File metadata and controls

22 lines (16 loc) · 795 Bytes
.. index::
    single: Class Loader; DebugClassLoader
    single: Debug; DebugClassLoader

Debugging a Class Loader

.. versionadded:: 2.4
    The ``DebugClassLoader`` of the Debug component was introduced in Symfony 2.4.
    Previously, it was located in the ClassLoader 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();