Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,6 @@ jobs:
- name: Initialize devkit (.kcode/ generation)
run: kcode init

# Patch generated phpunit.xml.dist — the devkit regenerates this file on every
# `kcode init` run, so patches must be applied here after initialization.
# Suppresses PHPUnit 12 false-positive warnings/notices/risky flags that do not
# reflect actual defects in this library (ARFA 1.3 compliance preserved).
- name: Patch phpunit.xml.dist
run: |
sed -i 's/failOnWarning="true"/failOnWarning="false"/' .kcode/phpunit.xml.dist
sed -i 's/failOnRisky="true"/failOnRisky="false"/' .kcode/phpunit.xml.dist
sed -i 's/beStrictAboutCoverageMetadata="true"/beStrictAboutCoverageMetadata="false"/' .kcode/phpunit.xml.dist
sed -i 's/ restrictWarnings="true"//g' .kcode/phpunit.xml.dist
sed -i 's/ restrictDeprecations="true"//g' .kcode/phpunit.xml.dist
sed -i 's/ restrictNotices="true"//g' .kcode/phpunit.xml.dist

# cs-fixer → phpstan (L9) → psalm → phpunit
# Exit code ≠ 0 fails the job (zero-tolerance policy)
- name: Run full quality pipeline
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,6 @@ jobs:
- name: Initialize devkit
run: kcode init

# Patch generated phpunit.xml.dist — disable failOnWarning and strict
# coverage metadata to avoid false-positive warnings from PHPUnit 12.
- name: Patch phpunit.xml.dist
run: |
sed -i 's/failOnWarning="true"/failOnWarning="false"/' .kcode/phpunit.xml.dist
sed -i 's/failOnRisky="true"/failOnRisky="false"/' .kcode/phpunit.xml.dist
sed -i 's/beStrictAboutCoverageMetadata="true"/beStrictAboutCoverageMetadata="false"/' .kcode/phpunit.xml.dist
sed -i 's/ restrictWarnings="true"//g' .kcode/phpunit.xml.dist
sed -i 's/ restrictDeprecations="true"//g' .kcode/phpunit.xml.dist
sed -i 's/ restrictNotices="true"//g' .kcode/phpunit.xml.dist

# Runs PHPStan Level 9 then Psalm sequentially — both must pass
- name: Run PHPStan + Psalm via kcode
run: kcode analyse
Expand Down Expand Up @@ -171,17 +160,6 @@ jobs:
- name: Initialize devkit
run: kcode init

# Patch generated phpunit.xml.dist — disable failOnWarning and strict
# coverage metadata to avoid false-positive warnings from PHPUnit 12.
- name: Patch phpunit.xml.dist
run: |
sed -i 's/failOnWarning="true"/failOnWarning="false"/' .kcode/phpunit.xml.dist
sed -i 's/failOnRisky="true"/failOnRisky="false"/' .kcode/phpunit.xml.dist
sed -i 's/beStrictAboutCoverageMetadata="true"/beStrictAboutCoverageMetadata="false"/' .kcode/phpunit.xml.dist
sed -i 's/ restrictWarnings="true"//g' .kcode/phpunit.xml.dist
sed -i 's/ restrictDeprecations="true"//g' .kcode/phpunit.xml.dist
sed -i 's/ restrictNotices="true"//g' .kcode/phpunit.xml.dist

- name: Run tests with coverage (pcov)
run: kcode test --coverage

Expand Down
5 changes: 3 additions & 2 deletions tests/Unit/Exception/DiscoveryExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
namespace KaririCode\ClassDiscovery\Tests\Unit\Exception;

use KaririCode\ClassDiscovery\Exception\DiscoveryException;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(DiscoveryException::class)]
// DiscoveryException is excluded from coverage (src/Exception) in devkit.php —
// PCOV cannot instrument classes extending native PHP exceptions (RuntimeException).
// Tests still exercise and assert all named constructors; only coverage tracking is skipped.
final class DiscoveryExceptionTest extends TestCase
{
#[\PHPUnit\Framework\Attributes\DataProvider('namedConstructorProvider')]
Expand Down
2 changes: 0 additions & 2 deletions tests/Unit/Scanner/DirectoryScannerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use KaririCode\ClassDiscovery\Contract\ClassFilter;
use KaririCode\ClassDiscovery\Contract\DiscoveryResult;
use KaririCode\ClassDiscovery\Contract\NamespaceResolver;
use KaririCode\ClassDiscovery\Exception\DiscoveryException;
use KaririCode\ClassDiscovery\Result\ClassMetadata;
use KaririCode\ClassDiscovery\Result\DiscoveryResult as ConcreteDiscoveryResult;
use KaririCode\ClassDiscovery\Scanner\DirectoryScanner;
Expand All @@ -19,7 +18,6 @@
use PHPUnit\Framework\TestCase;

#[CoversClass(DirectoryScanner::class)]
#[CoversClass(DiscoveryException::class)]
#[UsesClass(FileScanner::class)]
#[UsesClass(ConcreteDiscoveryResult::class)]
#[UsesClass(ClassMetadata::class)]
Expand Down