Make WordPress Core

Changeset 63787


Ignore:
Timestamp:
09/21/2026 09:49:58 PM (13 hours ago)
Author:
westonruter
Message:

Build/Test Tools: Update PHPStan to 2.2.14.

The release improves how conditional expressions are propagated through derived assignments and through overlapping ternary arms, so four variable.undefined errors drop out of the baseline: the three occurrences of $metakey in add_meta(), where the enclosing condition already guarantees that one of the two assignments has run, and $token_length in WP_HTML_Decoder::attribute_starts_with(), which is written by reference by read_character_reference() in the ternary arm selected by the subsequent null check.

The baselines are regenerated for the new version, with tests/phpstan/baselines/variable.undefined.neon the only one that changed. The release also carries a batch of performance improvements, continuing the trend noted in r63510.

Developed in https://github.com/WordPress/wordpress-develop/pull/13645.
Follow-up to r63019, r63510.

See #65817.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/composer.json

    r63597 r63787  
    5353                "wp-coding-standards/wpcs": "~3.4.1",
    5454                "phpcompatibility/phpcompatibility-wp": "~2.1.3",
    55                 "phpstan/phpstan": "2.2.13",
     55                "phpstan/phpstan": "2.2.14",
    5656                "phpstan/phpstan-phpunit": "2.0.18",
    5757                "yoast/phpunit-polyfills": "^1.1.0"
  • trunk/tests/phpstan/baselines/variable.undefined.neon

    r63426 r63787  
    275275                        path: ../../../src/wp-admin/includes/plugin.php
    276276                -
    277                         message: '#^Variable \$metakey might not be defined\.$#'
    278                         identifier: variable.undefined
    279                         count: 3
    280                         path: ../../../src/wp-admin/includes/post.php
    281                 -
    282277                        message: '#^Variable \$revision might not be defined\.$#'
    283278                        identifier: variable.undefined
     
    880875                        path: ../../../src/wp-includes/global-styles-and-settings.php
    881876                -
    882                         message: '#^Variable \$token_length might not be defined\.$#'
    883                         identifier: variable.undefined
    884                         count: 1
    885                         path: ../../../src/wp-includes/html-api/class-wp-html-decoder.php
    886                 -
    887877                        message: '#^Variable \$node might not be defined\.$#'
    888878                        identifier: variable.undefined
Note: See TracChangeset for help on using the changeset viewer.