Skip to content

Commit 4bc12ba

Browse files
nlemoinenicolas-grekas
authored andcommitted
[ErrorHandler] Improve fileLinkFormat handling
- Avoid repeating file link format guessing (logic is already in FileLinkFormatter class) - Always set a fileLinkFormat to a FileLinkFormatter object to handle path mappings properly
1 parent 2518003 commit 4bc12ba

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Command/DebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
use Symfony\Component\Console\Input\InputOption;
2323
use Symfony\Component\Console\Output\OutputInterface;
2424
use Symfony\Component\Console\Style\SymfonyStyle;
25+
use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter;
2526
use Symfony\Component\Finder\Finder;
26-
use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
2727
use Twig\Environment;
2828
use Twig\Loader\ChainLoader;
2929
use Twig\Loader\FilesystemLoader;

Extension/CodeExtension.php

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

1212
namespace Symfony\Bridge\Twig\Extension;
1313

14-
use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
14+
use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter;
1515
use Twig\Extension\AbstractExtension;
1616
use Twig\TwigFilter;
1717

Tests/Extension/CodeExtensionTest.php

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

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Bridge\Twig\Extension\CodeExtension;
16-
use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
16+
use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter;
1717

1818
class CodeExtensionTest extends TestCase
1919
{

0 commit comments

Comments
 (0)