Skip to content

Commit a00178c

Browse files
Support php new versions and higher and symfony/console@8 (#178)
* Updates CI to test against PHP 8.4 and 8.5 * Support `symfony/console@8` * Update related dependencies
1 parent d1917f7 commit a00178c

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
os: [ubuntu-latest]
12-
php: [8.3, 8.2, 8.1]
12+
php: [8.5, 8.4, 8.3, 8.2, 8.1]
1313
dependency-version: [prefer-lowest, prefer-stable]
1414

1515
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": "^8.1",
2020
"clue/stdio-react": "^2.6",
21-
"jolicode/jolinotif": "^2.7.1",
21+
"jolicode/jolinotif": "^2.7.1 || ^3.0",
2222
"symfony/console": "^6.0 || ^7.0.7 || ^8.0",
2323
"symfony/finder": "^6.0 || ^7.0.7 || ^8.0",
2424
"symfony/process": "^6.0 || ^7.0.7 || ^8.0",
@@ -29,7 +29,7 @@
2929
},
3030
"require-dev": {
3131
"symfony/filesystem": "^6.0 || ^7.0.7 || ^8.0",
32-
"phpunit/phpunit": "^10.5.20 | ^11.1.3"
32+
"phpunit/phpunit": "^10.5.20 | ^11.1.3 || ^12.0"
3333
},
3434
"autoload": {
3535
"psr-4": {

src/ConsoleApplication.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ public function __construct()
1010
{
1111
parent::__construct('PHPUnit Watcher', '1.23.2');
1212

13-
$this->add(new WatcherCommand());
13+
// Removed in Symfony Console 8.0
14+
if (method_exists($this, 'add')) {
15+
$this->add(new WatcherCommand());
16+
17+
return;
18+
}
19+
20+
$this->addCommand(new WatcherCommand());
1421
}
1522

1623
public function getLongVersion(): string

src/WatcherCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class WatcherCommand extends Command
1414
{
15-
protected function configure()
15+
protected function configure(): void
1616
{
1717
$this->setName('watch')
1818
->setDescription('Rerun PHPUnit tests when source code changes.')

0 commit comments

Comments
 (0)