[wp-trac] [WordPress Trac] #52539: callable typehint thows static analysis errors

WordPress Trac noreply at wordpress.org
Wed May 28 15:55:08 UTC 2025


#52539: callable typehint thows static analysis errors
--------------------------+------------------------------
 Reporter:  dingo_d       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  docs
--------------------------+------------------------------

Comment (by priethor):

 Relevant to this, it's worth noting that WordPress Stubs for PHPStan now
 allow functions like `add_menu_page` and others to receive an empty string
 as a callback, as per [https://github.com/php-stubs/wordpress-
 stubs/commit/95be71f2141fea57e05a4017cf5ffaef5788191c#diff-
 d4861ed4fac1ec7ef9c2ae151070735460cc8f0a75976569973dd073375114cfR42 this
 commit].

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


More information about the wp-trac mailing list