[wp-trac] [WordPress Trac] #38011: WP_Hook class late assignment behavior change

WordPress Trac noreply at wordpress.org
Fri Dec 2 13:37:31 UTC 2016

#38011: WP_Hook class late assignment behavior change
 Reporter:  salcode       |       Owner:  pento
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Plugins       |     Version:  trunk
 Severity:  normal        |  Resolution:  wontfix
 Keywords:                |     Focuses:

Comment (by jdgrimes):

 For the record, I just stumbled upon this change in behavior when the
 PHPUnit tests for a plugin started failing against WordPress 4.7, but
 worked fine on older versions. The issue was just related to my tests
 bootstrap, not the plugin's source itself, so it didn't actually break the
 plugin in normal operation. Actually, I guess it's a good thing that this
 happened, because it brought to my attention that during the tests things
 weren't running in the order that they were expected to be run. The only
 downside is that it took a while to figure out what was going on. It would
 have been nice if there was a warning saying that a hook was being hooked
 up too late. But I guess sometimes that could be intentional, so maybe
 adding such a warning isn't feasible (unless it can be selectively

Ticket URL: <https://core.trac.wordpress.org/ticket/38011#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list