[wp-trac] [WordPress Trac] #54504: Update Requests library to version 2.0.0

WordPress Trac noreply at wordpress.org
Fri Dec 9 03:38:28 UTC 2022


#54504: Update Requests library to version 2.0.0
-------------------------------------------------+-------------------------
 Reporter:  jrf                                  |       Owner:
                                                 |  hellofromTonya
     Type:  task (blessed)                       |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  External Libraries                   |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  php80 php81 has-patch has-unit-      |     Focuses:
  tests early early-like-actually-early          |
-------------------------------------------------+-------------------------

Comment (by ironprogrammer):

 == Test Report
 Tested on PHP 7.4 per custom install package instructions
 [https://gist.github.com/hellofromtonya/bb0aa2d4b2311c8b40fa5ae8ada4dc19
 provided here]. Also added optional Requests 1.x preload logging
 [https://gist.github.com/ironprogrammer/35a762d0100a7a01f4eadc37ee6b16cd
 found here].

 Patch tested: https://github.com/WordPress/wordpress-develop/pull/3732
 (via custom install package).

 === Environment
 - Hardware: MacBook Pro Apple M1 Pro
 - OS: macOS 12.6.1 (case insensitive)
 - Browser: Safari 16.1
 - Server: nginx/1.23.2
 - PHP: 7.4.33
 - WordPress: 6.1.1 -> 6.2-alpha-54642-src (custom install package)
 - Theme: twentytwentythree v1.0
 - Active Plugins:
  - fake-wordpress-update v1.0.0 (provided in test instructions)

 === Actual Results
 - ✅ Upgrade via ''Dashboard > Updates'' succeeded without error.
   - File/directory counts matched those expected.
   - Optional interface/class check logging shows Requests 1.x was
 preloaded into memory as expected.
   - General site activity did not generate errors. Tested: search and
 install plugins, update plugins, search and install themes, activate
 Gutenberg, add/view post, add media, add pattern from directory, add user.
 - ❌ Upgrade via WP-CLI `wp core update` resulted in a fatal error.
   - On terminal:
 {{{
 Updating to version 6.1.1-with-requests2 (en_US)...
 Downloading update from http://wp-54504-cli.test/wordpress-with-
 requests-2.zip...
 Unpacking the update...
 }}}
   - In `debug.log`:
 {{{
 PHP Fatal error:  Cannot declare class Requests_Cookie_Jar, because the
 name is already in use in
 ../wp-includes/Requests/Cookie/Jar.php on line 15
 }}}
   - Site did not upgrade, and remained on 6.1.1.
   - `wp core check-update` returns 6.1.1, and not the version provided by
 the test plugin.
 - ✅ Upgrade via automatic core update succeeded without error. Test
 plugin modified
 [https://gist.github.com/hellofromtonya/bb0aa2d4b2311c8b40fa5ae8ada4dc19?permalink_comment_id=4396880#gistcomment-4396880
 per these instructions].
   - File/directory counts matched those expected.
   - Optional interface/class check logging shows Requests 1.x was
 preloaded into memory as expected.
   - General site activity did not generate errors. Tested: search and
 install plugins, update plugins, search and install themes, activate
 Gutenberg, add/view post, add media, add pattern from directory, add user.

 === Additional Notes
 - At one point after the ''Dashboard > Updates'' upgrade, I revisited the
 Updates page (`/wp-admin/update-core.php`) and it logged a
 [https://github.com/WordPress/wordpress-
 develop/blob/e50c65caf4999b11eb396ceaf6649b9818fab47f/src/wp-
 includes/update.php#L441:L448 PHP warning], but did not surface again
 during subsequent testing. The warning was:

     PHP Warning:  An unexpected error occurred. Something may be wrong
 with WordPress.org or this server’s configuration. If you continue
 to have problems, please try the <a
 href="https://wordpress.org/support/forums/">support forums</a>.
 (WordPress could not establish a secure connection to WordPress.org.
 Please contact your server administrator.) in ../wp-includes/update.php on
 line 447

 === Supplemental Artifacts
 See the
 [https://gist.github.com/hellofromtonya/bb0aa2d4b2311c8b40fa5ae8ada4dc19
 test instructions] for additional resources to validate this PR.

 [[Image(https://cldup.com/gTv4GOpe37.png, 60%)]]
 ''Test plugin active, reflecting available update for custom install
 package.''

 [[Image(https://cldup.com/ajKSdnviWJ.png, 60%)]]
 ''Update button on ''Dashboard > Updates''.''

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


More information about the wp-trac mailing list