Skip to content

Commit 34a2182

Browse files
committed
Fix PHPStan CI failure on Symfony Console version mismatch.
1 parent d443d0a commit 34a2182

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
restore-keys: php-composer-locked-
2929

3030
- name: Install dependencies
31-
run: composer install --no-interaction --prefer-dist --no-progress
31+
run: composer update --no-interaction --prefer-dist --no-progress
3232

3333
- name: PHPStan
3434
run: vendor/bin/phpstan analyse --no-progress

src/Application.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,7 @@ public function __construct()
3737

3838
public function safeAddCommand(Command $command): ?Command
3939
{
40-
// addCommand() exists since Symfony Console 7.4; add() was removed in later versions.
41-
/** @phpstan-ignore function.alreadyNarrowedType */
42-
if (method_exists($this, 'addCommand')) {
43-
return $this->addCommand($command);
44-
}
45-
46-
/** @phpstan-ignore method.notFound */
47-
return $this->add($command);
40+
return $this->addCommand($command);
4841
}
4942

5043
public function doRun(InputInterface $input, OutputInterface $output): int

0 commit comments

Comments
 (0)