Make WordPress Core

Changeset 56667


Ignore:
Timestamp:
09/23/2023 11:05:18 AM (12 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Remove unnecessary directives in the PHPCompatibility 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpcompat.xml.dist

    r56666 r56667  
    4040    <!-- For now, only the files in src are scanned. -->
    4141    <file>./src/</file>
    42 
    43     <!-- Code which doesn't go into production may have different requirements. -->
    44     <exclude-pattern>/node_modules/*</exclude-pattern>
    45 
    46     <!--
    47         Currently, there are no dependencies managed by Composer.
    48         This will need to be modified when that changes to ensure external packages meet compatibility requirements.
    49     -->
    50     <exclude-pattern>/vendor/*</exclude-pattern>
    5142
    5243    <!-- Exclude Must-Use plugins. -->
     
    9384    </rule>
    9485
    95     <!--
    96         PHPCompatibilityParagonieRandomCompat prevents false positives in `random_compat`.
    97         However, because these files are included in a non-standard path, false positives are triggered in WordPress Core.
    98     -->
    99     <rule ref="PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated">
    100         <exclude-pattern>/random_compat/byte_safe_strings\.php$</exclude-pattern>
    101     </rule>
    102     <rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_dev_urandomDeprecatedRemoved">
    103         <exclude-pattern>/random_compat/random_bytes_mcrypt\.php$</exclude-pattern>
    104     </rule>
    105     <rule ref="PHPCompatibility.Extensions.RemovedExtensions.mcryptDeprecatedRemoved">
    106         <exclude-pattern>/random_compat/random_bytes_mcrypt\.php$</exclude-pattern>
    107     </rule>
    108     <rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_create_ivDeprecatedRemoved">
    109         <exclude-pattern>/random_compat/random_bytes_mcrypt\.php$</exclude-pattern>
    110     </rule>
    111 
    11286</ruleset>
Note: See TracChangeset for help on using the changeset viewer.