[wp-trac] [WordPress Trac] #38462: Unit test to detect identical hooks with differing parameters

WordPress Trac noreply at wordpress.org
Sun Oct 23 16:11:01 UTC 2016


#38462: Unit test to detect identical hooks with differing parameters
-----------------------------+------------------------------
 Reporter:  johnbillion      |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Plugins          |    Version:
 Severity:  normal           |   Keywords:  needs-unit-tests
  Focuses:                   |
-----------------------------+------------------------------
 Two recent instances where a hook that is triggered in multiple places in
 core has ended up having differing parameters:

 * #38057
 * #38314

 It would be ideal to have unit test coverage which scans core's PHP files
 for all instances of `do_action` and `apply_filters`, filters hooks that
 occur multiple times, and then verifies that every instance of the hook
 accepts the same number of parameters.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38462>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list