Skip to content

Commit ca0c027

Browse files
committed
Merge branch '3.10.x' into 4.3.x
* 3.10.x: Fix Symfony 8 compatibility issues (#7009)
2 parents d5533f9 + 2022f9e commit ca0c027

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ jobs:
255255
strategy:
256256
matrix:
257257
php-version:
258-
- "8.3"
258+
- "8.4"
259259

260260
steps:
261261
- name: "Checkout"
@@ -269,7 +269,9 @@ jobs:
269269
fail-fast: true
270270

271271
- name: "Lower minimum stability"
272-
run: "composer config minimum-stability dev"
272+
run: |
273+
composer config minimum-stability dev
274+
composer require --no-update --dev symfony/console:^8 symfony/cache:^8
273275
274276
- name: "Install development dependencies with Composer"
275277
uses: "ramsey/composer-install@v3"

tests/Tools/Console/RunSqlCommandTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Symfony\Component\Console\Application;
1414
use Symfony\Component\Console\Tester\CommandTester;
1515

16+
use function method_exists;
1617
use function str_replace;
1718

1819
class RunSqlCommandTest extends TestCase
@@ -26,7 +27,12 @@ protected function setUp(): void
2627
$this->connectionMock = $this->createMock(Connection::class);
2728
$this->command = new RunSqlCommand(new SingleConnectionProvider($this->connectionMock));
2829

29-
(new Application())->add($this->command);
30+
if (method_exists(Application::class, 'addCommand')) {
31+
// @phpstan-ignore method.notFound (This method will be added in Symfony 7.4)
32+
(new Application())->addCommand($this->command);
33+
} else {
34+
(new Application())->add($this->command);
35+
}
3036

3137
$this->commandTester = new CommandTester($this->command);
3238
}

0 commit comments

Comments
 (0)