Make WordPress Core

Opened 9 months ago

Closed 6 months ago

#58852 closed task (blessed) (fixed)

PHPStan: Fix function argument type issues for WP 6.4

Reported by: hellofromtonya's profile hellofromTonya Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.4 Priority: normal
Severity: normal Version:
Component: General Keywords: php8
Focuses: coding-standards Cc:

Description

Previously:

Continuation of the the work to fix function argument type issues as reported by PHPStan. These issues are argument types passed to a WP Core and PHP's built-in functions.

The last report was created 3 years ago https://gist.github.com/xknown/77f8cbe233da75080d1e9258a8c94f95. A new report should be generated as a starting point what issues remain to be fixed in 6.3.

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.

This ticket is part of the effort to achieve PHP 8+ compatibility.

Change History (2)

#1 @hellofromTonya
9 months ago

  • Keywords needs-patch removed

This ticket is not tracking PHP 8+ incompatibilities, thus the php-compatibility focus is not added. Rather, this ticket is an effort of analyzing PHPScan "function argument type issues" and when needed, add defensive code improvements.

#2 @hellofromTonya
6 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

6.4 RC1 is in a couple of hours. #59653 is now open for 6.5.

Note: See TracTickets for help on using tickets.