Skip to content

Fix incorrect override of CouplingBetweenObjects for Magento 2 - #71

Open
ArjenMiedema wants to merge 2 commits into
YouweGit:masterfrom
ArjenMiedema:bugfix/phpmd-resolve-duplicate-coupling-between-objects
Open

Fix incorrect override of CouplingBetweenObjects for Magento 2#71
ArjenMiedema wants to merge 2 commits into
YouweGit:masterfrom
ArjenMiedema:bugfix/phpmd-resolve-duplicate-coupling-between-objects

Conversation

@ArjenMiedema

Copy link
Copy Markdown
Contributor

It's not possible to override PHPMD config, so the design ruleset with its default CouplingBetweenObjects set to 13 and the custom override below of 20 resulted in the check being done twice with two different maximum values.

By excluding the original value the override from 13 to 20 does work as expected.

Comment thread config/magento2/phpmd.xml

@rutgerrademaker rutgerrademaker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update CHANGELOG.md

@ArjenMiedema

Copy link
Copy Markdown
Contributor Author

@rutgerrademaker, this is done. Added it in the [Unreleased] section.

@youwe-petervanderwal, I've applied the comment to that section

It's not possible to override PHPMD config, so the design ruleset
with its default CouplingBetweenObjects set to 13 and the custom
override below of 20 resulted in the check being done twice with
two different maximum values.

By excluding the original value the override from 13 to 20 does work
as expected.
@ArjenMiedema
ArjenMiedema force-pushed the bugfix/phpmd-resolve-duplicate-coupling-between-objects branch from b94eb54 to 67622d5 Compare July 21, 2026 08:35
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.

5 participants