[wp-trac] [WordPress Trac] #61399: HTML API: Add type annotations

WordPress Trac noreply at wordpress.org
Fri Jul 19 23:42:29 UTC 2024


#61399: HTML API: Add type annotations
--------------------------------------+-----------------------------
 Reporter:  jonsurrell                |       Owner:  jonsurrell
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  Future Release
Component:  HTML API                  |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------

Comment (by dmsnell):

 In [changeset:"58769" 58769]:
 {{{
 #!CommitTicketReference repository="" revision="58769"
 HTML API: Add PHP type annotations.

 This patch adds type annotations to internal and private methods of the
 HTML
 API and the supporting WP_Token_Map. Annotations have not been added to
 the
 public interfaces where it would likely crash a site if called wrong.

 These annotations should help avoid unnecessary type-related bugs (as have
 been uncovered in earlier work adding such annotations) and provide
 additional
 guidance to developers when interacting with these classes in an IDE.

 Developed in https://github.com/WordPress/wordpress-develop/pull/6753
 Discussed in https://core.trac.wordpress.org/ticket/61399

 Props dmsnell, jonsurrell.
 See #61399.
 }}}

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


More information about the wp-trac mailing list