Context
The PHPUnit integration currently lives inside the main repository, in src/PHPUnit/ArchRuleCheckerConstraintAdapter.php (plus the test helper tests/E2E/PHPUnit/ArchRuleTestCase.php). It's a thin adapter that wraps the Runner into a PHPUnit\Framework\Constraint\Constraint, so that architectural rules can be asserted directly inside a PHPUnit suite instead of through the CLI.
The fact that PHPUnit is only a dev-dependency is already a bit of a stretch today: the class extends PHPUnit\Framework\Constraint\Constraint, which is not guaranteed to be available at runtime (see the @psalm-suppress UndefinedClass and the comment in the file).
Proposal
Move the PHPUnit adapter to a separate repository (e.g. phparkitect/phpunit) that depends on phparkitect/phparkitect.
Motivation
- Dedicated documentation — the integration would get its own README and examples, instead of being a barely visible detail in the main repo.
- Visibility into real usage — a separate package makes it measurable (downloads, issues, stars) how much the adapter is actually used. Today that's impossible to tell.
- A life of its own — it could evolve independently (support for multiple PHPUnit versions, more assertions/helpers) or, if unused, be deprecated without touching the core.
- Cleaner dependencies — it removes a (dev) dependency on the PHPUnit framework from the core, clarifying the boundary between the analysis tool and the test-runner integration.
Points to evaluate
- Name/namespace of the new package and a deprecation strategy for
Arkitect\PHPUnit\* in the current repo (BC break for existing users).
- How to keep the two repos aligned across versions (compatibility matrix).
- Whether to move the related E2E tests as well.
Context
The PHPUnit integration currently lives inside the main repository, in
src/PHPUnit/ArchRuleCheckerConstraintAdapter.php(plus the test helpertests/E2E/PHPUnit/ArchRuleTestCase.php). It's a thin adapter that wraps theRunnerinto aPHPUnit\Framework\Constraint\Constraint, so that architectural rules can be asserted directly inside a PHPUnit suite instead of through the CLI.The fact that PHPUnit is only a
dev-dependencyis already a bit of a stretch today: the class extendsPHPUnit\Framework\Constraint\Constraint, which is not guaranteed to be available at runtime (see the@psalm-suppress UndefinedClassand the comment in the file).Proposal
Move the PHPUnit adapter to a separate repository (e.g.
phparkitect/phpunit) that depends onphparkitect/phparkitect.Motivation
Points to evaluate
Arkitect\PHPUnit\*in the current repo (BC break for existing users).