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

WordPress Trac noreply at wordpress.org
Mon Dec 12 15:02:49 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 jrf):

 As the above reports both mentioned issues with WP-CLI, @schlessera and me
 have done some testing. Unfortunately, we've not been able to reproduce
 the issue, so the suspicion is that the problem is specific to Mac OS.

 One thing I'd like to ask @antonvlasenko and @ironprogrammer : what
 version of WP-CLI did you use ?


 For the record, this is how I tested:

 Environment
 * OS: Windows 10 Pro 22H2
 * Web Server: Apache
 * PHP: 7.4.33
 * WordPress: 6.1.1
 * WP-CLI: 2.7.1
 * Active Plugins:
     * fake-wordpress-update (see
 https://gist.github.com/hellofromtonya/bb0aa2d4b2311c8b40fa5ae8ada4dc19)

 The zip was created by Alain based on the instructions with the gist + one
 additional change:
 * The `$wp_version` variable in `wp-includes/version.php` was set to
 `6.1.1-with-request-v2` to make it straight forward to verify the correct
 WP version was installed.

 As for the fake plugin, that was used as provided in the gist + one
 additional change:
 * Changed the `$fake_update_location` variable to point to a locally
 accessible URL on my system where the ZIP was placed.

 I then ran the following commands from the command line:

 {{{
 wp core download
 wp config create --dbname=trac54504 --dbuser=root --dbhost=localhost[
 --dbpass=XXXX]
 wp db create
 wp core install --url=https://trac54504.dev --title=Trac54504
 --admin_user=admin --admin_email=youremail at address.com
 --admin_password=password
 ** add the plugin in the `wp-content/plugins/` directoy **
 wp plugin list
 wp plugin activate fake-wordpress-update
 wp core update --debug
 wp core version
 }}}

 ... and it then correctly displayed `6.1.1-with-request-v2` and a check of
 the file system also confirmed the update went through without a hitch.

 I then downgraded again using `wp core update --version=6.1.1 --force` and
 that also worked without any issues, though the "new" Requests files in
 the `wp-includes/Requests/src` directory was not removed.

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


More information about the wp-trac mailing list