diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 358ec36f10bea..47f311fe97bd2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -2396,10 +2396,6 @@ private function registerHttpClientConfiguration(array $config, ContainerBuilder private function registerRetryableHttpClient(array $options, string $name, ContainerBuilder $container) { - if (!class_exists(RetryableHttpClient::class)) { - throw new LogicException('Support for retrying failed requests requires symfony/http-client 5.2 or higher, try upgrading.'); - } - if (null !== $options['retry_strategy']) { $retryStrategy = new Reference($options['retry_strategy']); } else { diff --git a/src/Symfony/Component/Yaml/Command/LintCommand.php b/src/Symfony/Component/Yaml/Command/LintCommand.php index 565a276fdbdb8..70f68c51d7313 100644 --- a/src/Symfony/Component/Yaml/Command/LintCommand.php +++ b/src/Symfony/Component/Yaml/Command/LintCommand.php @@ -91,10 +91,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->format = $input->getOption('format'); $flags = $input->getOption('parse-tags'); - if ('github' === $this->format && !class_exists(GithubActionReporter::class)) { - throw new \InvalidArgumentException('The "github" format is only available since "symfony/console" >= 5.3.'); - } - if (null === $this->format) { // Autodetect format according to CI environment $this->format = class_exists(GithubActionReporter::class) && GithubActionReporter::isGithubActionEnvironment() ? 'github' : 'txt'; diff --git a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php index d160f7b52f3cd..2e2ed7e7a9c2a 100644 --- a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php @@ -13,7 +13,6 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Application; -use Symfony\Component\Console\CI\GithubActionReporter; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Tester\CommandCompletionTester; @@ -68,11 +67,6 @@ public function testLintIncorrectFile() public function testLintIncorrectFileWithGithubFormat() { - if (!class_exists(GithubActionReporter::class)) { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('The "github" format is only available since "symfony/console" >= 5.3.'); - } - $incorrectContent = <<execute(['filename' => $filename, '--format' => 'github'], ['decorated' => false]); - if (!class_exists(GithubActionReporter::class)) { - return; - } - self::assertEquals(1, $tester->getStatusCode(), 'Returns 1 in case of error'); self::assertStringMatchesFormat('%A::error file=%s,line=2,col=0::Unable to parse at line 2 (near "bar")%A', trim($tester->getDisplay())); }