[wp-trac] [WordPress Trac] #61175: Integrate PHPStan into the core development workflow
WordPress Trac
noreply at wordpress.org
Wed Feb 25 06:54:42 UTC 2026
#61175: Integrate PHPStan into the core development workflow
-------------------------------------------------+-------------------------
Reporter: westonruter | Owner:
| westonruter
Type: task (blessed) | Status: closed
Priority: normal | Milestone: 7.0
Component: Build/Test Tools | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests dev- | Focuses:
feedback |
-------------------------------------------------+-------------------------
Comment (by westonruter):
In [https://github.com/WordPress/wordpress-develop/pull/11037 PR 11037]
I've bumped the PHPStan rule level from 0 to 4.
The following 641 errors are in the baseline:
|| **Count** || **PHPStan Identifier** ||
|| 56 || `while.alwaysTrue` ||
|| 55 || `deadCode.unreachable` ||
|| 53 || `property.notFound` ||
|| 52 || `property.nonObject` ||
|| 36 || `isset.property` ||
|| 34 || `return.type` ||
|| 29 || `staticClassAccess.privateMethod` ||
|| 23 || `assign.propertyType` ||
|| 19 || `property.defaultValue` ||
|| 16 || `class.notFound` ||
|| 14 || `method.unused` ||
|| 13 || `method.nonObject` ||
|| 13 || `function.alreadyNarrowedType` ||
|| 12 || `booleanAnd.rightAlwaysTrue` ||
|| 10 || `return.unusedType` ||
|| 10 || `notIdentical.alwaysTrue` ||
|| 9 || `empty.variable` ||
|| 9 || `empty.property` ||
|| 9 || `arguments.count` ||
|| 8 || `varTag.noVariable` ||
|| 8 || `greaterOrEqual.alwaysTrue` ||
|| 8 || `constant.notFound` ||
|| 8 || `booleanNot.alwaysTrue` ||
|| 7 || `property.private` ||
|| 7 || `parameterByRef.type` ||
|| 7 || `method.childParameterType` ||
|| 6 || `phpDoc.parseError` ||
|| 6 || `if.alwaysFalse` ||
|| 5 || `property.phpDocType` ||
|| 5 || `parameter.defaultValue` ||
|| 5 || `nullCoalesce.property` ||
|| 5 || `method.notFound` ||
|| 5 || `isset.variable` ||
|| 5 || `isset.offset` ||
|| 5 || `if.alwaysTrue` ||
|| 4 || `variable.undefined` ||
|| 4 || `parameter.notFound` ||
|| 4 || `identical.alwaysFalse` ||
|| 4 || `booleanAnd.leftAlwaysTrue` ||
|| 3 || `return.missing` ||
|| 3 || `property.protected` ||
|| 3 || `offsetAccess.notFound` ||
|| 3 || `booleanNot.alwaysFalse` ||
|| 3 || `booleanAnd.alwaysFalse` ||
|| 3 || `binaryOp.invalid` ||
|| 2 || `ternary.alwaysFalse` ||
|| 2 || `return.empty` ||
|| 2 || `property.unusedType` ||
|| 2 || `parameterByRef.unusedType` ||
|| 2 || `offsetAccess.nonOffsetAccessible` ||
|| 2 || `nullCoalesce.offset` ||
|| 2 || `identical.alwaysTrue` ||
|| 2 || `function.impossibleType` ||
|| 2 || `empty.offset` ||
|| 2 || `booleanOr.alwaysTrue` ||
|| 1 || `while.alwaysFalse` ||
|| 1 || `ternary.alwaysTrue` ||
|| 1 || `smallerOrEqual.alwaysTrue` ||
|| 1 || `property.onlyWritten` ||
|| 1 || `parameter.unresolvableType` ||
|| 1 || `parameter.phpDocType` ||
|| 1 || `offsetAssign.valueType` ||
|| 1 || `instanceof.alwaysTrue` ||
|| 1 || `foreach.nonIterable` ||
|| 1 || `encapsedStringPart.nonString` ||
|| 1 || `constructor.unusedParameter` ||
|| 1 || `booleanOr.rightAlwaysTrue` ||
|| 1 || `booleanOr.alwaysFalse` ||
|| 1 || `booleanAnd.rightAlwaysFalse` ||
|| 1 || `booleanAnd.alwaysTrue` ||
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61175#comment:95>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list