Skip to content

Commit c37d9d0

Browse files
authored
Merge pull request #6 from KaririCode-Framework/develop
Develop
2 parents c15572b + 1c15557 commit c37d9d0

4 files changed

Lines changed: 3 additions & 39 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,6 @@ jobs:
4343
- name: Initialize devkit (.kcode/ generation)
4444
run: kcode init
4545

46-
# Patch generated phpunit.xml.dist — the devkit regenerates this file on every
47-
# `kcode init` run, so patches must be applied here after initialization.
48-
# Suppresses PHPUnit 12 false-positive warnings/notices/risky flags that do not
49-
# reflect actual defects in this library (ARFA 1.3 compliance preserved).
50-
- name: Patch phpunit.xml.dist
51-
run: |
52-
sed -i 's/failOnWarning="true"/failOnWarning="false"/' .kcode/phpunit.xml.dist
53-
sed -i 's/failOnRisky="true"/failOnRisky="false"/' .kcode/phpunit.xml.dist
54-
sed -i 's/beStrictAboutCoverageMetadata="true"/beStrictAboutCoverageMetadata="false"/' .kcode/phpunit.xml.dist
55-
sed -i 's/ restrictWarnings="true"//g' .kcode/phpunit.xml.dist
56-
sed -i 's/ restrictDeprecations="true"//g' .kcode/phpunit.xml.dist
57-
sed -i 's/ restrictNotices="true"//g' .kcode/phpunit.xml.dist
58-
5946
# cs-fixer → phpstan (L9) → psalm → phpunit
6047
# Exit code ≠ 0 fails the job (zero-tolerance policy)
6148
- name: Run full quality pipeline

.github/workflows/code-quality.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,6 @@ jobs:
9494
- name: Initialize devkit
9595
run: kcode init
9696

97-
# Patch generated phpunit.xml.dist — disable failOnWarning and strict
98-
# coverage metadata to avoid false-positive warnings from PHPUnit 12.
99-
- name: Patch phpunit.xml.dist
100-
run: |
101-
sed -i 's/failOnWarning="true"/failOnWarning="false"/' .kcode/phpunit.xml.dist
102-
sed -i 's/failOnRisky="true"/failOnRisky="false"/' .kcode/phpunit.xml.dist
103-
sed -i 's/beStrictAboutCoverageMetadata="true"/beStrictAboutCoverageMetadata="false"/' .kcode/phpunit.xml.dist
104-
sed -i 's/ restrictWarnings="true"//g' .kcode/phpunit.xml.dist
105-
sed -i 's/ restrictDeprecations="true"//g' .kcode/phpunit.xml.dist
106-
sed -i 's/ restrictNotices="true"//g' .kcode/phpunit.xml.dist
107-
10897
# Runs PHPStan Level 9 then Psalm sequentially — both must pass
10998
- name: Run PHPStan + Psalm via kcode
11099
run: kcode analyse
@@ -171,17 +160,6 @@ jobs:
171160
- name: Initialize devkit
172161
run: kcode init
173162

174-
# Patch generated phpunit.xml.dist — disable failOnWarning and strict
175-
# coverage metadata to avoid false-positive warnings from PHPUnit 12.
176-
- name: Patch phpunit.xml.dist
177-
run: |
178-
sed -i 's/failOnWarning="true"/failOnWarning="false"/' .kcode/phpunit.xml.dist
179-
sed -i 's/failOnRisky="true"/failOnRisky="false"/' .kcode/phpunit.xml.dist
180-
sed -i 's/beStrictAboutCoverageMetadata="true"/beStrictAboutCoverageMetadata="false"/' .kcode/phpunit.xml.dist
181-
sed -i 's/ restrictWarnings="true"//g' .kcode/phpunit.xml.dist
182-
sed -i 's/ restrictDeprecations="true"//g' .kcode/phpunit.xml.dist
183-
sed -i 's/ restrictNotices="true"//g' .kcode/phpunit.xml.dist
184-
185163
- name: Run tests with coverage (pcov)
186164
run: kcode test --coverage
187165

tests/Unit/Exception/DiscoveryExceptionTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
namespace KaririCode\ClassDiscovery\Tests\Unit\Exception;
66

77
use KaririCode\ClassDiscovery\Exception\DiscoveryException;
8-
use PHPUnit\Framework\Attributes\CoversClass;
98
use PHPUnit\Framework\TestCase;
109

11-
#[CoversClass(DiscoveryException::class)]
10+
// DiscoveryException is excluded from coverage (src/Exception) in devkit.php —
11+
// PCOV cannot instrument classes extending native PHP exceptions (RuntimeException).
12+
// Tests still exercise and assert all named constructors; only coverage tracking is skipped.
1213
final class DiscoveryExceptionTest extends TestCase
1314
{
1415
#[\PHPUnit\Framework\Attributes\DataProvider('namedConstructorProvider')]

tests/Unit/Scanner/DirectoryScannerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use KaririCode\ClassDiscovery\Contract\ClassFilter;
99
use KaririCode\ClassDiscovery\Contract\DiscoveryResult;
1010
use KaririCode\ClassDiscovery\Contract\NamespaceResolver;
11-
use KaririCode\ClassDiscovery\Exception\DiscoveryException;
1211
use KaririCode\ClassDiscovery\Result\ClassMetadata;
1312
use KaririCode\ClassDiscovery\Result\DiscoveryResult as ConcreteDiscoveryResult;
1413
use KaririCode\ClassDiscovery\Scanner\DirectoryScanner;
@@ -19,7 +18,6 @@
1918
use PHPUnit\Framework\TestCase;
2019

2120
#[CoversClass(DirectoryScanner::class)]
22-
#[CoversClass(DiscoveryException::class)]
2321
#[UsesClass(FileScanner::class)]
2422
#[UsesClass(ConcreteDiscoveryResult::class)]
2523
#[UsesClass(ClassMetadata::class)]

0 commit comments

Comments
 (0)