Skip to content

Commit be1eaac

Browse files
authored
fix(symfony): update for PHPUnit 10
The Differ now expects a output builder as mandatory argument. Fixes api-platform#5426
1 parent 79f5486 commit be1eaac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Core/Bridge/Symfony/Bundle/Command/UpgradeApiResourceCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
use PhpParser\Parser\Php7;
3232
use PhpParser\PrettyPrinter\Standard;
3333
use SebastianBergmann\Diff\Differ;
34+
use SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder;
3435
use Symfony\Component\Console\Attribute\AsCommand;
3536
use Symfony\Component\Console\Command\Command;
3637
use Symfony\Component\Console\Input\InputInterface;
@@ -215,7 +216,7 @@ private function getSubresources(): array
215216
private function printDiff(string $oldCode, string $newCode, OutputInterface $output): void
216217
{
217218
$consoleFormatter = new ColorConsoleDiffFormatter();
218-
$differ = new Differ();
219+
$differ = new Differ(new UnifiedDiffOutputBuilder());
219220
$diff = $differ->diff($oldCode, $newCode);
220221
$output->write($consoleFormatter->format($diff));
221222
}

0 commit comments

Comments
 (0)