Skip to content

Use StructArmed on QA - #1580

Open
samsonasik wants to merge 8 commits into
Roave:6.74.xfrom
samsonasik:use-structarmed-qa
Open

Use StructArmed on QA#1580
samsonasik wants to merge 8 commits into
Roave:6.74.xfrom
samsonasik:use-structarmed-qa

Conversation

@samsonasik

@samsonasik samsonasik commented Sep 10, 2026

Copy link
Copy Markdown

This PR adds StructArmed to QA:

https://github.com/boundwize/structarmed

It is a configurable PHP architecture guards with built in presets (psr4, mvc, and so on). This PR apply StructArmed with register:

  • PSR4 Preset
    This PR start apply StructArmed with initialize using PSR4 preset, and already help fix 8 violations.

  • I also enable ruleset so it show more ability of layering setup to define which layers each layer is allowed to depend on.

  • Register to Github workflow.

@samsonasik

Copy link
Copy Markdown
Author

@Ocramius ready for review/merge 👍

@samsonasik

Copy link
Copy Markdown
Author

Rebased 👍

@Ocramius

Copy link
Copy Markdown
Member

Hey @samsonasik, just FYI, I didn't ignore your patches about this (and on other repositories as well), but I simply didn't get to play around with the tool yet.

@kukulich @asgrim do you have opinions on a layer structure we could follow for this project, BTW?

Comment thread test/unit/SourceLocator/Type/Composer/Psr/Excetion/InvalidPrefixMappingTest.php Outdated
@samsonasik

Copy link
Copy Markdown
Author

@Ocramius that's fine, if ruleset layering need in separate PR and just need apply PSR4 for starter, just let me know ;)

@kukulich

Copy link
Copy Markdown
Collaborator

I'm not against new check tool however the configuration looks too complicated to me: https://github.com/Roave/BetterReflection/pull/1580/changes#diff-6c750795fe8e9ac3fc3936402fef25d2ca69ca1d01ef0f16c2ad8b27cde4b041

@samsonasik

samsonasik commented Sep 12, 2026

Copy link
Copy Markdown
Author

@kukulich sure, I've updated the config to use layer() over layerPattern() when possible to simplify the config 👍 09704bd

Less regex and should be ok now 👍 Just let me know if you need another simplification even more.

@samsonasik

Copy link
Copy Markdown
Author

@kukulich I've cleaned even more so no more regex in the config 6b07a11 👍

It clean now, no more complicated config 👍

Just let me know if you doesn't want to ruleset() definition and just the PSR4 preset for this starter PR :)

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.

3 participants