Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AC-1895: Avoid having duplicated issues in magento-coding-standard #362

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions Magento2/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
<exclude-pattern>*\.phtml$</exclude-pattern>
<exclude-pattern>*\.xml$</exclude-pattern>
</rule>
<rule ref="Generic.PHP.DeprecatedFunctions">
Copy link
Contributor Author

@svera svera Jan 14, 2022

Choose a reason for hiding this comment

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

This only catches deprecations and, due to it using get_defined_functions()to get deprecated methods, its coverage is not as good as the solution from PHPCompatibility because it doesn't include functions coming from extensions or deprecations from different PHP versions than the one which is running the sniff.

<severity>10</severity>
<type>error</type>
<exclude-pattern>*\.xml$</exclude-pattern>
</rule>
<rule ref="Generic.PHP.NoSilencedErrors">
<severity>10</severity>
<type>error</type>
Expand Down Expand Up @@ -762,9 +757,12 @@
</rule>
<rule ref="PHPCompatibility">
<exclude name="PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound" />
<!-- Following sniffs has been updated or renamed in PHPCompatibility 10 -->
<exclude name="PHPCompatibility.Constants.NewMagicClassConstant" />
<exclude name="PHPCompatibility.Classes.ForbiddenAbstractPrivateMethods" />
<!-- Following sniffs have been updated or renamed in PHPCompatibility 10 -->
<exclude name="PHPCompatibility.Constants.NewMagicClassConstant.Found" />
<exclude name="PHPCompatibility.Classes.ForbiddenAbstractPrivateMethods.Found" />
<!-- Following sniffs have an equivalent in PHPCS -->
<exclude name="PHPCompatibility.Syntax.ForbiddenCallTimePassByReference.Deprecated" />
<exclude name="PHPCompatibility.Syntax.ForbiddenCallTimePassByReference.NotAllowed" />
<!-- Check for cross-version support for stated PHP version and higher. -->
<config name="testVersion" value="7.4-"/>
</rule>
Expand Down