Skip to content

Commit 286513c

Browse files
committed
feature #32471 Add a new ErrorHandler component (mirror of the Debug component) (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32471). Discussion ---------- Add a new ErrorHandler component (mirror of the Debug component) | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - On top of symfony/symfony#32470 Commits ------- b1b6e80 Add a new ErrorHandler component (mirror of the Debug component)
2 parents 4699bfe + 30d0dd0 commit 286513c

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

DataCollector/LoggerDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\HttpKernel\DataCollector;
1313

14-
use Symfony\Component\Debug\Exception\SilencedErrorContext;
14+
use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext;
1515
use Symfony\Component\HttpFoundation\Request;
1616
use Symfony\Component\HttpFoundation\RequestStack;
1717
use Symfony\Component\HttpFoundation\Response;

DependencyInjection/AddAnnotatedClassesToCachePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
namespace Symfony\Component\HttpKernel\DependencyInjection;
1313

1414
use Composer\Autoload\ClassLoader;
15-
use Symfony\Component\Debug\DebugClassLoader;
1615
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1716
use Symfony\Component\DependencyInjection\ContainerBuilder;
17+
use Symfony\Component\ErrorHandler\DebugClassLoader;
1818
use Symfony\Component\HttpKernel\Kernel;
1919

2020
/**

EventListener/DebugHandlersListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
use Symfony\Component\Console\ConsoleEvents;
1616
use Symfony\Component\Console\Event\ConsoleEvent;
1717
use Symfony\Component\Console\Output\ConsoleOutputInterface;
18-
use Symfony\Component\Debug\ErrorHandler;
19-
use Symfony\Component\Debug\ExceptionHandler;
18+
use Symfony\Component\ErrorHandler\ErrorHandler;
19+
use Symfony\Component\ErrorHandler\ExceptionHandler;
2020
use Symfony\Component\ErrorRenderer\ErrorRenderer;
2121
use Symfony\Component\ErrorRenderer\ErrorRenderer\HtmlErrorRenderer;
2222
use Symfony\Component\ErrorRenderer\Exception\ErrorRendererNotFoundException;

Kernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Symfony\Component\Config\ConfigCache;
1717
use Symfony\Component\Config\Loader\DelegatingLoader;
1818
use Symfony\Component\Config\Loader\LoaderResolver;
19-
use Symfony\Component\Debug\DebugClassLoader;
2019
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
2120
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
2221
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -29,6 +28,7 @@
2928
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
3029
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
3130
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
31+
use Symfony\Component\ErrorHandler\DebugClassLoader;
3232
use Symfony\Component\Filesystem\Filesystem;
3333
use Symfony\Component\HttpFoundation\Request;
3434
use Symfony\Component\HttpFoundation\Response;

Tests/DataCollector/LoggerDataCollectorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\HttpKernel\Tests\DataCollector;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Component\Debug\Exception\SilencedErrorContext;
15+
use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext;
1616
use Symfony\Component\HttpFoundation\Request;
1717
use Symfony\Component\HttpFoundation\RequestStack;
1818
use Symfony\Component\HttpFoundation\Response;
@@ -106,7 +106,7 @@ public function testCollect($nb, $logs, $expectedLogs, $expectedDeprecationCount
106106
$logs = array_map(function ($v) {
107107
if (isset($v['context']['exception'])) {
108108
$e = &$v['context']['exception'];
109-
$e = isset($e["\0*\0message"]) ? [$e["\0*\0message"], $e["\0*\0severity"]] : [$e["\0Symfony\Component\Debug\Exception\SilencedErrorContext\0severity"]];
109+
$e = isset($e["\0*\0message"]) ? [$e["\0*\0message"], $e["\0*\0severity"]] : [$e["\0Symfony\Component\ErrorHandler\Exception\SilencedErrorContext\0severity"]];
110110
}
111111

112112
return $v;

Tests/EventListener/DebugHandlersListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
use Symfony\Component\Console\Helper\HelperSet;
2020
use Symfony\Component\Console\Input\ArgvInput;
2121
use Symfony\Component\Console\Output\ConsoleOutput;
22-
use Symfony\Component\Debug\ErrorHandler;
23-
use Symfony\Component\Debug\ExceptionHandler;
22+
use Symfony\Component\ErrorHandler\ErrorHandler;
23+
use Symfony\Component\ErrorHandler\ExceptionHandler;
2424
use Symfony\Component\EventDispatcher\EventDispatcher;
2525
use Symfony\Component\HttpFoundation\Request;
2626
use Symfony\Component\HttpKernel\Event\KernelEvent;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"require": {
1919
"php": "^7.1.3",
20-
"symfony/debug": "^4.4|^5.0",
20+
"symfony/error-handler": "^4.4|^5.0",
2121
"symfony/error-renderer": "^4.4|^5.0",
2222
"symfony/event-dispatcher": "^4.3",
2323
"symfony/http-foundation": "^4.4|^5.0",

0 commit comments

Comments
 (0)