Make WordPress Core

Opened 14 months ago

Closed 9 months ago

#57782 closed task (blessed) (fixed)

PHPStan: Fix function argument type issues for WP 6.3

Reported by: hellofromtonya's profile hellofromTonya Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.3 Priority: normal
Severity: normal Version:
Component: General Keywords: php8 needs-patch
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 (5)

This ticket was mentioned in Slack in #core by chaion07. View the logs.


10 months ago

#2 @chaion07
10 months ago

Thanks @hellofromTonya for reporting this. We reviewed this ticket during a recent bug-scrub session and based on the feedback received from the team we feel the need to keep in the milestone until later the in the cycle. It would be good to get a new PHPStan report as a starting point. Cheers!

Props: @costdev

This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.


9 months ago

#4 @chaion07
9 months ago

  • Milestone changed from 6.3 to 6.4

We reviewed this ticket once again during a recent bug-scrub session and based on the feedback we are updating the milestone to 6.4. Cheers!

Props to @mukesh27

#5 @hellofromTonya
9 months ago

  • Milestone changed from 6.4 to 6.3
  • Resolution set to fixed
  • Status changed from assigned to closed

This ticket was specifically for the 6.3 cycle. Moving it back into 6.3 and closing.

#58852 will continue this work in the 6.4 cycle.

Note: See TracTickets for help on using tickets.