diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index 135bd43..bc06d86 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -8,8 +8,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.2', '8.3', '8.4']
- symfony-versions: ['^6.0', '^7.0']
- name: PHP ${{ matrix.php-versions }} with Symfony ${{ matrix.symfony-versions }}
+ name: PHP ${{ matrix.php-versions }}
steps:
- uses: actions/checkout@v2
@@ -20,11 +19,22 @@ jobs:
coverage: xdebug
- name: Install dependencies # Verify that the package can be installed for current environment
run: composer install --prefer-dist --no-progress --no-suggest
- - name: Configure Symfony # Specify desired Symfony version
- run: composer update --with symfony/console:${{ matrix.symfony-versions }} --with symfony/finder:${{ matrix.symfony-versions }} --ignore-platform-reqs -W
- - name: Unit tests
- run: ./vendor/bin/phpunit
- - name: Static Analysis
- run: ./vendor/bin/psalm
- - name: Code style
- run: ./vendor/bin/phpcs
+ - name: Symfony 6.x
+ run: |
+ composer update --with symfony/console:^6.0 --with symfony/finder:^6.0 -W
+ ./vendor/bin/phpunit
+ ./vendor/bin/psalm
+ ./vendor/bin/phpcs
+ - name: Symfony 7.x
+ run: |
+ composer update --with symfony/console:^7.0 --with symfony/finder:^7.0 -W
+ ./vendor/bin/phpunit
+ ./vendor/bin/psalm
+ ./vendor/bin/phpcs
+ - name: Symfony 8.x
+ run: |
+ composer update --with symfony/console:^8.0 --with symfony/finder:^8.0 -W
+ ./vendor/bin/phpunit
+ ./vendor/bin/psalm
+ ./vendor/bin/phpcs
+ if: contains(matrix.php-versions, '8.4')
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5116686..69a68e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [1.7.0] - 2026-03-19
+### Added
+- Support for Symfony 8 ([#29](https://github.com/timoschinkel/codeowners-cli/pull/29))
+
## [1.6.1] - 2026-03-10
### Changed
- Solve implicitly nullable parameters to better support PHP 8.4 ([#27](https://github.com/timoschinkel/codeowners-cli/pull/27))
diff --git a/composer.json b/composer.json
index b8abc09..4cb1581 100755
--- a/composer.json
+++ b/composer.json
@@ -5,9 +5,9 @@
"license": "Apache-2.0",
"require": {
"php": "^8.2",
- "symfony/console": "^6.0|^7.0",
+ "symfony/console": "^6.0|^7.0|^8.0",
"timoschinkel/codeowners": "^2.0",
- "symfony/finder": "^6.0|^7.0"
+ "symfony/finder": "^6.0|^7.0|^8.0"
},
"bin": ["bin/codeowners"],
"autoload": {
@@ -18,7 +18,7 @@
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.5",
- "vimeo/psalm": "~6.4.0",
+ "vimeo/psalm": "^6.4.0",
"phpunit/phpunit": "^9.4",
"mikey179/vfsstream": "^1.6",
"phpspec/prophecy-phpunit": "^2.0"
diff --git a/psalm.xml b/psalm.xml
index 9d917d4..520d3f3 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -51,5 +51,6 @@
+
diff --git a/tests/Command/ListFilesCommandTest.php b/tests/Command/ListFilesCommandTest.php
index aa38208..4fb9ed1 100644
--- a/tests/Command/ListFilesCommandTest.php
+++ b/tests/Command/ListFilesCommandTest.php
@@ -152,7 +152,7 @@ public function testCommandPassesSpecifiedCodeownersFileToFileLocator(): void
private function executeCommand(Command $command, array $parameters): string
{
$application = new Application();
- $application->add($command);
+ $application->addCommands([$command]);
$tester = new CommandTester($application->find($command->getName()));
$tester->execute($parameters);
diff --git a/tests/Command/ListOwnersCommandTest.php b/tests/Command/ListOwnersCommandTest.php
index bf015ed..e6396bc 100644
--- a/tests/Command/ListOwnersCommandTest.php
+++ b/tests/Command/ListOwnersCommandTest.php
@@ -133,7 +133,7 @@ public function testCommandThrowsExceptionIfCodeOwnersFileDoesNotExist(): void
private function executeCommand(Command $command, array $parameters): string
{
$application = new Application();
- $application->add($command);
+ $application->addCommands([$command]);
$tester = new CommandTester($application->find($command->getName()));
$tester->execute($parameters);
diff --git a/tests/Command/ListUnownedFilesCommandTest.php b/tests/Command/ListUnownedFilesCommandTest.php
index 4b06d9e..e680e26 100644
--- a/tests/Command/ListUnownedFilesCommandTest.php
+++ b/tests/Command/ListUnownedFilesCommandTest.php
@@ -202,7 +202,7 @@ public function testCommandPassesSpecifiedCodeownersFileToFileLocator(): void
private function executeCommand(Command $command, array $parameters): array
{
$application = new Application();
- $application->add($command);
+ $application->addCommands([$command]);
$tester = new CommandTester($application->find($command->getName()));
$exit = $tester->execute($parameters);
diff --git a/tests/Command/OwnerCommandTest.php b/tests/Command/OwnerCommandTest.php
index d68e708..90ba6f3 100644
--- a/tests/Command/OwnerCommandTest.php
+++ b/tests/Command/OwnerCommandTest.php
@@ -189,7 +189,7 @@ public function testCommandThrowsExceptionIfCodeOwnersFileDoesNotExist(): void
private function executeCommand(Command $command, array $parameters): string
{
$application = new Application();
- $application->add($command);
+ $application->addCommands([$command]);
$tester = new CommandTester($application->find($command->getName()));
$tester->execute($parameters);