Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a008ed5

Browse files
committed
Remove some dead code
1 parent f910435 commit a008ed5

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,10 +2401,6 @@ private function registerHttpClientConfiguration(array $config, ContainerBuilder
24012401

24022402
private function registerRetryableHttpClient(array $options, string $name, ContainerBuilder $container)
24032403
{
2404-
if (!class_exists(RetryableHttpClient::class)) {
2405-
throw new LogicException('Support for retrying failed requests requires symfony/http-client 5.2 or higher, try upgrading.');
2406-
}
2407-
24082404
if (null !== $options['retry_strategy']) {
24092405
$retryStrategy = new Reference($options['retry_strategy']);
24102406
} else {

src/Symfony/Component/Yaml/Command/LintCommand.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9191
$this->format = $input->getOption('format');
9292
$flags = $input->getOption('parse-tags');
9393

94-
if ('github' === $this->format && !class_exists(GithubActionReporter::class)) {
95-
throw new \InvalidArgumentException('The "github" format is only available since "symfony/console" >= 5.3.');
96-
}
97-
9894
if (null === $this->format) {
9995
// Autodetect format according to CI environment
10096
$this->format = class_exists(GithubActionReporter::class) && GithubActionReporter::isGithubActionEnvironment() ? 'github' : 'txt';

src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Console\Application;
16-
use Symfony\Component\Console\CI\GithubActionReporter;
1716
use Symfony\Component\Console\Command\Command;
1817
use Symfony\Component\Console\Output\OutputInterface;
1918
use Symfony\Component\Console\Tester\CommandCompletionTester;
@@ -68,11 +67,6 @@ public function testLintIncorrectFile()
6867

6968
public function testLintIncorrectFileWithGithubFormat()
7069
{
71-
if (!class_exists(GithubActionReporter::class)) {
72-
$this->expectException(\InvalidArgumentException::class);
73-
$this->expectExceptionMessage('The "github" format is only available since "symfony/console" >= 5.3.');
74-
}
75-
7670
$incorrectContent = <<<YAML
7771
foo:
7872
bar
@@ -82,10 +76,6 @@ public function testLintIncorrectFileWithGithubFormat()
8276

8377
$tester->execute(['filename' => $filename, '--format' => 'github'], ['decorated' => false]);
8478

85-
if (!class_exists(GithubActionReporter::class)) {
86-
return;
87-
}
88-
8979
self::assertEquals(1, $tester->getStatusCode(), 'Returns 1 in case of error');
9080
self::assertStringMatchesFormat('%A::error file=%s,line=2,col=0::Unable to parse at line 2 (near "bar")%A', trim($tester->getDisplay()));
9181
}

0 commit comments

Comments
 (0)