Skip to content

Releases: phparkitect/arkitect

1.0.0

25 Apr 18:51
7b1fa40

Choose a tag to compare

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

28 Jan 21:03
8097d80

Choose a tag to compare

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

02 Dec 10:00
f6e11f5

Choose a tag to compare

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

09 May 15:46
e7a9b6a

Choose a tag to compare

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

08 May 15:40
575f131

Choose a tag to compare

What's Changed

Full Changelog: 0.5.4...0.5.5

0.5.4

28 Apr 21:14
25cc50a

Choose a tag to compare

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

30 Mar 21:12
e826a47

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.5.2...0.5.3

0.5.2

17 Mar 21:33

Choose a tag to compare

What's Changed

Collect extends also for interfaces #464
Now the extends attribute of ClassDescription is populated also for interfaces. the ClassDescription getExtends now returns an array instead of a string

Allow using phpdoc-parser v1.2 in #463
Support to v1 was removed but since that version could still be used it was re-added

Full Changelog: 0.5.1...0.5.2

0.5.1

14 Mar 08:10

Choose a tag to compare

Made a boo boo when publishing 0.5.0 and was not showing up on packagist, this should fix it

0.5.0

13 Mar 20:59
9aaafd8

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.4.0...0.5.0