[wp-trac] [WordPress Trac] #51423: Fix function argument type issues reported by PHPStan

WordPress Trac noreply at wordpress.org
Mon Nov 16 13:59:34 UTC 2020


#51423: Fix function argument type issues reported by PHPStan
-------------------------------------------+-------------------------------
 Reporter:  SergeyBiryukov                 |       Owner:  SergeyBiryukov
     Type:  task (blessed)                 |      Status:  accepted
 Priority:  normal                         |   Milestone:  5.6
Component:  General                        |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  php8 has-patch has-unit-tests  |     Focuses:  coding-standards
-------------------------------------------+-------------------------------
Description changed by hellofromTonya:

Old description:

> Background: #50913
>
> Splitting this out from comment:44:ticket:50913. @xknown is going through
> some [https://github.com/WordPress/wordpress-develop/pull/553 issues
> reported by PHPStan], mostly in places where we are passing the incorrect
> type to WP core or PHP's built-in functions.
>
> Let's use this ticket to include these fixes in core.

New description:

 Background: #50913

 Splitting this out from comment:44:ticket:50913. @xknown is going through
 some [https://github.com/WordPress/wordpress-develop/pull/553 issues
 reported by PHPStan], mostly in places where we are passing the incorrect
 type to WP core or PHP's built-in functions.

 Let's use this ticket to include these fixes in core.

 Goals are to:
 - retain the current behavior (i.e. to avoid breaking changes)
 - retain the triggering of notice/warning/error, which are clues and
 indicators (i.e. rather than silently letting the problem propagate
 downstream)
 - gain PHP 8 compatibility
 - ensure code coverage to validate changes

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51423#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list