Skip to content

Use StructArmed on QA - #7104

Open
samsonasik wants to merge 8 commits into
phpstan:2.3.xfrom
samsonasik:use-structarmed-on-qa
Open

samsonasik wants to merge 8 commits into
phpstan:2.3.xfrom
samsonasik:use-structarmed-on-qa

Conversation

@samsonasik

@samsonasik samsonasik commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Hi,

This PR makes use of StructArmed as an architecture check on QA.

For starter, this PR apply PSR4 and CodeQuality preset, and already fix 13 violations:

  • make use of _ literal on big numbers.

Applied with single command:

vendor/bin/structarmed analyze --fix

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

I also register to github worklow for it.

Please let me know if this is ok or need simplification/reduction change for starter. Thank you.

@samsonasik

Copy link
Copy Markdown
Contributor Author

@ondrejmirtes ready for review 👍

@samsonasik

Copy link
Copy Markdown
Contributor Author

@ondrejmirtes this should be ready now 👍

@staabm

staabm commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

thanks for preparing the PR.

I don't think the reported problems are relevant for phpstan. looks more like cosmetic fixes which are not worth maintaining another tool in our CI pipeline.

@samsonasik

samsonasik commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor Author

@staabm yeah, I can clean codequality preset registration for this PR, so it only give ruleset dependency layers config.

I will clean it up when I back to PC today

@staabm

staabm commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

I don't want to say you need to invest more time to make it acceptable. my feeling is this new CI check "is not valuable" for phpstan-src. at least I don't see which value it is expected to provide

@samsonasik

Copy link
Copy Markdown
Contributor Author

Okay, I think we can wait @ondrejmirtes opinion about it. If you guys want to know more about the capability to show off (eg: YAGNI, STABILITY preset), just let me know :)

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.

2 participants