WP-CLI Release v2.4.0

Just in time for the release of WordPress Core 5.3.0 we have a new release of WP-CLI as well. A team of 37 contributors has collaborated to get 159 pull requests merged.

Let’s go over some of the noteworthy changes in this release. Most of the work went into compatibility fixes, so there’s not many new toys to play around with, unfortunately. As always, you can also skip directly to the detailed changelog if you prefer.

WordPress 5.3 support

It should be obvious that WP-CLI supports the latest upcoming WordPress Core release, of course. However, there were quite a few changes that went into 5.3 that made it not only difficult to keep WP-CLI working across 5.3 and earlier versions at the same time, but also made it necessary to release WP-CLI in parallel to have a working option available.

The push to support more of the newer PHP features that became available due to the bump to the minimum PHP version of Core introduced changes to function signatures and class interfaces, which required a few adventurous fixes in some cases…

PHP 7.4 support

PHP 7.4 is not yet available in a stable release, but we’re slowly coming closer to the planned release date.

There have been quite a few fixes that went into WP-CLI to make sure it works correctly with PHP 7.4 once it’s available. It’s an ongoing process, still, as we’re working towards the first stable version. Tests are running for PHP 7.4 in the background as well for each package. These are still allowed to fail right now, but after this release, they will be switch to break on error.

Download a specific URL as Core

The core download command now accepts a URL to download a specific ZIP archive with a version of Core to use. This also allows you to use your own custom version easily. Just add the URL and you’re good to go: wp core download https://somesite/build.zip

Large image support

WP-CLI will properly deal with large images in the way that WP Core 5.3 was improved. It knows about the original source images as well so you can safely rebuild your thumbnails without losing quality.

Detailed Change Log

wp-cli/wp-cli-bundle

  • Allow patches from dependencies to be applied [#150]

wp-cli/handbook

  • Fix STDERR redirection example code [#342]
  • Add SiteDistrict to hosting-companies.md file [#341]
  • Update reference URLs. [#337]
  • Add WooCart to hosting-companies.md file [#336]
  • Add MinHost to hosting-companies.md file [#334]

wp-cli/wp-cli.github.com

  • Update romanian translation [#392]
  • Update link to wp-completion.bash [#391]
  • [pt_BR] Update to v2.3.0 + refresh sponsors [#390]
  • Update Turkish translation [#389]
  • Small adjustments for French translation [#388]
  • Update ja/index.md [#387]

wp-cli/core-command

  • Use version known to work for core download test [#136]
  • Support URL for core download [#135]
  • install changed to installation [#132]
  • On multisite-convert, don’t assume site_id is 1 [#122]

wp-cli/db-command

  • Fix tests for changes in WP Core 5.3 [#149]
  • Make db clean get all the tables with prefix [#152]
  • Fix output message for STDIN input [#151]

wp-cli/entity-command

  • Fix minor PHPCS violation [#273]
  • Improve comment spam output [#272]
  • Reset user password send error when no user is found [#271]

wp-cli/extension-command

  • Add second must-use plugin that is added with wp-cli-tests 2.1.6+ [#200]
  • Equalize theme folder naming conventions across Win/Mac/Linux [#196]

wp-cli/i18n-command

  • Adapt code to gettext v4.8 [#194]
  • Add --debug output for the file being processed. [#183]
  • Use correct argument name in warning message [#180]

wp-cli/media-command

  • Adapt to changes in WP 5.3 image handling to fix broken tests [#115]
  • Fix suffix of scaled large images [#118]

wp-cli/scaffold-command

  • Required PHP version header [#238]
  • Fix deprecated whitelist code flag [#236]
  • Switch test prep feature from global PHPUnit to local PHPUnit [#235]
  • Add a minimum php requirement [#234]
  • Scripts added to plugin package.json [#225]

wp-cli/widget-command

  • Adapt tests to make the widget expectations more flexible [#34]

Contributors

@aommundsen, @azito122, @beaucollins, @burhandodhy, @connerbw, @derweili, @drzraf, @dz0ny, @felipeelia, @gitlost, @greatislander, @herregroen, @jrfnl, @l3ku, @localheinz, @marksabbath, @marty-crane, @maximejobin, @mcdwayne, @michaelzangl, @mustafauysal, @nxnjz, @nylen, @ocean90, @pdaalder, @raphael-concil, @sagarnasit, @schlessera, @siliconforks, @swissspidy, @tecking, @thrijith, @vladutilie, @wojsmol, @yousan, @zzap

#release, #v2-4-0