Skip to content

Releases: phparkitect/arkitect

1.2.0

Choose a tag to compare

@fain182 fain182 released this 02 Jul 10:02
4c06ef1

What's Changed

New features

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

Choose a tag to compare

@fain182 fain182 released this 30 May 10:04
30ad0cc

What's Changed

Fixes

  • Prevent autoloader invocation when checking for PHP core classes by @fain182 in #617

Chores

  • Add codecov configuration for coverage reporting by @fain182 in #618
  • Replace property docblocks with native typed properties by @fain182 in #619

Full Changelog: 1.1.0...1.1.1

1.1.0

Choose a tag to compare

@AlessandroMinoccheri AlessandroMinoccheri released this 27 May 07:26
c93d60c

What's Changed

Full Changelog: 1.0.0...1.1.0

1.0.0

Choose a tag to compare

@fain182 fain182 released this 25 Apr 18:51
7b1fa40

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:
    • catch clause types are now tracked as class dependencies (#594).
    • @throws types in docblocks are collected as dependencies (#513).
  • 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


Full changelog: 0.8.0...1.0.0

0.8.0

Choose a tag to compare

@fain182 fain182 released this 28 Jan 21:03
8097d80

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

Choose a tag to compare

@fain182 fain182 released this 02 Dec 10:00
f6e11f5

What's Changed


  • 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

Full Changelog: 0.6.0...0.7.0

0.6.0

Choose a tag to compare

@micheleorselli micheleorselli released this 09 May 15:46
e7a9b6a

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

Choose a tag to compare

@AlessandroMinoccheri AlessandroMinoccheri released this 08 May 15:40
575f131

What's Changed

Full Changelog: 0.5.4...0.5.5

0.5.4

Choose a tag to compare

@micheleorselli micheleorselli released this 28 Apr 21:14
25cc50a

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

Choose a tag to compare

@micheleorselli micheleorselli released this 30 Mar 21:12
e826a47

What's Changed

New Contributors

Full Changelog: 0.5.2...0.5.3