Releases: phparkitect/arkitect
Release list
1.2.0
What's Changed
New features
- Baseline can be created without line numbers using the --ignore-line-numbers option by @AlessandroMinoccheri in #621
Fixes
- fix: make init suggest a command instead of a wrong path by @fain182 in #625
- Fix nullable return type dependency not detected by @fain182 in #640
- Detect dependencies in union, intersection and DNF types by @fain182 in #644
- Detect closure and arrow function return type dependencies by @fain182 in #645
- Detect typed class constant dependencies (PHP 8.3) by @fain182 in #646
Documentation improvements
- Improve configuration's documentation by @fain182 in #623
- docs: document the init and debug:expression commands by @fain182 in #624
- docs: slim README and extract rule catalog to docs/rules.md by @fain182 in #627
- Adds UPGRADE.md by @fain182 in #628
- docs: expand rules reference with signatures and per-rule TOC by @fain182 in #634
Chores
- Simplify FileVisitor and dedup property hook param dependencies by @fain182 in #647
- ci(deps): bump codecov/codecov-action from 6 to 7 by @dependabot[bot] in #622
- Remove unnecessary array deduplication in namespace expressions by @fain182 in #629
- ci(deps): bump actions/checkout from 6 to 7 by @dependabot[bot] in #632
- ci(deps): bump actions/cache from 5 to 6 by @dependabot[bot] in #633
Full Changelog: 1.1.1...1.2.0
1.1.1
1.1.0
What's Changed
- ci: revert architectural-rules to composer install by @fain182 in #614
- Remove redundant ext-json requirement by @fain182 in #613
- added Not have attribute expression by @AlessandroMinoccheri in #615
- Add tests and doc for the feature and that by @AlessandroMinoccheri in #616
Full Changelog: 1.0.0...1.1.0
1.0.0
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
0.8.0
Added
- Permits to reuse the same that() for multiple should() by @fain182 in #543
- Collect dependencies defined in property hooks by @fain182 in #538
- Add namespace shortcut for Rule class by @fain182 in #539
- Add rule for exact matching of namespaces by @fain182 in #554
Fixed
- Fix: appliesTo() incorrectly excludes mutually exclusive class states by @fain182 in #561
- Remove unnecessary Psalm suppressions from ProgressBarProgress by @fain182 in #545
- Removes unused class by @fain182 in #544
- fix minor errors in README by @fain182 in #556
- Add all rules to README documentation by @fain182 in #558
- Improve readme adding quick start, github action and an improved introduction by @fain182 in #557
Updated
- deps(deps-dev): update friendsofphp/php-cs-fixer requirement from ^3.90 to ^3.91 by @dependabot[bot] in #542
- deps(deps): update webmozart/assert requirement from ^1.9 to ^1.12 by @dependabot[bot] in #534
- ci(deps): bump actions/cache from 4 to 5 by @dependabot[bot] in #548
- ci(deps): bump actions/upload-artifact from 4 to 6 by @dependabot[bot] in #547
- deps(deps-dev): update friendsofphp/php-cs-fixer requirement from ^3.91 to ^3.92 by @dependabot[bot] in #549
- ci(deps): bump actions/checkout from 5 to 6 by @dependabot[bot] in #531
- ci(deps): bump actions/download-artifact from 4 to 7 by @dependabot[bot] in #546
Full Changelog: 0.7.0...0.8.0
0.7.0
What's Changed
- Symfony 8 support by @fain182 in #537
- Adds support to php 8.5 by @fain182 in #541
- Create a IsA expression by @hgraca in #396
- Splits FileVisitorTest in multiple files by @micheleorselli in #502
- Use custom resolver for extracting type information from docblocks by @micheleorselli in #504
- Collect types declared in @throws tags and consider them dependencies (1/2) by @micheleorselli in #507
- split FileVisitor::handleClassNode into handleClassNode and handleAnonClassNode by @micheleorselli in #511
- Ignore union types in dockblock definitions by @micheleorselli in #510
- FileVisitor improvements by @micheleorselli in #512
- fix dockblock parsing which considers phpstan tags a classes by @micheleorselli in #517
- Add Dependabot configuration for automated dependency updates by @fain182 in #518
- ci(deps): bump codecov/codecov-action from 1 to 5 by @dependabot[bot] in #523
- ci(deps): bump actions/checkout from 3 to 4 by @dependabot[bot] in #521
- ci(deps): bump docker/login-action from 1 to 3 by @dependabot[bot] in #522
- ci(deps): bump crazy-max/ghaction-docker-meta from 2 to 5 by @dependabot[bot] in #520
- ci(deps): bump test-room-7/action-update-file from 1 to 2 by @dependabot[bot] in #524
- refactor: reduce duplication in FileParser test cases by @fain182 in #525
- ci(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in #526
- deps: add versioning-strategy increase for composer by @fain182 in #530
- deps(deps-dev): update phpspec/prophecy-phpunit requirement from ^2.3 to ^2.4 by @dependabot[bot] in #532
- deps(deps): update ondram/ci-detector requirement from ^4.1 to ^4.2 by @dependabot[bot] in #533
- deps(deps-dev): update friendsofphp/php-cs-fixer requirement from ^3.75 to ^3.90 by @dependabot[bot] in #535
- deps(deps): update symfony/polyfill-php80 requirement from ^1.20 to ^1.33 by @dependabot[bot] in #540
New Contributors
- @dependabot[bot] made their first contribution in #523
Full Changelog: 0.6.0...0.7.0
0.6.0
What's Changed
- Allow to exclude some namespaces in NotDependsOnTheseNamespaces and DependsOnlyOnTheseNamespaces by @micheleorselli in #501
This is a BC Break, you must update any usage of DependsOnlyOnTheseNamespaces and NotDependsOnTheseNamespaces to remove the usage of variadic arg:
before:
new DependsOnlyOnTheseNamespaces('App\Domain', 'App\Infrastructure')
new NotDependsOnTheseNamespaces('App\Domain', 'App\Infrastructure')after:
new DependsOnlyOnTheseNamespaces(['App\Domain', 'App\Infrastructure'])
new NotDependsOnTheseNamespaces(['App\Domain', 'App\Infrastructure'])Full Changelog: 0.5.5...0.6.0
0.5.5
What's Changed
- Fix typos by @szepeviktor in #490
- Avoid parse anonymous class for isFinal, isAbstract, isReadonly by @AlessandroMinoccheri in #495
Full Changelog: 0.5.4...0.5.5
0.5.4
What's Changed
notable changes
- Add relative file path to ClassDescription in #477
- Violation can now contain a reference to the file path in #478
- Add GitLab output format support to CLI. by @raffaelecarelle in #474
- Check: adds an option to specify an autoloader file to be included in #489
- Print violations to stdout, everything else to stderr in #484
refactorings
- Fixes Json output without errors by @raffaelecarelle in #475
- Removes $stopOnFailure params from Violations class in #476
- Bump csfixer to version 3.75.0 and tweak configuration in #479
- README: Add support for 'gitlab' as an output format by @raffaelecarelle in #482
- Moves catch FailOnFirstViolationException in the Runner class in #483
- Splits FileVisitor::enterNode in smaller methods in #485
- Cleanup and make more consistent Check command in #486
- Create baseline class in #487
- Use Config class to collect several configurations in #488
- simplify init by @fain182 in #288
Full Changelog: 0.5.3...0.5.4
0.5.3
What's Changed
- Sign phar when releasing it by @micheleorselli in #465
- Converts CheckClassNamingTest to use TestRunner class by @micheleorselli in #468
- Specify a custom temporary directory when creating the phar by @micheleorselli in #467
- Make data provider in tests static by @micheleorselli in #466
- Remove version from composer.json by @szepeviktor in #462
- fix README.md by @raffaelecarelle in #469
- Adds a test case in PatternStringTest by @micheleorselli in #471
- Support multiple output formats for violation reporting by @raffaelecarelle in #470
- Moves CheckClassHaveAttributeTest to integration tests by @micheleorselli in #472
- Documents --format option by @micheleorselli in #473
New Contributors
- @raffaelecarelle made their first contribution in #469
Full Changelog: 0.5.2...0.5.3