Missing test files
Every source path resolves to an expected test path, with explicit file maps for real-world exceptions.
A release gate that compares source structure, declared coverage intent, and real coverage output before weak test architecture reaches CI.
Static test architecture checks for teams that ship PHP
Parity reads the coverage reports you already generate and answers the hand-off question reviewers actually care about: does this source file have the right test, does that test claim ownership, and did it cover meaningful executable lines?
{
"passed": true,
"global_coverage": 71.88,
"min_coverage_global": 60,
"structures": [
{
"name": "Services",
"files": [
{
"source": "app/Services/ParityChecker.php",
"test": "tests/Unit/Services/ParityCheckerTest.php",
"passed": true,
"rules": {
"test-exists": { "value": "Y" },
"minimum-coverage": { "value": "68.33%" },
"matched-coverage": { "value": "68.33%" }
}
}
]
}
]
}What the gate catches
Every source path resolves to an expected test path, with explicit file maps for real-world exceptions.
Pest ->covers() and PHPUnit #[CoversClass] declarations are validated statically.
PHPUnit XML attribution lets Parity distinguish matching-test coverage from accidental coverage.
Machine-readable JSON and deterministic exit codes make Parity a straightforward release gate.
Release workflow
parity.yaml.The Parity repository now runs php parity check --format=json against its own production code in CI.
Use rich PHPUnit XML attribution when available, or portable Clover and Cobertura reports when integrating other stacks.
Add project-local, user-global, or Composer-distributed rules without forking the core checker.