Context
PR #74 cleared all phpcs lint debt (467 → 0 errors). However, the release preflight (homeboy lint) also runs phpstan, which still reports 74 pre-existing errors. Until these are cleared, homeboy release continues to require --skip-checks for the phpstan phase.
These were intentionally left out of #74 because they require type-aware logic changes (not formatting) and that PR was scoped to lint-only/no-behavior-change.
Breakdown by rule
- 18×
phpstan.property.nonObject — property access on a possibly-non-object (missing null/WP_Error guards)
- 13×
phpstan.function.notFound — calls to functions phpstan can't resolve (likely cross-plugin helpers needing stubs or function_exists guards / proper bootstrap)
- 10×
phpstan.argument.templateType
- 7×
phpstan.return.type
- 7×
phpstan.return.unusedType
- 7×
phpstan.function.impossibleType — conditions that always evaluate one way (e.g. is_wp_error() on a type that can't be WP_Error)
- 3×
phpstan.argument.type — e.g. WP_User|false passed where WP_User expected
- 2×
phpstan.method.nonObject
- 1× each:
foreach.nonIterable, booleanNot.alwaysFalse, cast.int, notIdentical.alwaysTrue, function.alreadyNarrowedType, property.notFound, ternary.alwaysTrue
Hotspot files
- 13×
inc/routes/shop/products.php
- 5×
inc/routes/auth/register.php
- 5×
inc/routes/media/upload.php
- 5×
inc/routes/newsletter/management.php
- 4×
inc/routes/auth/login.php
- 3× each:
inc/routes/auth/google.php, inc/routes/auth/me.php, inc/routes/contact/submit.php, inc/routes/shop/product-images.php
- (remaining spread 1–2 per file across auth/shop/analytics/admin/users/blog/docs routes)
Notes / approach
- These are genuine type-safety findings — fixes will touch logic (null guards, WP_Error handling, type narrowing, proper function stubs for cross-plugin helpers).
phpstan.function.notFound (13×) may be largely resolvable by configuring phpstan stubs / bootstrap for the cross-plugin function surface rather than per-call guards — worth investigating first since it's the second-largest bucket.
- Reproduce:
homeboy lint extrachill-api (phpstan findings are the "source":"phpstan" entries).
Done when
Context
PR #74 cleared all phpcs lint debt (467 → 0 errors). However, the release preflight (
homeboy lint) also runs phpstan, which still reports 74 pre-existing errors. Until these are cleared,homeboy releasecontinues to require--skip-checksfor the phpstan phase.These were intentionally left out of #74 because they require type-aware logic changes (not formatting) and that PR was scoped to lint-only/no-behavior-change.
Breakdown by rule
phpstan.property.nonObject— property access on a possibly-non-object (missing null/WP_Error guards)phpstan.function.notFound— calls to functions phpstan can't resolve (likely cross-plugin helpers needing stubs orfunction_existsguards / proper bootstrap)phpstan.argument.templateTypephpstan.return.typephpstan.return.unusedTypephpstan.function.impossibleType— conditions that always evaluate one way (e.g.is_wp_error()on a type that can't be WP_Error)phpstan.argument.type— e.g.WP_User|falsepassed whereWP_Userexpectedphpstan.method.nonObjectforeach.nonIterable,booleanNot.alwaysFalse,cast.int,notIdentical.alwaysTrue,function.alreadyNarrowedType,property.notFound,ternary.alwaysTrueHotspot files
inc/routes/shop/products.phpinc/routes/auth/register.phpinc/routes/media/upload.phpinc/routes/newsletter/management.phpinc/routes/auth/login.phpinc/routes/auth/google.php,inc/routes/auth/me.php,inc/routes/contact/submit.php,inc/routes/shop/product-images.phpNotes / approach
phpstan.function.notFound(13×) may be largely resolvable by configuring phpstan stubs / bootstrap for the cross-plugin function surface rather than per-call guards — worth investigating first since it's the second-largest bucket.homeboy lint extrachill-api(phpstan findings are the"source":"phpstan"entries).Done when
homeboy lint extrachill-apireports 0 phpstan errorshomeboy release extrachill-apino longer needs--skip-checks