Add StructArmed to QA#398
Conversation
|
@LordSimal ready to merge 👍 |
|
@samsonasik thanks for introducing this new tool, i wasn't aware this existed at all. Couldn't we adjust that 1 test file so we don't have to skip? |
|
@LordSimal yes 👍 , I've:
Ready for merge 👍 |
|
As far as I can understand - your package makes sure, that all the classes are actually following the defined PSR naming conventions for autoloading, right? This is usually reported by composer anyway as far as I know when doing |
|
StructArmed is not only about PSR autoloading or naming conventions. That is just one possible preset/rule set. Also, afaik, composer usually only gives a warning for PSR-4 mismatch; it does not enforce it as a project rule. The bigger purpose of StructArmed is architecture and structure enforcement. It can detect when a class, namespace, or layer uses something it should not use from another namespace or layer. For example, you can define that one layer must not access another layer, and make that fail in CI when violated. You can take a look at this more complex real-world example from CodeIgniter 4: https://github.com/codeigniter4/CodeIgniter4/blob/develop/structarmed.php It shows practical usage in a GitHub workflow, where StructArmed helps detect layer-boundary violations, not just PSR-4 naming issues. This PR is for starter, you can configure more to enforce more on architecture of code ;) |
|
Thanks for the explenation! Will have to talk with the rest of the core team about this, as its a fairly new/fresh package + how we truly want to utilize its features (especially if we can use it for our other packages as well) Will keep this open for now till this has been discussed. |
This PR adds StructArmed to QA
https://github.com/boundwize/structarmed
For starter, use PSR4 preset, and already catch some PSR4 violations and already included in this PR.