diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index efb79ed..f23ff09 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,7 +9,7 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.3, 8.2, 8.1] + php: [8.5, 8.4, 8.3, 8.2, 8.1] dependency-version: [prefer-lowest, prefer-stable] name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index dad65d7..98a9d65 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "require": { "php": "^8.1", "clue/stdio-react": "^2.6", - "jolicode/jolinotif": "^2.7.1", + "jolicode/jolinotif": "^2.7.1 || ^3.0", "symfony/console": "^6.0 || ^7.0.7 || ^8.0", "symfony/finder": "^6.0 || ^7.0.7 || ^8.0", "symfony/process": "^6.0 || ^7.0.7 || ^8.0", @@ -29,7 +29,7 @@ }, "require-dev": { "symfony/filesystem": "^6.0 || ^7.0.7 || ^8.0", - "phpunit/phpunit": "^10.5.20 | ^11.1.3" + "phpunit/phpunit": "^10.5.20 | ^11.1.3 || ^12.0" }, "autoload": { "psr-4": { diff --git a/src/ConsoleApplication.php b/src/ConsoleApplication.php index 94faf80..b1d4e15 100644 --- a/src/ConsoleApplication.php +++ b/src/ConsoleApplication.php @@ -10,7 +10,14 @@ public function __construct() { parent::__construct('PHPUnit Watcher', '1.23.2'); - $this->add(new WatcherCommand()); + // Removed in Symfony Console 8.0 + if (method_exists($this, 'add')) { + $this->add(new WatcherCommand()); + + return; + } + + $this->addCommand(new WatcherCommand()); } public function getLongVersion(): string diff --git a/src/WatcherCommand.php b/src/WatcherCommand.php index f91b97c..02592a4 100644 --- a/src/WatcherCommand.php +++ b/src/WatcherCommand.php @@ -12,7 +12,7 @@ class WatcherCommand extends Command { - protected function configure() + protected function configure(): void { $this->setName('watch') ->setDescription('Rerun PHPUnit tests when source code changes.')