Make WordPress Core

Opened 9 months ago

Last modified 6 weeks ago

#59653 new task (blessed)

PHPStan: Fix function argument type issues for WP 6.6

Reported by: hellofromtonya's profile hellofromTonya Owned by:
Milestone: 6.7 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: 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 (8)

#1 @swissspidy
9 months ago

We should really just properly integrate PHPStan into our tooling rather than doing one-off reports every three years.

Aside: why not just rename the existing ticket rather than just closing them without activity & creating a new one.

#2 @swissspidy
9 months ago

We should really just properly integrate PHPStan into our tooling rather than doing one-off reports every three years.

Looks like there is #52217 for that. Solving that will just make our lives easier going forward as it avoids the need for recurring tickets like this.

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


5 months ago

#4 @chaion07
5 months ago

Thanks @hellofromTonya for reporting this. We reviewed this ticket during a recent bug-scrub session and we recommend it would be good to get some movement on the comments about process for PHPStan and this recurring ticket for each cycle, as well as a new PHPStan report (the last one was 3 years ago).

Cheers!

Props to @costdev & @mukesh27

#5 @swissspidy
5 months ago

  • Milestone changed from 6.5 to 6.6
  • Summary changed from PHPStan: Fix function argument type issues for WP 6.5 to PHPStan: Fix function argument type issues for WP 6.6

This ticket was mentioned in Slack in #core-performance by spacedmonkey. View the logs.


3 months ago

#7 @westonruter
3 months ago

I've opened #61175 for integrating PHPStan into the core development workflow.

#8 @hellofromTonya
6 weeks ago

  • Milestone changed from 6.6 to 6.7

With #61175 in 6.7 and the last scheduled 6.6 beta released, moving this to 6.7. Likely can be re-evaluated once #61175 is committed.

Note: See TracTickets for help on using tickets.