From 5af9892f1b5a598a49740dd40e63af536eebb8aa Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Sun, 1 Jun 2025 09:54:07 +0200 Subject: [PATCH] [TwigBridge] Remove `DebugCommand` deprecation --- UPGRADE-8.0.md | 12 ++++++++++++ src/Symfony/Bridge/Twig/Command/DebugCommand.php | 8 +------- 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 UPGRADE-8.0.md diff --git a/UPGRADE-8.0.md b/UPGRADE-8.0.md new file mode 100644 index 0000000000000..1feddf90b8104 --- /dev/null +++ b/UPGRADE-8.0.md @@ -0,0 +1,12 @@ +UPGRADE FROM 7.4 to 8.0 +======================= + +Symfony 7.4 and Symfony 8.0 are released simultaneously at the end of November 2025. According to the Symfony +release process, both versions have the same features, but Symfony 8.0 doesn't include any deprecated features. +To upgrade, make sure to resolve all deprecation notices. +Read more about this in the [Symfony documentation](https://symfony.com/doc/8.0/setup/upgrade_major.html). + +TwigBridge +---------- + + * Remove `text` format from the `debug:twig` command, use the `txt` format instead diff --git a/src/Symfony/Bridge/Twig/Command/DebugCommand.php b/src/Symfony/Bridge/Twig/Command/DebugCommand.php index c145a7ef6310f..2ee2ead483dd6 100644 --- a/src/Symfony/Bridge/Twig/Command/DebugCommand.php +++ b/src/Symfony/Bridge/Twig/Command/DebugCommand.php @@ -93,13 +93,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int throw new InvalidArgumentException(\sprintf('Argument "name" not supported, it requires the Twig loader "%s".', FilesystemLoader::class)); } - $format = $input->getOption('format'); - if ('text' === $format) { - trigger_deprecation('symfony/twig-bridge', '7.2', 'The "text" format is deprecated, use "txt" instead.'); - - $format = 'txt'; - } - match ($format) { + match ($input->getOption('format')) { 'txt' => $name ? $this->displayPathsText($io, $name) : $this->displayGeneralText($io, $filter), 'json' => $name ? $this->displayPathsJson($io, $name) : $this->displayGeneralJson($io, $filter), default => throw new InvalidArgumentException(\sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))),