Update dependency boundwize/structarmed to ^0.18.0 - #554
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 7.0 #554 +/- ##
=========================================
Coverage 63.80% 63.80%
Complexity 989 989
=========================================
Files 180 180
Lines 3404 3404
=========================================
Hits 2172 2172
Misses 1232 1232 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
alexmerlin
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.17.12→^0.18.0Release Notes
boundwize/structarmed (boundwize/structarmed)
v0.18.0: Released: StructArmed 0.18.0Compare Source
StructArmed 0.18.0 improves CI integration and expands YAGNI analysis to named functions.
This release introduces:
--report=github;Architecture::layer();Boundwize\StructArmed\Rule\UsedFunctionAwareRuleInterfaceand the new fixableMustBeUsedFunctionRule.GitHub Actions Report
StructArmed can now report violations directly as GitHub Actions annotations:
Each violation is emitted as a GitHub workflow error annotation, so violations appear directly on affected files and lines in pull requests.
The regular console report is appended after the annotations, so View details still opens a readable StructArmed report in the job log.
For example:
The GitHub report intentionally exits with
0, allowing violations to be surfaced as annotations without failing the job itself.Use the regular
consoleorjsonreport when violations should fail the job.The
githubandjsonreports also disable the progress bar automatically.Exclude Paths From Layers
Architecture::layer()now supports excluding one or more nested paths from a layer.For example:
Files under
src/Logger/Factory/now belong toFactorywithout also belonging toLogger.Multiple paths can be excluded:
The exclusion only applies to that particular layer. A file may still resolve to another matching path layer, namespace-pattern layer, or the automatically registered
Sourcelayer.This mirrors the existing exclusion support in
layerPattern()and makes nested architecture boundaries easier to express without changing the directory structure.YAGNI For Named Functions
The YAGNI preset can now detect unused named functions.
A new rule:
checks whether a function is called or otherwise referenced within the scanned code.
For example:
The rule understands usages including:
'App\helper';A function that only recursively calls itself still counts as unused.
MustBeUsedFunctionRulesupports--fix, removing the unused function automatically. It can also clean up an empty surroundingif (! function_exists(...))guard and remove the file when only boilerplate remains.The rule is enabled automatically by:
Preset::YAGNI()As with the other YAGNI rules, only usages inside the scanned paths are known. Functions intended as public extension points for external consumers can be excluded with
skipRule()or skip paths.UsedFunctionAwareRuleInterface
Custom function rules can opt into function-usage analysis through the new:
It extends
FunctionRuleInterfaceand makes the usage state available through:For example:
Usage analysis is opt-in: StructArmed performs the additional work only when at least one active rule implements
UsedFunctionAwareRuleInterface.PHPUnit Extension Controls
The PHPUnit extension is now easier to control in CI.
Disable StructArmed For One PHPUnit Run
Set:
StructArmed remains configured in
phpunit.xml, but the extension skips architecture analysis for that run.This is useful when StructArmed already runs as a dedicated CI step.
Disable Progress Output
PHPUnit's own
--no-progressnow also disables the StructArmed progress bar:To disable only StructArmed's progress output while preserving PHPUnit's progress display:
Dependency Update
StructArmed now requires:
What's Changed
--report=githubin #445^5.9in #448excludePathinArchitecture::layer()in #450STRUCTARMED_DISABLEDenv to disable the PHPUnit extension in #459UsedFunctionAwareRuleInterfaceandMustBeUsedFunctionRulefor YAGNI preset in #462Full Changelog: boundwize/structarmed@0.17.12...0.18.0
What's Changed
Full Changelog: boundwize/structarmed@0.17.12...0.18.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.