WP-CLI v2.0.0 release postponed

The upcoming WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ release v2.0.0 that was originally due to be released on July 31st is being re-scheduled for Wednesday, August 8th.

This delay is due to the fact that it was much more work to disentangle the feature tests to split them up for the restructuring. I want to avoid hurrying the release, so I prefer to add some more time to let the dust settle and run further tests.

Thanks for your patience!

Details on the upcoming major release

The upcoming major releaseMajor Release A set of releases or versions having the same major version number may be collectively referred to as “X.Y” -- for example version 5.2.x to refer to versions 5.2, 5.2.1, and all other versions in the 5.2. (five dot two dot) branch of that software. Major Releases often are the introduction of new major features and functionality. of WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ v2.0.0 is scheduled for July 31st, 2018.

The release cycle has been a bit longer to account for the fact that some major changes are happening behind the scenes. This is what you can expect from the upcoming release:

  • PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/preface.php. version minimum will be bumped to PHP 5.4, as already announced in December (see #4554).
  • Repository/package restructuring to separate the framework and the bundle that combines the framework with the default commands into separate packages (see #4748).
  • Removal of the Symfony dependencies from the framework package, to avoid conflicts in Composer setups (see #4749).
  • Convenience access to common contributor actions, through Composer scripts (see #4167).
  • A new standardized way of working on WP-CLI as a whole (see #4750).
  • Automate redundant work like regenerating README.md files (see #4751).
  • A new family of commands wp i18n for all your internationalization needs, brought to you by @swissspidy (see #4808 and wp-cli/i18n-command).
  • All of the small changes and bugfixes that we have been collecting since the v1.5.0 release, as most of this was skipped for v1.5.1 to keep that release “bug-fix-only”.
  • Anything we might get production-ready during the upcoming WP-CLI Hack Day!

With the above restructuring, you should expect some breaking changes, most notably:

  • #4554 will cause a breaking change for anyone trying to run WP-CLI on PHP 5.3.
  • #4748 will cause a breaking change if a third-party command is being pulled-in via Composer AND that third-party command relies on running bundled commands as well. This will seldom be the case and will be an easy fix. Installations using the Phar will not be impacted.
  • #4749 will cause a breaking change if a third-party command relies on one of the removed Symfony packages AND hasn’t declared that requirement in its own Composer configuration. This will seldom be the case and will be an easy fix. Installations using the Phar will not be impacted as the package manager still comes with these requirements included.
  • The versions of some the dependencies will be bumped. If you happen to not lock WP-CLI into a specific version constraint, but do so for some of its dependencies, you might see a version constraint conflict.
  • Any external code that relies on internal file structure, file naming or other internal details that are not part of the provided APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. could run the risk of breaking due to us moving things around from v1 to v2. This should hopefully not ever be the case, but you never know…

 

 

#v2-0-0

GPG Signature Change

Starting from May 31st, 2018 (from WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ version 1.5.1 onwards), the GPG key that is used to sign the releases has changed.

Here’s the new public key for signed releases:

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQENBFsQEBkBCADfGAhxQ71XaIk31SjD8dNH3uVNtPh/2SIIhYbObMvEG6uoMucP
t3jCsnkh/veKBkJ+HJ/XcARGoFYdaCZo5PTORBWOwHmeWPbu7aiAM4v3EKPc8wZP
jabtEejwZrRFlSlAu5YL25ldz5KNgvGOBdje9jUi2iovQ4lfjMEuH2sXhmDQPbDW
22Fb2xinvmlnyf5kJn9ADiWm6VEnaNvaL96TCC1iUrMJmYI0m29j2sVbKJIq8ZBO
CgtY4llPC7QskWw8VXEAq2WnQeZMVLqxOSoRDy/qUvw0RR+DfiXsrHjBxAH4uvHK
zUdnMl1Qbh2A/rfcsIaJubXg5pUXwF7TCvSPABEBAAG0JVdQLUNMSSBSZWxlYXNl
cyA8cmVsZWFzZXNAd3AtY2xpLm9yZz6JAU4EEwEIADgCGwMFCwkIBwIGFQgJCgsC
BBYCAwECHgECF4AWIQRjr3qhUGfA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DJWbjCFTiTMyVTeyQfK0Us8FbJNXhMMagalRQu/sBH56S7Cg2OLciQB1B2
sLbhbfYDXYriI/OGVIPvCEIH6FX4+KiFy7RS+0JthI0R
=fQDM
-----END PGP PUBLIC KEY BLOCK-----

You can find the above current (as well as the old) key in the README.md file of the wp-cli/builds repository, as well as in the form of a downloadable file in that same repository: wp-cli/builds/wp-cli.pgp.

The new key is configured to be the following user:

WP-CLI Releases (releases@wp-cli.org)

The new key will not expire.

In case you have problems with using this key, please open an issue in wp-cli/wp-cli.

#gpg, #key, #release, #signing

Version 1.5.1 released

A new release is upon us!

We’re excited to bring you WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ v1.5.1, an intermediary bugfix release with a total of 52 merged pull requests since v1.5.0 in January 2018.

About this release

This is a bugfix release, which means that you shouldn’t expect major feature enhancements. We’re working hard on v2.0.0 which is planned for the summer, and all new features will have to wait for that big one.

Notable features

Yes, I just said not to expect any new features. However, a small number of features managed to sneak into this release nevertheless.

Edit your config files with ease

The config command now has a new config edit function that opens the wp-config.php file in your favorite editor for easy changes. You can configure the editor to be used through the EDITOR environment variable [#48].

Get better insight into your capabilities

Although WordPress is able to have a capability be set to false, to effectively mean an explicit  “deny” of that capability, WP-CLI did not yet show that distinction. It only let you know that the capability was defined, but not whether it was negated, giving the false impression of it being “allowed” instead.

This has now changed, and you can get a complete picture of how the capabilities are set by adding the --show-grant to the cap list command [#19].

Breaking change: Note that the default behavior of cap list has slightly changed because of that. Whereas the previous version showed a capability set to false alongside the normal capabilities, a simple cap list without the new --show-grant flag will now hide the capabilities that are set to false, effectively returning only the capabilities that are actually “granted”.

Bugs that were fixed

Framework

  • Show help text even when proc_(open|close) aren’t available [#4758]
  • Normalize Mac tar output [#4674]
  • Tests should not depend on external commands [#4673]
  • Fix phpunit extractor, glob, behat tests [#4672]
  • Move phpunit PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/preface.php. directive tests to behat [#4675]
  • Only run phpcs against PHP files on pre-commit hook [#4755]

Commands

  • plugin verify-checksums
    • Make soft change detection more flexible [#41]
    • Add backslash to the regex for matching Windows paths correctly [#39]
  • config
  • package
    • Assume default package name if composer.json file cannot be retrieved [#78]
    • Avoid using Composer CA bundle if in phar [#72]
  • scaffold block
    • Fix theme-specific paths in scaffolded blocks [#137]
    • Modify scaffold block to create index.js [#142]
  • scaffold plugin
    • Exclude tests/test-sample.php via the phpunit.xml.dist file [#134]
  • scaffold plugin-tests | theme-tests
    • Fix WPCSWordPress Community Support A public benefit corporation and a subsidiary of the WordPress Foundation, established in 2016. in theme-tests generation [#121]
    • Use correct default $WP_TESTS_DIR on MacOS [#131]
    • Fix sed -i option on MacOS [#132]
    • Switch CircleCI template to CircleCI 2.0 [#115]
    • Add PHP 7.2 to CI templates [#135]
  • search-replace
    • Handle incomplete class (un)serialization gracefully [#76]
    • Handle PCRE errors gracefully [#75]
    • Remove “Site Not Found” message from multisiteMultisite Multisite is a WordPress feature which allows users to create a network of sites on a single WordPress installation. Available since WordPress version 3.0, Multisite is a continuation of WPMU or WordPress Multiuser project. WordPress MultiUser project was discontinued and its features were included into WordPress core.https://codex.wordpress.org/Create_A_Network. usage [#69]

Contributors to this release (15 total)

danielbachhuber, emirpprime, ericgopak, felicianotech, gitlost, johnbillion, kshaner, lalaithan, pdaalder, ptrkcsk, salcode, schlessera, stevegrunwell, thrijith, torounit

#release, #v1-5-1

Upcoming bug-fix release 1.5.1

We’re planning a bug-fix release v1.5.1 that is scheduled for Friday, 20th April, 2018.

Here’s the list of bugs we’re planning to fix for this upcoming release:

Given the tight deadline, this list is quite ambitious, and we’d love to have some additional help to make this happen. We’re glad about any contributions (code or otherwise) to help us fix up this list as completely as possible.

UPDATE: You can follow the progression here: https://github.com/wp-cli/wp-cli/issues/4766

#v1-5-1

Good issues for new and existing contributors

Want to submit your first pull request to WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/? We’ve identified a few good first issues for you to get your feet wet:

If you’ve contributed to WP-CLI before, here are some reasonably well-defined issues we’d like to see pull requests for:

  • Permit defining ABSPATH before WP-CLI is loaded
    It should be possible to define ABSPATH before WP-CLI is loaded. This issue involves a simple conditional check, and some Behat tests to confirm expected behavior.
  • Move intra-doc links to someplace more prominent
    The top of the command documentation page is less than ideal. If you can provide better HTMLHTML HTML is an acronym for Hyper Text Markup Language. It is a markup language that is used in the development of web pages and websites., I can incorporate it into the developer theme and commit to WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/.
  • Way to distinguish between a user’s direct capabilities and those inherited from their role
    wp user list-roles <user> returns both the capabilities that a user has been directly assigned, and the capabilities that they inherit from their role. For this issue, let’s add a new argument where the user can filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. to the origin of the capabilities.
  • wp user remove-cap incorrectly returns success status when attempting to remove cap inherited from a role
    It should instead produce an error stating that the capability is inherited from the role. This issue will involve adding the correct logic with a corresponding functional test.

Read through the contributing guide for details on how to get started. Feel free to ask questions on the specific issue, or join us in the #cli channel with any questions you might have.

Version 1.4.1 released

Gosh darn those pesky bugs.

WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ v1.4.1 fixes a few annoying regressions introduced in v1.4.0:

  • Strips Composer autoload of PHPCSPHP Code Sniffer PHP Code Sniffer, a popular tool for analyzing code quality. The WordPress Coding Standards rely on PHPCS. references to prevent PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/preface.php. notices in Phar build [#4477].
  • plugin status: Colorizes and adds a legend to listed drop-ins to prevent PHP notice [#62].
  • search-replace: Uses $wpdb->remove_placeholder_escape() when exporting in WP 4.8.3 and greater [#43].

Want to help us catch these bugs earlier? Run wp cli update --nightly in your local and staging environments to use the latest and greatest.

Contributors to this release (3 total): danielbachhubergitlost, mullnerz

Daniel likes these issues

WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/’s next release, v1.4.0, is just around the corner: Tuesday, October 17th. If you’ve contributed to WP-CLI before, here are a few moderately advanced issues I’d love to see fixed in the next release:

Read through the contributing guide for a refresher on the process. Feel free to ask questions on the specific issue, or join us in the #cli channel with any questions you might have.

Good first issues for new contributors

Want to submit your first pull request to WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/? We’ve identified a few good first issues for you to get your feet wet:

  • Link to code review guidelines from PULL_REQUEST_TEMPLATE
    We’ve published code review guidelines that now need to be incorporated into our PULL_REQUEST_TEMPLATE scaffolding. This issue involves a one-line change to a template file.
  • List dropin plugins in wp plugin list
    For those using a db.phpobject-cache.php, or similar, it’d be helpful to display them when running wp plugin list. This issue involves writing a bit of code with Behat functional tests around the behavior.
  • Add pre-built dictionary of “did you mean…” suggestions
    When a user mistypes a command argument, WP-CLI tries to suggest the correct argument. In certain cases, the algorithm needs enhancement from a dictionary of pre-defined corrections. This issue involves reviewing WP-CLI command arguments, writing a bit of code to produce a dictionary around the most sensible corrections, and enhancing our existing PHPUnit tests for the feature.
  • Handle all cases for Utils\wp_version_compare()
    As it turns out, WordPress has some version strings that version_compare() can’t handle. Our existing utility is inadequate for all of the cases, so we should update. This issue involves tracking down all potential version strings, writing a bit of code, and enhancing our existing PHPUnit tests for the feature.
  • Explain why certain tables can be skipped when using wp search-replace
    There are a couple of cases, indicated in the issue, where tables can be skipped or “missed” entirely. This issue involves adding some explanation of these cases to the existing command documentation.

Read through the contributing guide for details on how to get started. Feel free to ask questions on the specific issue, or join us in the #cli channel with any questions you might have.

Version 1.3.0 released

Happy release day! After 210 total merged pull requests, we’re excited to bring you WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ v1.3.0.

Install packages with shortened identifiers

Recently, we have been discussing the future of the WP-CLI package index. Our conclusion was to deprecate the existing package index for now and provide a new mechanism for more easily installing external commands that are hosted on GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/.

As of WP-CLI v1.3.0, whenever you provide a package identifier in the form of <vendor>/<package>, WP-CLI will first check the deprecated package index (for backward compatibility reasons), and then check for a GitHub repository that matches this identifier. This also accepts all version qualifiers/requirements that Composer can parse.

Examples:

# Install vendor/command from GitHub (uses https://github.com/vendor/command):
$ wp package install vendor/command

# Install version 1.0.5 of vendor/command:
$ wp package install vendor/command:v1.0.5

# Install commit 95ce52b of vendor/command:
$ wp package install vendor/command:dev-master#95ce52b

New commands

Wondering whether a specific string exists in your database? Wonder no more! Use the new wp db search to search through all text columns in your database for your specified string (or regex pattern) [#29, #33]:

# Search through the database for the 'http://' regular expression, printing stats.
$ wp db search 'http:\/\/' --regex --stats
wp_comments:comment_author_url
1:https://wordpress.org/
    ...
Success: Found 99146 matches in 10.752s (10.559s searching). Searched 12 tables, 53 columns, 1358907 rows. 1 table skipped:
wp_term_relationships.

Need easy access to the database prefix for chaining into other commands? Use wp db prefix to print it out [#22]:

$ wp db prefix --url=example.com/foo
wp_3_

Everything else in v1.3.0

Command improvements

  • wp config *:
    • Errors early when no wp-config.php can be found [#22].
  • wp config create:
    • Generates keys/salts locally and use WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. as fallback [#25].
  • wp config get:
    • Adds --constant=<constant> or --global=<global> to get the value of a specific constant or global [#16].
    • Indicates files included by wp-config.php [#18].
  • wp core (multisite-install|multisite-convert):
    • Use --skip-config to avoid addition of multisiteMultisite Multisite is a WordPress feature which allows users to create a network of sites on a single WordPress installation. Available since WordPress version 3.0, Multisite is a continuation of WPMU or WordPress Multiuser project. WordPress MultiUser project was discontinued and its features were included into WordPress core.https://codex.wordpress.org/Create_A_Network. constants to wp-config.php file [#18].
  • wp import:
    • Prevents non-existent directories from ending up in the list of files to import [#8].
  • wp media *:
    • Changes media noun to ‘items’ in most cases, to reflect multi-type nature of media [#18].
  • wp media import:
    • Adds --skip-copy flag to allow import of media from local filesystem without moving on disk [#21].
  • wp package install:
    • Adds support for short package identifiers [#22].
  • wp post term delete:
    • Implements --all flag to remove all terms from a post [#23].
  • wp scaffold *:
    • Creates phpcs.xml.dist instead of custom-named phpcs.ruleset.xml [#19].
    • Better support for symbolic links [#26].
    • Changes the grunt config for addtextdomain to override all text domains by default [#28].
  • wp search-replace:
    • Includes --format=count to only show number of rows affected [#14].
  • wp term (get|update|delete):
    • Introduces --by=<type> argument to get/update/delete term by slug [#27].
  • wp user *:
    • Support fetching users with an email address in the login field [#21].
  • wp super-admin remove:
    • Allows revoking super-admin of non-existent user [#6].

Framework enhancements

  • Fixes autoload file names for $custom_vendor condition [#4147].
  • Saves runtime config so it can be passed as args to Runner::run_alias_group() invocation [#4148].
  • Manually loads comments if opcache.save_comments is disabled [#4161].
  • Allows numbers in subcommand names and arguments [#4164, #4269].
  • Fixes double slash in boot-phar.php path [#4169].
  • Allows root use of wp cli info, in addition to wp cli update [#4177].
  • Updates SSHSSH Secure SHell - a protocol for securely connecting to a remote system in addition to or in place of a password. URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org parser regexp to allow for null port number [#4182].
  • Add WP_CLI\Utils\get_home_dir() helper function [#4184].
  • Reduces included files (Behat/PHPUnit in particular) in built Phar [#4185].
  • Behat: Allows test DB user + pass to be set by environment variables [#4196].
  • Fixes output in JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. format in case of error while encoding [#4199].
  • Passes WP_CLI_STRICT_ARGS_MODE on to --ssh=<ssh> if set [#4207].
  • Displays a more helpful error message when site cannot be found [#4212].
  • Fixes broken indentation on Windows systems because of line endings [#4221, #4222].
  • Adapts --ssh=<ssh> flag to work with Docker and Docker Compose [#4240].
  • Checks for availability of proc_open/close in various scenarios [#4245].

Contributors to this release (45 total): aaemnnosttv, BhargavBhandari90, chetansatasiya, chriszarate, cjhaas, colemanedwards, danielbachhuber, davetha, drrobotnik, electrokit, emgk, emirpprime, erikjoling, fjarrett, freegenie, gitlost, greatislander, iansvo, Ippey, jalavoy, jameselks, joehoyle, johnbillion, @JPry, junaidbhura, kouratoras, lucatume, @mapk, mikeschinkel, miya0001, @murtzsarialtun, nikolov-tmw, pierre-dargham, plastikdreams, rahul286, ronaksampat, schlessera, Sidsector9, soulseekah, szepeviktor, tfrommen, vbaranovskiy-plesk, westonruter, wp-make-coffee, wpbullet