Make WordPress Core


Ignore:
Timestamp:
10/06/2026 05:00:29 PM (8 days ago)
Author:
swissspidy
Message:

Docs: Narrow unused deprecated parameters in PHPStan types.

This adds @phpstan-param tags that narrow unused, deprecated parameters to the literal value of their default, so that static analysis flags callers which still pass something else. The types come from php-stubs/wordpress-stubs. wp_get_typography_font_size_value() narrows $settings to array, since passing a boolean was deprecated in 6.6.0.

validate_email() also stops passing its $check_domain argument to is_email(), where it is deprecated and triggered a second deprecation notice.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/13889

Follow-up to r64045.

Props marian1, swissspidy, westonruter.
See #65817.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r64045 r64163  
    4444         *     @type string $password_message The explanatory message regarding the password.
    4545         * }
     46         *
     47         * @phpstan-param '' $deprecated
    4648         */
    4749        function wp_install(
Note: See TracChangeset for help on using the changeset viewer.