From 3531daa8693997e81f28c42755cb0779be373bf6 Mon Sep 17 00:00:00 2001 From: Olivier Gorzalka Date: Thu, 5 Nov 2026 08:59:36 +0100 Subject: [PATCH] chore: harness 0.1.22 --- .github/workflows/harness.yml | 2 +- .harness.json | 6 ++++++ CHANGELOG.md | 2 +- composer.json | 2 +- tests/Arch.php | 16 ---------------- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/harness.yml b/.github/workflows/harness.yml index f5dff14..5ae71d8 100644 --- a/.github/workflows/harness.yml +++ b/.github/workflows/harness.yml @@ -14,6 +14,6 @@ permissions: {} jobs: harness: - uses: Pollora/harness/.github/workflows/php-package.yml@v0.1.20 + uses: Pollora/harness/.github/workflows/php-package.yml@v0.1.22 permissions: contents: read diff --git a/.harness.json b/.harness.json index e37175b..a3b830d 100644 --- a/.harness.json +++ b/.harness.json @@ -4,6 +4,12 @@ "downstream": [ "framework" ], + "allow_rules": [ + { + "rule": "ARCH-08", + "reason": "the attribute classes are published; final/readonly waits for the next major version" + } + ], "ratchet": { "phpstan_level": 5, "phpstan_baseline": 0, diff --git a/CHANGELOG.md b/CHANGELOG.md index e1cf9a0..ab5c5ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- The harness's ARCH-08 rule (attribute classes are final, with `readonly` public properties) is skipped in `tests/Arch.php`, for this repository only: the classes are published and may be extended, so making them `final` and `readonly` is a change of contract, planned for the next major version. Every other architecture rule stays active +- The harness's ARCH-08 rule (attribute classes are final, with `readonly` public properties) is exempted through `allow_rules` in `.harness.json`, for this repository only: the classes are published and may be extended, so making them `final` and `readonly` is a change of contract, planned for the next major version. Every other architecture rule stays active ## [0.1.1] - 2026-10-15 diff --git a/composer.json b/composer.json index febbb30..90c1289 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "laravel/pint": "^1.22.1", "pestphp/pest": "^3.8.2", "phpstan/phpstan": "^2.1.16", - "pollora/harness": "^0.1.20", + "pollora/harness": "^0.1.22", "szepeviktor/phpstan-wordpress": "^2.0" }, "autoload": { diff --git a/tests/Arch.php b/tests/Arch.php index ed2d95c..3aa969e 100644 --- a/tests/Arch.php +++ b/tests/Arch.php @@ -12,20 +12,4 @@ * `vendor/bin/pollora-qa rules`. */ -/* - * ARCH-08 is left out on purpose, for this repository only. - * - * The attribute classes are published (since v0.1.0) and extended or mutated - * by the packages built on them: making them `final` and their public - * properties `readonly` would change the public contract, so it waits for a - * major version. Only ARCH-08 is skipped; every other rule below stays active. - * Remove this block, and the CHANGELOG entry that goes with it, when the - * attributes are made final and readonly in the next major release. - */ -beforeEach(function (): void { - if (str_contains($this->name(), 'ARCH_08')) { - $this->markTestSkipped('ARCH-08 waits for the next major version: final/readonly would change the published contract.'); - } -}); - Architecture::for(dirname(__DIR__))->register();