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

WordPress Trac noreply at wordpress.org
Tue Jan 4 15:51:30 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:  5.8
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
Changes (by hellofromTonya):

 * version:  trunk => 5.8
 * milestone:  5.9 => Awaiting Review


 Currently there are no PHP unit or integration tests within Core that
 would be impacted by unhooking these callbacks. However, when tests are
 added, then the original issue returns.

 That said, PHP 8.1 deprecation notices are not failures. Rather, they are
 alerting of incompatibilities that need to be fixed.

 Some historical context:
 The Requests library has a PHP 8.1 compatible version ready, i.e. version
 2.0.0. Upgrading the library to that version is being tracked in #54504.
 It was planned for 5.9 but then reverted due to issues with Core's
 upgrader. It is planned for 6.0.

 The root cause of the problem in this ticket is not the callbacks hooked
 into `current_screen` but rather the need to upgrade Request library.

 Sounds like you have a solution in your plugin's test suite. That's good!
 Once the Requests library is upgrade in Core, those specific deprecation
 notices from Requests will be resolved.

 Moving this ticket back to Awaiting Review. Let's revisit once Requests is
 upgraded to determine if unhooking these 2 specific callbacks in Core's
 test bootstrap makes sense or not. Also changing the version to 5.8 to
 denote when the first callback was added to Core.

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

More information about the wp-trac mailing list