[wp-trac] [WordPress Trac] #64898: PHPStan code quality improvements for 7.1
WordPress Trac
noreply at wordpress.org
Fri May 22 06:59:30 UTC 2026
#64898: PHPStan code quality improvements for 7.1
--------------------------------------+-------------------------------
Reporter: desrosj | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 7.1
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: coding-standards
--------------------------------------+-------------------------------
Comment (by westonruter):
In [changeset:"62408" 62408]:
{{{
#!CommitTicketReference repository="" revision="62408"
Plugins: Improve hook performance by using `spl_object_id()` instead of
`spl_object_hash()` to construct unique IDs.
* Also use `spl_object_id()` similarly when registering and unregistering
classic widgets.
* Improve typing and phpdoc in `_wp_filter_build_unique_id()`. Return
`null` for malformed callbacks.
* Add tests for `_wp_filter_build_unique_id()`.
* Improve type safety of `WP_Hook::add_filter()` in case an invalid
callback is provided for parity with `::has_filter()` and
`::remove_filter()`.
Developed in https://github.com/WordPress/wordpress-develop/pull/11865
Follow-up to r46220, r46801, r60179.
Props bor0, westonruter, SergeyBiryukov, schlessera, arshidkv12, knutsp,
spacedmonkey, swissspidy.
See #64898.
Fixes #58291.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64898#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list