NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #2099 most downloaded on Packagist
Configurable PHP architecture guards — define your layers and rules, then keep them enforced
Latest stable
0.21.8
Last release 13 days ago
08 Nov 2026
Ships on a steady schedule
a new release about every 8 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 months old
251 releases · first in 2026
Drag across the ruler to compare, or tap a release to open it.
 ![PHPStan]
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.15.5...0.15.6
Your coding agent can read these notes before it upgrades. Set up the MCP server →
One column per month.
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.15.4...0.15.5
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.15.3...0.15.4
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.15.0...0.15.1
 ![PHPStan]
This release introduces Boundwize\StructArmed\Rule\ExtendedClassAwareRuleInterface.
A marker that lets a rule know whether the class it's evaluating is extended by another scanned class, and applies it to Boundwize\StructArmed\Rule\Rules\Class_\MustBeFinalRule.
Using interface in custom rule:
use Boundwize\StructArmed\Analyser\ClassNode;
use Boundwize\StructArmed\Rule\ExtendedClassAwareRuleInterface;
use Boundwize\StructArmed\Rule\RuleViolation;
final readonly class MyRule implements ExtendedClassAwareRuleInterface
{
public function appliesTo(ClassNode $classNode): bool
{
return $classNode->isClass();
}
public function evaluate(ClassNode $classNode): ?RuleViolation
{
// Skip classes that another scanned class extends.
if ($classNode->isExtended) {
return null;
}
// other check ...
return new RuleViolation(
...
);
}
}
Full Changelog: https://github.com/boundwize/structarmed/compare/0.14.20...0.15.0
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.14.16...0.14.17
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.14.15...0.14.16
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.14.11...0.14.12
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.14.10...0.14.11
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.14.9...0.14.10
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.14.8...0.14.9
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.14.7...0.14.8
 ![PHPStan]
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.14.5...0.14.6
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
Psr1Utf8WithoutBomRuleinto 2 rules: Psr1Utf8WithoutBomRule and Psr1ValidUtf8Rule and make Psr1Utf8WithoutBomRule implements FixableInterface by @samsonasik in https://github.com/boundwize/structarmed/pull/183Full Changelog: https://github.com/boundwize/structarmed/compare/0.14.1...0.14.2
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.14.0...0.14.1
 ![PHPStan]
StructArmed 0.14.0 introduces new Boundwize\StructArmed\Rule\FixableInterface that when rule implements it, it can apply a fix with make use of fix method, eg:
use Boundwize\StructArmed\Rule\FixableInterface;
-final readonly class SomeRule implements RuleInterface
+final readonly class SomeRule implements RuleInterface, FixableInterface
{
+ public function fix(RuleViolation $ruleViolation): bool
+ {
+ // do custom fix implementation based on RuleViolation object information
+ }
}
This feature brings some example of it that utilize PhpParser:
that extends Boundwize\StructArmed\Rule\Fixer\PhpParser\AbstractPhpParserFixableRule that we only need to define the PhpParser visitor that do the fix:
protected function createFixerVisitor(RuleViolation $ruleViolation): AddPublicConstantVisibilityVisitor
{
/** @var string $constantName */
$constantName = $ruleViolation->constantName;
return new AddPublicConstantVisibilityVisitor(
$ruleViolation->className,
$constantName
);
}
The usage will be:
vendor/bin/structarmed analyze --fix
<img width="833" height="359" alt="Screenshot 2026-06-27 at 04 25 02" src="https://github.com/user-attachments/assets/64c1b129-b1fe-4aef-b829-87d18a710612" />
The example usage will be on https://boundwize.github.io/structarmed/custom-rules-and-presets/
Full Changelog: https://github.com/boundwize/structarmed/compare/0.13.8...0.14.0
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.13.4...0.13.5
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.13.3...0.13.4
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
This release improves inheritance-aware architecture analysis. StructArmed can now resolve recursive class and interface ancestry.
For example, this now resolves correctly:
class A extends B {}
class B extends C {}
class C implements \Psr\Http\Server\MiddlewareInterface {}
A is now treated as implementing \Psr\Http\Server\MiddlewareInterface.
One example is ClassImplementingInterfaceMustHaveSuffixRule, which now applies to a class that extends another class, which eventually implements \Psr\Http\Server\MiddlewareInterface.
This keeps PSR-15 suffix checks compatible with custom middleware and request-handler abstractions before they reach the root PSR interfaces.
Full Changelog: https://github.com/boundwize/structarmed/compare/0.12.6...0.13.0
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.12.5...0.12.6
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.12.4...0.12.5
 ![PHPStan]
 ![PHPStan]
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.12.1...0.12.2
 ![PHPStan]
Full Changelog: https://github.com/boundwize/structarmed/compare/0.12.0...0.12.1
Released: StructArmed 0.12.0 --
You can now pass an array of class-name regex patterns for a layer:
->layerPattern('Service', [
'/^App\\\\Service\\\\.*$/',
'/^App\\\\Application\\\\.*Service$/',
])
You can also pass an array of exclude patterns:
->layerPattern('HTTP', '/^App\\\\HTTP\\\\.*$/', [
'/Exception$/',
'/^App\\\\HTTP\\\\URI$/',
])
Full Changelog: https://github.com/boundwize/structarmed/compare/0.11.3...0.12.0
        ![PHPStan
Adds support for the +LayerName shorthand in ruleset definition.
For example, given the following config:
->ruleset([
'API' => ['Format'],
'Controller' => ['Validation'],
'RESTful' => ['+API', '+Controller'],
])
It nows merge 2 collection of layer and its allowed dependents, which replace the manual write:
-'RESTful' => ['API', 'Format', 'Controller', 'Validation'],
+'RESTful' => ['+API', '+Controller'],
removing the need to duplicate those entries by hand.
Full Changelog: https://github.com/boundwize/structarmed/compare/0.10.1...0.11.0
                      ![PHPStan