Highlights
- Smarter baseline matching: changes to a rule's allowed-namespaces list no longer invalidate matching baseline entries (#377).
- PHP core classes auto-excluded from dependency checks via reflection (isInternal()), so you no longer need to list \Exception, \DateTime, MongoDB\Driver\Manager, etc. in your rules (#338).
- Trait rules: new HaveTrait and NotHaveTrait expressions to enforce trait usage policies (#424).
- IsNotA expression: symmetric counterpart to IsA.
- Recursive glob in excludePath(): new ** wildcard matches across any number of directory levels (e.g. excludePath('**/Tests/')).
- Better dependency detection for exceptions:
- Hardened PHAR build: switched the build pipeline to php-scoper (via Box 4.x) to prevent namespace conflicts with the host project's dependencies.
Breaking changes
PHP 7 support dropped
The minimum PHP version is now 8.0. If you are still on PHP 7.x, stay on 0.8.x.
--autoload is mandatory when running as PHAR
- php phparkitect.phar check
+ php phparkitect.phar check --autoload vendor/autoload.php
* in excludePath() no longer crosses directory separators
The path glob in ClassSet::excludePath() was reworked so * matches within a single directory segment. Use ** for the previous greedy behavior.
- $set->excludePath('src/*/Test.php'); // used to match src/A/B/C/Test.php
+ $set->excludePath('src/**/Test.php'); // matches at any depth
Most simple patterns (Tests/*, *Test.php) are unaffected because the regex is consumed as a substring match.
PHP core classes are filtered, root-namespace classes are not
With PHP-core auto-exclusion in place, the previous "skip everything in the root namespace" shortcut in DependsOnlyOnTheseNamespaces and NotDependsOnTheseNamespaces was removed. User-defined classes in the global namespace are now evaluated against your rules — they used to be silently skipped.
Docker image no longer published
We're no longer publishing the PHParkitect Docker image — usage looked low and most people run PHParkitect via Composer or the released PHAR. If you depended on the image, the existing tags on Docker Hub stay available, but no new ones will be pushed.
New Contributors
- @sukei made their first contribution in #573
- @chadyred made their first contribution in #578
- @wcomnisky made their first contribution in #595
Full changelog: 0.8.0...1.0.0