Skip to content

Commit b842ad9

Browse files
committed
Deprecating the Debug component
1 parent 014f2bb commit b842ad9

29 files changed

+100
-0
lines changed

UPGRADE-4.4.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Cache
66

77
* Added argument `$prefix` to `AdapterInterface::clear()`
88

9+
Debug
10+
-----
11+
12+
* Deprecated `FlattenException`, use the `FlattenException` of the `ErrorRenderer` component
13+
* Deprecated the whole component in favor of `ErrorHandler` component
14+
915
DependencyInjection
1016
-------------------
1117

UPGRADE-5.0.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ Console
5151
$processHelper->run($output, Process::fromShellCommandline('ls -l'));
5252
```
5353

54+
Debug
55+
-----
56+
57+
* Removed the component
58+
5459
DependencyInjection
5560
-------------------
5661

src/Symfony/Component/Debug/BufferingLogger.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@
1313

1414
use Psr\Log\AbstractLogger;
1515

16+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\BufferingLogger" instead.', BufferingLogger::class), E_USER_DEPRECATED);
17+
1618
/**
1719
* A buffering logger that stacks logs for later.
1820
*
1921
* @author Nicolas Grekas <p@tchwork.com>
22+
*
23+
* @deprecated since Symfony 4.4, use Symfony\Component\ErrorHandler\BufferingLogger instead.
2024
*/
2125
class BufferingLogger extends AbstractLogger
2226
{

src/Symfony/Component/Debug/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
-----
66

77
* deprecated `FlattenException`, use the `FlattenException` of the `ErrorRenderer` component
8+
* deprecated the whole component in favor of the `ErrorHandler` component
89

910
4.3.0
1011
-----

src/Symfony/Component/Debug/Debug.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Debug;
1313

14+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\Debug" instead.', Debug::class), E_USER_DEPRECATED);
15+
1416
/**
1517
* Registers all the debug tools.
1618
*
1719
* @author Fabien Potencier <fabien@symfony.com>
20+
*
21+
* @deprecated since Symfony 4.4, use Symfony\Component\ErrorHandler\Debug instead.
1822
*/
1923
class Debug
2024
{

src/Symfony/Component/Debug/DebugClassLoader.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
use PHPUnit\Framework\MockObject\Matcher\StatelessInvocation;
1515

16+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\DebugClassLoader" instead.', DebugClassLoader::class), E_USER_DEPRECATED);
17+
1618
/**
1719
* Autoloader checking if the class is really defined in the file found.
1820
*
@@ -24,6 +26,8 @@
2426
* @author Christophe Coevoet <stof@notk.org>
2527
* @author Nicolas Grekas <p@tchwork.com>
2628
* @author Guilhem Niot <guilhem.niot@gmail.com>
29+
*
30+
* @deprecated since Symfony 4.4, use Symfony\Component\ErrorHandler\DebugClassLoader instead.
2731
*/
2832
class DebugClassLoader
2933
{

src/Symfony/Component/Debug/ErrorHandler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler;
2424
use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler;
2525

26+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\ErrorHandler" instead.', ErrorHandler::class), E_USER_DEPRECATED);
27+
2628
/**
2729
* A generic ErrorHandler for the PHP engine.
2830
*
@@ -47,6 +49,8 @@
4749
* @author Grégoire Pineau <lyrixx@lyrixx.info>
4850
*
4951
* @final since Symfony 4.3
52+
*
53+
* @deprecated since Symfony 4.4, use Symfony\Component\ErrorHandler\ErrorHandler instead.
5054
*/
5155
class ErrorHandler
5256
{

src/Symfony/Component/Debug/Exception/ClassNotFoundException.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Debug\Exception;
1313

14+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\Exception\ClassNotFoundException" instead.', ClassNotFoundException::class), E_USER_DEPRECATED);
15+
1416
/**
1517
* Class (or Trait or Interface) Not Found Exception.
1618
*
1719
* @author Konstanton Myakshin <koc-dp@yandex.ru>
20+
*
21+
* @deprecated since Symfony 4.4, use Symfony\Component\ErrorHandler\Exception\ClassNotFoundException instead.
1822
*/
1923
class ClassNotFoundException extends FatalErrorException
2024
{

src/Symfony/Component/Debug/Exception/FatalErrorException.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Debug\Exception;
1313

14+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\Exception\FatalErrorException" instead.', FatalErrorException::class), E_USER_DEPRECATED);
15+
1416
/**
1517
* Fatal Error Exception.
1618
*
1719
* @author Konstanton Myakshin <koc-dp@yandex.ru>
20+
*
21+
* @deprecated since Symfony 4.4, use Symfony\Component\ErrorHandler\Exception\FatalErrorException instead.
1822
*/
1923
class FatalErrorException extends \ErrorException
2024
{

src/Symfony/Component/Debug/Exception/FatalThrowableError.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Debug\Exception;
1313

14+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\Exception\FatalThrowableError" instead.', FatalThrowableError::class), E_USER_DEPRECATED);
15+
1416
/**
1517
* Fatal Throwable Error.
1618
*
1719
* @author Nicolas Grekas <p@tchwork.com>
20+
*
21+
* @deprecated since Symfony 4.4, use Symfony\Component\ErrorHandler\Exception\FatalThrowableError instead.
1822
*/
1923
class FatalThrowableError extends FatalErrorException
2024
{

0 commit comments

Comments
 (0)