Skip to content

Commit

Permalink
Coding Standards: Remove unnecessary directives in the PHPCompatibili…
Browse files Browse the repository at this point in the history
…ty ruleset.

This commit:

* Removes the unnecessary exclusion patterns for the `node_modules` and `vendor` directories. As this ruleset only scans the `src` directory, those directories would never be scanned anyway.
* Removes the selective excludes related to the random_compat package. This package was removed in WP 6.3, so these excludes are no longer necessary.

Follow-up to [46290], [56141].

Props jrf.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56667 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Sep 23, 2023
1 parent d7388b5 commit 3dbfc06
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions phpcompat.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,6 @@
<!-- For now, only the files in src are scanned. -->
<file>./src/</file>

<!-- Code which doesn't go into production may have different requirements. -->
<exclude-pattern>/node_modules/*</exclude-pattern>

<!--
Currently, there are no dependencies managed by Composer.
This will need to be modified when that changes to ensure external packages meet compatibility requirements.
-->
<exclude-pattern>/vendor/*</exclude-pattern>

<!-- Exclude Must-Use plugins. -->
<exclude-pattern>/src/wp-content/mu-plugins/*</exclude-pattern>

Expand Down Expand Up @@ -92,21 +83,4 @@
<exclude-pattern>/sodium_compat/src/Compat\.php$</exclude-pattern>
</rule>

<!--
PHPCompatibilityParagonieRandomCompat prevents false positives in `random_compat`.
However, because these files are included in a non-standard path, false positives are triggered in WordPress Core.
-->
<rule ref="PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated">
<exclude-pattern>/random_compat/byte_safe_strings\.php$</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_dev_urandomDeprecatedRemoved">
<exclude-pattern>/random_compat/random_bytes_mcrypt\.php$</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Extensions.RemovedExtensions.mcryptDeprecatedRemoved">
<exclude-pattern>/random_compat/random_bytes_mcrypt\.php$</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_create_ivDeprecatedRemoved">
<exclude-pattern>/random_compat/random_bytes_mcrypt\.php$</exclude-pattern>
</rule>

</ruleset>

0 comments on commit 3dbfc06

Please sign in to comment.