Skip to content

qa: Set dependency ruleset for StructArmed - #844

Open
samsonasik wants to merge 4 commits into
CuyZ:masterfrom
samsonasik:qa-ruleset
Open

samsonasik wants to merge 4 commits into
CuyZ:masterfrom
samsonasik:qa-ruleset

Conversation

@samsonasik

@samsonasik samsonasik commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

@romm continue of PR:

This PR set dependency ruleset. Here are some explanations:

  • setup layers that can be used in the ruleset
  • layer that can be defined per directory set via layer(), with 3rd arg as excluded pattern.
  • use of +LayerName syntax sugar to show inheriting allowed Layers to merge a layer’s allowed dependencies into another layer’s allowed list, so it can simplified:
'Definition' => ['Utility', 'UtilityType', 'Type', 'Attributes', 'FeatureAttribute'],

// ...
-'DefinitionCache' => ['Definition', 'Utility', 'UtilityType', 'Type', 'Attributes', 'FeatureAttribute', 'Cache'],
+'DefinitionCache' => ['+Definition', 'Cache'],

so it auto expand without repeated copy paste allowed layers.

@samsonasik

Copy link
Copy Markdown
Contributor Author

@romm ready to merge 👍

@samsonasik

Copy link
Copy Markdown
Contributor Author

@romm I've bumped to structarmed ^0.18 and change layerPattern() to layer() with 3rd argument for simplify config, no more regex in config 👍

Ready for merge 👍

@samsonasik

Copy link
Copy Markdown
Contributor Author

@romm I've fixed phpstan notice after composer update. Ready to merge 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant