[wp-trac] [WordPress Trac] #61175: Integrate PHPStan into the core development workflow

WordPress Trac noreply at wordpress.org
Sat Oct 25 07:54:06 UTC 2025


#61175: Integrate PHPStan into the core development workflow
-------------------------------------------------+-------------------------
 Reporter:  westonruter                          |       Owner:  justlevine
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests changes-    |     Focuses:
  requested                                      |
-------------------------------------------------+-------------------------

Comment (by justlevine):

 > I've been able to hunt down the problem to wp_insert_user function.
 > This function is what is causing the timeout.

 More specifically it's the `$userdata['user_pass'] = ''` assignment that
 was added in https://core.trac.wordpress.org/ticket/22114 . I've added the
 file to the `excludePaths.analyse` for now.


 > Also, I was wondering, shouldn't we add tests/phpunit to excludePaths >
 analyse in base.neon ?

 No need, since we only need to `excludePaths` that are included by
 `paths`, so only items inside `src` need to be excluded.

 ---


 Syncing with trunk and some other tweaks gives us a current count of:


 ||= PHPStan Level =||= Error Count =||= Changed since
 [https://core.trac.wordpress.org/ticket/61175#comment:35 last] =||=
 [https://github.com/justlevine/wordpress-
 develop/tree/chore/phpstan/level-0/tests/phpstan/baseline Remediation
 branch] =||= vs trunk =||
 || 0 || 26 || +13 || 28 || +2 ||
 || 1 || 21 || -1 || 14 || -7 ||
 || 2 || 315 || -5 || 276 || -39 ||
 || 3 || 159 || -5 || 109 || -50 ||
 || 4 || 236 || -7 || 193 || -43 ||
 || 5 || 519 || -9 || 425 || -94 ||
 || 6 || 113 || +7 || 118 || +5 ||

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61175#comment:52>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list