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

Skip to content

Commit ea7cc20

Browse files
committed
minor #49290 [FrameworkBundle][Yaml] Remove some unused code (fancyweb)
This PR was submitted for the 6.2 branch but it was merged into the 6.3 branch instead. Discussion ---------- [FrameworkBundle][Yaml] Remove some unused code | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- 8929b8e Remove some dead code
2 parents 353bbb7 + 8929b8e commit ea7cc20

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
@@ -2396,10 +2396,6 @@ private function registerHttpClientConfiguration(array $config, ContainerBuilder
23962396

23972397
private function registerRetryableHttpClient(array $options, string $name, ContainerBuilder $container)
23982398
{
2399-
if (!class_exists(RetryableHttpClient::class)) {
2400-
throw new LogicException('Support for retrying failed requests requires symfony/http-client 5.2 or higher, try upgrading.');
2401-
}
2402-
24032399
if (null !== $options['retry_strategy']) {
24042400
$retryStrategy = new Reference($options['retry_strategy']);
24052401
} 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)