Skip to content

Commit ff27ac9

Browse files
Enhance CI configuration and clean up test cases
- Updated CI workflow to exclude incompatible PHPUnit versions for PHP 8.1 and 8.2. - Changed Composer command from install to update for better dependency management. - Removed unnecessary `@covers` annotations from OpenAPISymfonySchemaValidatorTest for cleaner code.
1 parent a4fbc7f commit ff27ac9

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ jobs:
1212
matrix:
1313
php-version: ['8.1', '8.2', '8.3', '8.4']
1414
phpunit-version: ['10', '11', '12']
15+
exclude:
16+
# PHPUnit 11 requires PHP 8.2+
17+
- php-version: '8.1'
18+
phpunit-version: '11'
19+
# PHPUnit 12 requires PHP 8.3+
20+
- php-version: '8.1'
21+
phpunit-version: '12'
22+
- php-version: '8.2'
23+
phpunit-version: '12'
1524

1625
steps:
1726
- uses: actions/checkout@v4
@@ -27,10 +36,10 @@ jobs:
2736
coverage: pcov
2837

2938
- name: Composer install
30-
run: composer install --no-interaction --prefer-dist
39+
run: composer update --no-interaction --prefer-dist
3140

3241
- name: Install PHPUnit ${{ matrix.phpunit-version }}
33-
run: composer require --dev phpunit/phpunit:^${{ matrix.phpunit-version }}.0 --no-interaction
42+
run: composer require --dev phpunit/phpunit:^${{ matrix.phpunit-version }}.0 --no-interaction --update-with-dependencies
3443

3544
- name: Run PHPUnit
3645
run: |
@@ -39,6 +48,7 @@ jobs:
3948
else
4049
bin/phpunit
4150
fi
51+
4252
- name: Code Coverage Report
4353
if: success() && matrix.php-version == '8.3' && matrix.phpunit-version == '11'
4454
uses: codecov/codecov-action@v4

tests/OpenAPISymfonySchemaValidatorTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ public function testValidateSymfonyRequestFails(): void
4444
$this->validator->validateRequest($request);
4545
}
4646

47-
/**
48-
* @covers \Phauthentic\PHPUnit\OpenAPIValidator\Symfony\OpenAPISymfonySchemaValidator
49-
*/
5047
#[Test]
5148
public function testValidateSymfonyResponsePasses(): void
5249
{
@@ -64,9 +61,6 @@ public function testValidateSymfonyResponsePasses(): void
6461
$this->assertTrue(true); // If no exception is thrown, the test passes.
6562
}
6663

67-
/**
68-
* @covers \Phauthentic\PHPUnit\OpenAPIValidator\Symfony\OpenAPISymfonySchemaValidator
69-
*/
7064
#[Test]
7165
public function testValidateSymfonyResponseFails(): void
7266
{

0 commit comments

Comments
 (0)