[wp-trac] [WordPress Trac] #54724: PHPunit tests should not load remote patterns

WordPress Trac noreply at wordpress.org
Mon Jan 3 17:55:09 UTC 2022


#54724: PHPunit tests should not load remote patterns
------------------------------+-----------------------------
 Reporter:  Chouby            |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:  trunk
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 While running PHPunit tests for one of my plugins with PHP 8.1, I noticed
 deprecation notices in the Requests library when I am using
 `set_current_screen()`. These notices reveal that http requests are hooked
 to the `current_screen` action to load remote patterns.
 {{{
 add_action( 'current_screen', '_load_remote_block_patterns' );
 add_action( 'current_screen', '_load_remote_featured_patterns' );
 }}}
 The first was added in 5.8 by #53246, the second was just added by #54623
 for 5.9.
 I propose to unhook these actions for PHPUnit tests.

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


More information about the wp-trac mailing list