[wp-trac] [WordPress Trac] #52217: Fix code issues identified by PHPStan
WordPress Trac
noreply at wordpress.org
Tue Oct 29 09:49:51 UTC 2024
#52217: Fix code issues identified by PHPStan
-------------------------+-------------------------------
Reporter: johnbillion | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: coding-standards
-------------------------+-------------------------------
Comment (by justlevine):
Using the refreshed report from https://github.com/WordPress/wordpress-
develop/pull/7619 (from #61175), I've begun remediating errors surfaced by
PHPStan in individual PRs, so they can be reviewed independently of the
tooling, and hopefully reduce the chance of them going stale.
Will be rebasing that PR against trunk periodically, so the baselines
there will reflect WordPress's overall progress towards passing the
individual PHPStan Levels.
So far,
- https://github.com/WordPress/wordpress-develop/pull/7672
- https://github.com/WordPress/wordpress-develop/pull/7673
- https://github.com/WordPress/wordpress-develop/pull/7674
- https://github.com/WordPress/wordpress-develop/pull/7675
handle all the "easy-remediable" Level 0 violations. The remaining ones ()
IMO only make sense in the context of PHPStan (mostly undiscovered symbols
- https://github.com/justlevine/wordpress-
develop/blob/e14ac75beac7dd157ac2b9750b5b98d70926a5d4/tests/phpstan/baseline/level-0.php
), but if you see something on that list that you think makes sense to
remediate independently of PHPStan getting merged, please lmk or open a PR
against `trunk`.
Moving on to Level 1 ( ref: https://github.com/WordPress/wordpress-
develop/blob/2dd671c8cc23a9ab8b002024246594433c78868a/tests/phpstan/baseline/level-1.php
)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52217#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list