Notas de lançamento do WP-CLI v2.0.0


This is a big one! 67 awesome contributors have collaborated over 364 pull requests 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/ v2!

Before going over the detailed change log, let’s discuss a few key areas of this update in more detail. There’s also a “Breaking changes” further down in the document.

“Framework” & “Bundle” are now two separate packages

This is the main change we planned to include with version 2 of WP-CLI. From v2 onwards, the “framework” is a separate package from the “bundle” that is used to build the Phar file you can download. The framework is now contained within the wp-cli/wp-cli package, while the bundling has moved on to the wp-cli/wp-cli-bundle.

Agreed, this does not sound like such a big deal, but in terms of development experience and maintenance effort, it is a tremendous improvement, making almost every future change faster and simpler.

What does that mean for users working with the Phar version of WP-CLI ?

Nothing much, really. Apart from some of the debugging information containing different paths, you won’t see much of a difference. One of the goals was to not disrupt current usage more than necessary. If you only ever download the WP-CLI Phar and use that to control your sites, you should not need to care about this change.

What does this mean for site owners using WP-CLI through Composer ?

They will rejoice! The framework itself has gotten rid of most of its problematic dependencies. If you compare the dependencies of v1.5.1 with those of v2.0.0, you’ll see that the list is drastically shorter. Also, the most problematic set of the dependencies, the hard requirement on an old version of Symfony, is gone. The only Symfony component we still have (yet) is symfony/finder, as there’s no upper version limit for that one.

Most of the more problematic dependencies actually came from the WP-CLI package manager (wp-cli/package-command). That command is not only optional now, there’s also no valid reason to use it at all when pulling WP-CLI in via Composer directly.

This also means that you will not see WP-CLI automatically pull in all bundled commands automatically. Let’s say, you need the wp-cli/db-command for some maintenance tasks for your site. With v1.5.1, this would have pulled in the entire WP-CLI bundle as a dependency. With v2.0.0, it will only pull in the lean framework as a dependency, nothing more. You’ll end up with a WP-CLI active on your site that contains the commands clihelp (as the two “built-ins”) and db.

As a nice side-benefit, this makes WP-CLI run much faster in such scenarios, as it only loads what is effectively needed for the site. The difference might not seem like much, but depending on how you use in in your scripts, it can make a big difference.

What does this mean for developers working on third-party WP-CLI commands?

Splitting everything up has provided a few additional perks for developers (see also the next section about the testing improvements). Everything is leaner, and the dependency resolutions are less problematic, as we got rid of that one nasty circular dependency (command requires framework => framework equals bundle => bundle requires command).

However, dependency declarations need to be more explicit now. If you require wp-cli/wp-cli, this will only provide the pure framework. You cannot implicitly rely on any of the bundled commands in that case, you’ll have to explicitly require any additional command you might need.

Testing framework is now a separate package

One of the things that bothered me a lot while maintaining WP-CLI was the fact that the testing infrastructure was “scaffolded” into the individual command packages (just as it is into the third-party commands). This basically means that we copy-pasted the code in there, and if the code needs to change (because of a bug being fixed or an improvement being made), we have to create changes in every single package to overwrite the copy-pasted version of the testing code with an updated one.

Now we have the testing infrastructure abstracted away into a separate package: wp-cli/wp-cli-tests. For this first iteration, it includes out-of-the-box support for 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/index.php linting, PHP Code SnifferPHP Code Sniffer PHP Code Sniffer, a popular tool for analyzing code quality. The WordPress Coding Standards rely on PHPCS. checks (including the WordPress Coding StandardsWordPress Coding Standards The Accessibility, PHP, JavaScript, CSS, HTML, etc. coding standards as published in the WordPress Coding Standards Handbook.
May also refer to The collection of PHP_CodeSniffer rules (sniffs) used to format and validate PHP code developed for WordPress according to the PHP coding standards.
and the PHP Compatibility Checks), PHPUnit unit tests and Behat functional tests. They are set up in such a way that they detect whether they should run, based on config files or test files presence.

A simple composer test will run all of the tests in order. But you can also run them individually, through composer lint|phpcs|phpunit|behat. Adding further configuration flags can be done as well, but you need to remember to prepend them with a double-dash ( --) first, otherwise the arguments will be interpreted by Composer itself.

For the most important tests, the functional Behat tests, you can also define some constants to adapt the environment in which to test. For example, testing against a specific version of WordPress can be done by providing the WP_VERSION constant: WP_VERSION=4.2 composer behat. This constant also understands latest and trunk correctly.

In general, the tests are set up in such a way that you’ll face less differences between what you get locally and what you’ll get inside of the Travis CI checks.

And given that the tests can now be worked on in one central location, we’re already thinking about what our next steps are to further improve them, like letting you easily re-run only the failed scenarios from last run or automatically retrying failures on Travis to make sure it was not a random intermittent timeout or similar.

New command: i18n make-pot

@swissspidy has spent countless hours working on a new command that has now finally made it into the official WP-CLI bundle. We now introduce you to the i18n command family and its first usable subcommand, i18n make-pot.

What started out as an exploration at first is now a robust tool that is already being used in production systems and is even planned to replace the default translation tool bundled with WordPress Core. It supports both PHP and JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser.
https://www.javascript.com
, can manipulate and put into shape multiple files and even detected bugs in the original CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. tooling.

This can now easily be including in whatever automated tooling you use for your site/pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party./theme development, and should make your translation work much smoother. Here’s a quick rundown of the main features:

  • Automatically detects plugins and themes and extracts file headers.
  • Allows extraction of only a specific text domain.
  • Supports JavaScript string extraction, even for JSX and ESNext.
  • Allows merging the resulting POT file with an existing one, e.g. one created by Babel.
  • Powerful rules to include/exclude specific directories (minified JS files, vendor, .git folder, etc.).
  • Supports extracting strings from WordPress core the same way it’s done today with 4 different projects. See https://github.com/wp-cli/i18n-command/pull/69 for examples.
  • Can warn about strings with wrong placeholders, as well as misleading or missing translator comments. This could be very useful for core but also plugin/developers to improve polyglots UXUX UX is an acronym for User Experience – the way the user uses the UI. Think ‘what they are doing’ and less about how they do it..

A big shoutout to @swissspidy for the fabulous work he did on that command!

Minor Framework enhancements

New WordPress action: 'cli_init'

We introduced a new action 'cli_init' that will be triggered by WP-CLI during the 'plugins_loaded' action. This can be used as a conditional trigger for loading WP_CLI specific code, in case you don’t want to use the constants we already provide, for whatever reason.

This being a WordPress action, it adds a bit more flexibility to the process of loading a WP-CLI command, like for example one plugin being able to unhook the commands of another plugin.

New command: config edit

Easily open your wp-config.php in your favorite editor (configured through the EDITOR environment variable). Once you save within that editor, the wp-config.php will be correctly updated.

Note: This works through SSHSSH Secure SHell – a protocol for securely connecting to a remote system in addition to or in place of a password./vagrant/docker tunnels as well, but keep in mind that it will use the EDITOR of the remote system, which should be something like vim (=> “how to exit the vim editor” 😉).

# Launch system editor to edit wp-config.php file
$ wp config edit

# Edit wp-config.php file in a specific editor
$ EDITOR=vim wp config edit

New command: config shuffle-salts

This refreshes the salts stored in your wp-config.php file, which are cryptographic values used for authentication and other security-related functionality. Regulary refreshing these salts could be considered “security hygiene” for a site.

The command will generate the salts locally if your PHP server environment is cryptographically secure enough to do so, and falls back to the remote 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. endpoint if not.

# Get new salts for your wp-config.php file
$ wp config shuffle-salts
Success: Shuffled the salt keys.

New command: db columns

Get a tabular view of the table schema for a given table. It shows you how the individual columns of the table have been defined, which default values they use and what extra functionality might be attached to them.

$ wp db columns wp_posts
+-----------------------+---------------------+------+-----+---------------------+----------------+
|         Field         |        Type         | Null | Key |       Default       |     Extra      |
+-----------------------+---------------------+------+-----+---------------------+----------------+
| ID                    | bigint(20) unsigned | NO   | PRI |                     | auto_increment |
| post_author           | bigint(20) unsigned | NO   | MUL | 0                   |                |
| post_date             | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| post_date_gmt         | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| post_content          | longtext            | NO   |     |                     |                |
| post_title            | text                | NO   |     |                     |                |
| post_excerpt          | text                | NO   |     |                     |                |
| post_status           | varchar(20)         | NO   |     | publish             |                |
| comment_status        | varchar(20)         | NO   |     | open                |                |
| ping_status           | varchar(20)         | NO   |     | open                |                |
| post_password         | varchar(255)        | NO   |     |                     |                |
| post_name             | varchar(200)        | NO   | MUL |                     |                |
| to_ping               | text                | NO   |     |                     |                |
| pinged                | text                | NO   |     |                     |                |
| post_modified         | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| post_modified_gmt     | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| post_content_filtered | longtext            | NO   |     |                     |                |
| post_parent           | bigint(20) unsigned | NO   | MUL | 0                   |                |
| guid                  | varchar(255)        | NO   |     |                     |                |
| menu_order            | int(11)             | NO   |     | 0                   |                |
| post_type             | varchar(20)         | NO   | MUL | post                |                |
| post_mime_type        | varchar(100)        | NO   |     |                     |                |
| comment_count         | bigint(20)          | NO   |     | 0                   |                |
+-----------------------+---------------------+------+-----+---------------------+----------------+

New command: db clean

We already had db reset, but that dropped the entire database… which is not a nice thing to do if there’s more than a default WordPress site in there 😱!

The new db clean will only drop the tables that are actually part of the current WordPress installation and leave the rest of the database instance intact.

# Delete all tables that match the current site prefix.
$ wp db clean --yes
Success: Tables dropped.

New command: site meta

We’ve added CRUD methods adddeletegetlistpatch, pluck and update for the “site metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress.” entities.

Oh, and while you are wondering… Yes, you are right, WordPress does not have “site meta” entities. But we didn’t lose our minds: WordPress will introduce “site meta”, together with a wp_site_meta table, with its 5.0 version. We just like to be prepared, that’s all… 😜

# Set site meta
$ wp site meta set 123 bio "Mary is a WordPress developer."
Success: Updated custom field 'bio'.

# Get site meta
$ wp site meta get 123 bio
Mary is a WordPress developer.

# Update site meta
$ wp site meta update 123 bio "Mary is an awesome WordPress developer."
Success: Updated custom field 'bio'.

# Delete site meta
$ wp site meta delete 123 bio
Success: Deleted custom field.

New command: user check-password

You can now let WordPress tell you whether a given password is valid for a specific user. This is NOT an endorsement to build your authentication layer with Bash scripts! But who knows what exotic automation needs the DevOps folks will come up with…

The command will let you know through a shell exit code whether the password was valid or not, so you can use it directly in if conditionals.

# Check whether given credentials are valid; exit status 0 if valid, otherwise 1
$ wp user check-password admin adminpass
$ echo $?
1

# Bash script for checking whether given credentials are valid or not
if ! $(wp user check-password $USER $PASSWORD); then
    notify-send "Invalid Credentials";
fi

New commands: language plugin and language theme

They both come with the following subcommands: install, update, uninstall, list and is-installed (which was added to core language as well).

You can now fully control all of the language files of your installation individually.

# Install the Dutch theme language pack.
$ wp language plugin install hello-dolly nl_NL
Success: Language installed.

# Uninstall the Dutch theme language pack.
$ wp language plugin uninstall hello-dolly nl_NL
Success: Language uninstalled.

# List installed theme language packages.
$ wp language plugin list --status=installed
+----------+--------------+-------------+-----------+-----------+---------------------+
| language | english_name | native_name | status | update | updated |
+----------+--------------+-------------+-----------+-----------+---------------------+
| nl_NL | Dutch | Nederlands | installed | available | 2016-05-13 08:12:50 |
+----------+--------------+-------------+-----------+-----------+---------------------+

Changes to existing command

  • db size now knows about ISO size units as well
  • option list got a new --unserialize flag
  • post generate can now deal with --post_date_gmt
  • user update now allows you to --skip-email
  • eval-file can read from STDIN
  • Both plugin uninstall and plugin delete can now act on --all plugins at once
  • cap list can now --show-grant
  • cap add , seeing what its list sibling had done, grew a new --grant flag
  • role list can now print a single --field=<field>
  • scaffold _s learned the new --woocommerce trick
  • search-replace lets you set a --regex-limit

Automated README.md updates

If you have ever contributed to WP-CLI and made a change to a command signature or documentation, you probably had me tell you that you needed to regenerate the README.md as well using the wp scaffold package-readme . --force command. No more!

We have now added a package wp-cli/regenerate-readme that automates this process. It adds both a precommit and a postcommit git hook that collaborate to transparently regenerate the README.md file behind the scenes and then amend your commit to add the required changes automatically.

This has not been deployedDeploy Launching code from a local development environment to the production web server, so that it’s available to visitors. to all command packages yet while we still experiment with some of the finer points of its implementation, but you’ll slowly see the annoying “please regenerate README.md kthxbye” reminders from my side disappear and become forgotten artifacts of the past.

Improved debug output

The debug output was always a bit sparse for WP-CLI. This is why we took the opportunity of v2 to improve upon it and make it more useful. It will now add debug messages for the hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. that are triggered, or details about how commands are being loaded or deferred. This will be very useful for third-party command developers that ignore why their command is not properly registered.

We’ll make sure to add even more useful debugging information in the future.

Small side note: To make debugging work as early as possible, it is now smart enough to just store all messages until the logger it needs to send them to becomes available. This means you don’t need to worry about the timing here, if the WP_CLI exits for your code, the debugger is good to go!

Breaking changes

Here are a few things you need to be aware of when moving from ^v1 to ^v2:

  • An obvious breaking change is the bump to the minimum version of PHP. This will break for anyone trying to run WP-CLI on PHP 5.3.
  • The separation of the “framework” and the “bundle” into two separate packages 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.
  • As many dependencies could be removed from the framework by not including the package manager automatically, any third-party command that relies on one of the removed Symfony packages or other dependencies AND hasn’t declared that requirement in its own Composer configuration will break. 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 when using Composer.
  • Any external code that relies on internal file structure, file naming or other internal details that are not part of the provided API 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…
  • As a side-effect of adding the --all flag to plugin uninstall, a breaking change was introduced for consistency reasons. Whereas WP-CLI used to consider uninstalling a non-existent plugin as a “Success: Plugin already uninstalled”, it will now throw an error “Error: No plugin uninstalled”.
  • Fizemos o possível para evitar alterações incompatíveis desnecessárias. Mas, com uma grande mudança estrutural como a que temos aqui, o problema está nos detalhes. Avise-nos se encontrar outros problemas!

Registro completo de alterações

wp-cli/wp-cli-bundle

  • Incluir wp-cli/i18n-command no pacote [#9]

wp-cli/wp-cli

  • Adicionar a classe Inflector e uma função auxiliar para pluralizar substantivos [#4881]
  • Adaptar a expressão regular no teste de make-phar para ignorar links da wiki [#4873]
  • PHPCSPHP Code Sniffer PHP Code Sniffer, uma ferramenta popular para analisar a qualidade do código. Os Padrões de Codificação do WordPress dependem do PHPCS. Atualização da configuração [#4867]
  • Corrigir a verificação da versão do PHP [#4864]
  • Acionar o novo hook 'cli_init' durante a ação 'plugins_loaded' do WordPress. [#4861]
  • adicionar modelo para core-command ao phar [#4854]
  • Recorrer à string completa em vez de $mode no PHP < 7 [#4853]
  • Refatorar wp-cli/wp-cli para representar apenas o framework, não o pacote [#4851]
  • Remover o requisito do WP 4.4 [#4845]
  • Corrigir testes de —skip-theme [#4843]
  • Corrigir problemas de script de shell em ci/deploy.sh [#4842]
  • Corrigir problemas de script de shell em bin/wp [#4841]
  • Adicionar aspas em ci/prepare.sh [#4840]
  • Fixar wp-completion.bash na v1.5.1 [#4839]
  • Remover o selo do Gemnasium, pois o serviço foi encerrado [#4815]
  • Usar o pacote mais recente de search-replace para corrigir testes quebrados devido à alteração da política de privacidade [#4807]
  • Transformar 'latest' em número de versão [#4806]
  • Atualizar os pacotes para corrigir testes quebrados devido ao WP5.0 [#4804]
  • Mudar para o comando de pacote fixo [#4803]
  • Aumentar a versão mínima do PHP a ser testada para 5.4 [#4798]
  • Adicionar um formato de saída aceito ausente ao wp cli alias [#4765]
  • Melhorar as descrições das flags --skip-plugins e --skip-themes [#4759]
  • Incluir sublinks no README.md para métodos populares de instalação [#4756]
  • ABSPATH definido [#4743]
  • Ignorar a tabela wp_blogmeta para manter a compatibilidade retroativa [#4736]
  • Introduzir a função \WP_CLI\Utils\normalize_path. Usá-la para a constante ABSPATH. [#4718]
  • Desfazer o @require-php-5.4 temporário e pontual no teste de bootstrap. [#4716]
  • Reverter “Exigir PHP 5.4 ou superior” [#4715]
  • Ignorar o hook pre-commit no auto-composer-update [#4711]
  • Reverter “atualizar wp cli info” [#4702]
  • Remover : da verificação das informações de atualização da CLI. [#4697]
  • Verificar apenas os arquivos preparados durante a verificação PHPCS do pre-commit [#4696]
  • Domínio vazio no teste do framework após a alteração de get_sites_by_path. [#4695]
  • Anexar uniq_id() ao extrair arquivo do Phar [#4692]
  • Oferecer suporte à abertura do editor do sistema com uma extensão de arquivo temporário específica [#4691]
  • Script para criar o hook pre-commit do GitGit Git é um sistema de controle de versão distribuído, gratuito e de código aberto, projetado para lidar com projetos de pequeno a muito grande porte com velocidade e eficiência. O Git é fácil de aprender e tem uma presença mínima, com desempenho extremamente rápido. A maior parte do desenvolvimento moderno de plugins e temas é realizada com esse sistema de controle de versão.
    https://git-scm.com/
    . [#4622]
  • Atualizar wp cli info [#4613]

wp-cli/handbook

  • Adicionar documentação sobre como solucionar problemas [#243]
  • Usar <example.com> como marcador [#242]
  • Corrigir erros de digitação em <code-review.md> [#239] & [#241]
  • Remover link quebrado [#238]
  • Atualizar a documentação sobre a instalação do WP-CLI via brew [#236]
  • Adicionar aspas ao alias [#235]
  • Adaptar o procedimento de assinatura para usar a chave correta [#232]
  • Adicionar o comando optimize do WP CLICLI Interface de Linha de Comando. Terminal (Bash) no Mac, Prompt de Comando no Windows ou WP-CLI para WordPress. do plugin WP-Optimize [#231]
  • Adicionar um comando updraftplus da CLI do WP [#228]
  • Corrigir a gramática no parágrafo da documentação [#226]
  • Adicionar um arquivo LICENSE ao repositório [#224]
  • Incorporar algumas menções estratégicas ao repositório wp-cli/ideas [#223]
  • Remover a lista de desejos do site [#222]
  • Documentar WP_CLI_PHP_ARGS no documento de configuração do WP-CLI [#221]
  • Mencionar o método de instalação via Docker [#220]
  • Documentar o problema de criar uma publicação com caracteres latinos no título [#214]
  • Adicionar o BOM em wp-config.php como um problema comum. [#212]
  • Adicionar WP_CLI_PHP às variáveis de ambiente [#211]
  • Corrigir aspas ausentes na documentação [#210]
  • Separar a instalação sem pacote; gerar usando a instância atual do WP-CLI. [#207]
  • Atualizar a relação de Daniel com o projeto [#206]

wp-cli/wp-cli.github.com

  • Atualizar <index.md> para o idioma espanhol [#313]
  • Remover o selo do Gemnasium [#312]
  • Atualizar a tradução para pt_BR [#311]
  • Adicionar um arquivo LICENSE ao repositório [#309]
  • Adicionar uma observação sobre usar apenas a versão em inglês como fonte para traduções [#308]
  • Traduzir a página inicial para o espanhol [#307]
  • Alterar http para https em todos os links de wp-cli.org. [#305]

wp-cli/autoload-splitter

  • O pacote está obsoleto desde a v2.0.0

wp-cli/cache-command

  • Adaptar o pacote para o framework v2 [#32]

wp-cli/checksum-command

  • Tornar as alterações flexíveis mais adequadas para somas de verificação de plugins [#43]
  • Verificações de alterações flexíveis aprimoradas (issue #34) [#41]
  • Adicionar barra invertida à expressão regular para corresponder corretamente aos caminhos do Windows [#39]
  • Criar rótulos corretos do GitHubGitHub GitHub é um site que oferece uma implementação online de repositórios Git que podem ser facilmente compartilhados, copiados e modificados por outros desenvolvedores. Repositórios públicos são gratuitos para hospedar; repositórios privados exigem uma assinatura paga. O GitHub introduziu o conceito de ‘pull request’, no qual alterações de código feitas em branches por colaboradores podem ser revisadas e discutidas antes de serem mescladas pelo proprietário do repositório. https://github.com/ [#37]
  • Adaptar o pacote para o framework v2 [#50]

wp-cli/config-command

  • Fixar a versão da biblioteca em ^1.2.1 [#53]
  • Remover a operação remove() restante [#52]
  • Introduzir o comando config edit [#48]
  • Adicionar um valor de configuração de tempo limite maior [#67]
  • Adaptar o pacote para o framework v2 [#66]
  • Garantir que file_put_contents() grave no caminho de wp-config.php [#63]
  • Adicionar o comando shuffle-salts [#62]
  • Definir WP_CACHE_KEY_SALT [#59]

wp-cli/core-command

  • Trazer os arquivos de modelo de wp-cli/wp-cli [#73]
  • Corrigir o caminho do arquivo de modelo mustache [#77] & [#78]
  • Sanitizar o banco de dados ao final da instalação para evitar dados duplicados [#76]
  • Adaptar o pacote para o framework v2 [#81]

wp-cli/cron-command

  • Adaptar o pacote para o framework v2 [#29]

wp-cli/db-command

  • Adicionar o comando db columns [#100]
  • Contar usuários em vez de posts para o teste de fumaça [#98]
  • Corrigir falha no teste devido à introdução da tabela wp_blogmeta [#94]
  • Adicionar o comando db clean [#93]
  • Adicionar exemplos para exportar determinados posts [#90]
  • passar --column-statistics=0 para o comando mysqldump [#105]
  • Adicionar formatos de tamanho ISO ao db size [#104]
  • Adaptar o pacote para o framework v2 [#110]

wp-cli/embed-command

  • Adaptar o pacote para o framework v2 [#38]
  • Criar os comandos de nível superior ausentes [#35]

wp-cli/entity-command

  • Corrigir os testes após a introdução, pelo Core, de uma página padrão de “Política de Privacidade” [#177]
  • Abstrair o CRUD de metadados em métodos [#174]
  • Remover o argumento duplicado --user_email=<user-email> [#173]
  • Transformar latest em um número de versão real [#171]
  • Melhorar a formatação da documentação de vários parâmetros de formato [#168]
  • Adicionar o subcomando site meta [#159]
  • Adicionar a opção --unserialize ao comando option list [#156]
  • Adicionar a opção --from-post=<post_id> para criar posts duplicados [#154]
  • Clonar objetos corretamente para comparação [#152]
  • Corrigir aspas ausentes na documentação [#147]
  • Corrigir a contagem da lista de categoriaCategoria A taxonomia “categoria” permite agrupar posts/conteúdo que compartilham uma característica em comum. As categorias são predefinidas e abrangentes. [#146]
  • Adicionar o subcomando user check-password [#144]
  • Substituir “install” por “installation”. [#187]
  • Adicionar suporte a --post_date_gmt em post generate [#184]
  • Opção --skip-email para wp user update [#155]
  • Adaptar o pacote para o framework v2 [#192]

wp-cli/eval-command

  • Adaptar o pacote para o framework v2 [#27]
  • Oferecer suporte a eval-file a partir de STDIN (implementação para #19) [#21]

wp-cli/export-command

  • Começar com um site vazio para evitar problemas de contagem [#36]
  • Adaptar o pacote para o framework v2 [#44]

wp-cli/extension-command

  • Adicionar os modelos ausentes a este repositório [#107]
  • Substituir os temas descontinuados usados nos testes por novos [#105]
  • Introduzir theme mod list [#100]
  • Atualizar README.md e a suíte de testes antes do lançamento da v1.1.10. [#89]
  • Permitir modern-wordpress redirect [#85]
  • Adicionar a opção --all ao comando plugin uninstall [#84]
  • Corrigir os caminhos dos arquivos mustache [#109] & [#112]
  • Pesquisa: adicionar a URLURL Um endereço web específico de um site ou página da web na Internet, como a URL de um site www.wordpress.org do plugin ou tema em <wordpress.org> [#108]
  • Adicionar a opção --all ao plugin delete [#103]
  • Adaptar o pacote para o framework v2 [#116]

wp-cli/i18n-command

  • Preparar para o lançamento da v2 [#72]
  • Suporte ao WordPress Core [#69]
  • Verificar se há mais erros nas strings traduzíveis [#64]
  • Separar a extração de traduções da gravação do arquivo Po [#63]
  • Tornar PhpFunctionsScanner extensívelExtensível Esta é a capacidade de adicionar funcionalidades adicionais ao código. Os plugins estendem o software principal do WordPress. [#62]
  • Separar o tratamento dos argumentos do comando do __invoke() propriamente dito [#60]
  • Adicionar o parâmetro --headers [#58]
  • Adicionar o cabeçalhoCabeçalho O cabeçalho do seu site normalmente é a primeira coisa que as pessoas veem. O cabeçalho ou a arte do cabeçalho localizada na parte superior da página faz parte da aparência do seu site. Ele pode influenciar a opinião de um visitante sobre seu conteúdo e sobre a marca da sua organização. Também pode ter uma aparência diferente em diferentes tamanhos de tela. X-Generator ao arquivo POT [#57]
  • Imprimir mensagens de depuração mais úteis [#56]
  • Transformar o iterador de diretórios em um trait [#54]
  • Cabeçalho do domínio de texto [#43]
  • Adicionar @when before_wp_load ao namespace do comando [#42]
  • Adicionar uma opção para extrair strings com qualquer domínio de texto [#38]
  • Passar corretamente a opção exclude para JsCodeExtractor [#37]
  • Adicionar um aviso quando uma string tiver dois comentários diferentes para tradutores [#34]
  • Excluir alguns diretórios comuns [#32]
  • Adicionar a capacidade de mesclar com um arquivo POT existente [#31]
  • Extração de strings JavaScript [#26]
  • Não tentar extrair nada quando não houver arquivos PHP [#24]
  • Adicionar mais testes relacionados aos comentários para tradutores [#23]
  • Padronizar os nomes dos arquivos [#21]
  • Extrair todas as funções compatíveis. [#13]

wp-cli/import-command

  • Adaptar a geração de posts/páginas para torná-los resilientes à adição da página de política de privacidade [#25]
  • Adaptar o pacote para o framework v2 [#30]

wp-cli/language-command

  • Reverter “Adicionar comando de plugin e tema” [#28]
  • Adaptar o pacote para o framework v2 [#43]
  • Usar download_url() no atualizador de pacotes de idioma [#41]
  • Habilitar a atualização de idiomas para plugins e temas individuais [#40]
  • Avisar se nenhum plugin ou tema tiver sido especificado [#38]
  • Adicionar o comando is-installed para verificar se determinado idioma está instalado [#36]
  • Atualizar a mensagem de language core update --dry-run [#32]
  • Adicionar os comandos language plugin e language theme. [#29]

wp-cli/media-command

  • Adaptar o pacote para o framework v2 [#85]
  • Atualizar os exemplos na documentação [#81]
  • Restaurar a instalação de ghostscript/imagick e corrigir o nome de bmp no teste de regenerate. [#69]
  • Documentar como obter a URL do anexo após a importação [#68]
  • Limpar periodicamente o cache de objetos do WP em media regenerate/import. [#62]

wp-cli/package-command

  • Considerar o nome de pacote padrão se o arquivo composer.json não puder ser obtido [#78]
  • Evitar o uso do pacote de certificados CA do Composer quando estiver em um phar. [#73]
  • Mover test-command para a organização Github wp-cli-test [#66]
  • Extrair primeiro o certificado SSLSSL Secure Socket Layer — criptografia do servidor para o navegador e vice-versa. Impede que olhares indiscretos vejam o que você está enviando entre o navegador e o servidor. do Phar antes de usá-lo no Composer [#83]
  • Adaptar o pacote para o framework v2 [#87]
  • Excluir a versão quebrada do Composer [#91]

wp-cli/php-cli-tools

  • Remover ponto e vírgula duplicado [#130]
  • Corrigir o possível loopLoop O Loop é um código PHP usado pelo WordPress para exibir posts. Usando o Loop, o WordPress processa cada post a ser exibido na página atual e o formata de acordo com a correspondência aos critérios especificados nas tags do Loop. Qualquer código HTML ou PHP no Loop será processado em cada post. https://codex.wordpress.org/The_Loop infinito em prompt() [#129]
  • Corrigir o erro de diferença de 1 nos exemplos da barra de progresso [#128]
  • Adicionar o parâmetro opcional $msg a cli\Progress\Bar::tick() [#126]

wp-cli/rewrite-command

  • Adaptar o pacote para o framework v2 [#20]

wp-cli/role-command

  • adicionar o argumento --show-grant a wp cap list e --grant a wp cap add [#19]
  • Adicionar suporte a --field=<field> à listagem de funções [#17]
  • Adaptar o pacote para o framework v2 [#23]

wp-cli/scaffold-command

  • Ignorar testes do PHPUnit para PHP 7.2+ [#145]
  • Modificar scaffold block para criar index.js [#142]
  • Corrigir caminhos específicos do tema em blocos gerados [#137]
  • Adicionar PHP 7.2 aos modelos de CI [#135]
  • Excluir tests/test-sample.php por meio do arquivo phpunit.xml.dist [#134]
  • Corrigir a opção sed -i no MacOS [#132]
  • Usar o $WP_TESTS_DIR padrão correto no MacOS [#131]
  • Usar o phpunit 6.5.6 para PHP 7.2 para contornar a incompatibilidade dos testes do núcleo. [#125]
  • Corrigir WPCSWordPress Community Support Uma corporação de benefício público e uma subsidiária da WordPress Foundation, estabelecida em 2016. na geração de testes de temas [#121]
  • Mudar o modelo do CircleCI para o CircleCI 2.0. [#115]
  • Corrigir o rótulo 'add_new_item' [#163]
  • Excluir string do aviso de escape [#162]
  • Atualizar o conjunto de regras padrão do PHPCS [#161]
  • Adicionar a flag --woocommerce ao comando scaffold _s [#159]
  • Adicionar sniffssniff Um módulo do PHP Code Sniffer que analisa o código em busca de um problema específico. Vários módulos são combinados para criar um padrão do PHPCS. O termo foi escolhido porque detecta code smells, de forma semelhante a um cão que “fareja” comida. de PHPCompatibility aos arquivos gerados [#154]
  • Adicionar escape ao título do blocoBloco Bloco é o termo abstrato usado para descrever unidades de marcação que, compostas juntas, formam o conteúdo ou o layout de uma página da web usando o editor do WordPress. A ideia combina conceitos que, no passado, poderiam ter sido obtidos com shortcodes, HTML personalizado e descoberta de incorporações em uma única API e experiência do usuário consistentes. [#153]
  • Remover 'wp-blocks' da dependência de estilo [#151]
  • Adicionar verificação de function_exists() ao modelo PHP do bloco [#147]
  • Adaptar o pacote para o framework v2 [#166]

wp-cli/search-replace-command

  • Corrigir testes quebrados devido à adição de uma página de “Política de Privacidade” [#78]
  • Tratar a (des)serialização de classes incompletas adequadamente [#76]
  • Tratar erros de PCRE adequadamente [#75]
  • Remover a mensagem “Site não encontrado” do uso de multisiteMultisite Multisite é um recurso do WordPress que permite aos usuários criar uma rede de sites em uma única instalação do WordPress. Disponível desde a versão 3.0 do WordPress, o Multisite é uma continuação do projeto WPMU ou WordPress Multiuser. O projeto WordPress MultiUser foi descontinuado e seus recursos foram incluídos no núcleo do WordPress. Manual de Administração Avançada -> Criar uma rede. [#69]
  • Corrigir teste de GUID quebrado [#81]
  • Melhorar a lógica de --regex-limit [#70]
  • Adaptar o pacote para o framework v2 [#86]
  • Adicionar a opção --regex-limit. [#62]

wp-cli/server-command

  • Adaptar o pacote para o framework v2 [#42]

wp-cli/shell-command

  • Adaptar o pacote para o framework v2 [#25]
  • Explicar melhor a flag --basic [#23]

wp-cli/widget-command

  • Adaptar o pacote para o framework v2 [#19]

Colaboradores

Aqui está a lista completa das pessoas incríveis que ajudaram a tornar isso possível:

@2020media, @abhijitrakas, @ajitbohra, @alpipego, @austinginder, @benlk, @BhargavBhandari90, @burhandodhy, @chesio, @CodeProKid, @danielbachhuber, @drzraf, @emirpprime, @ericgopak, @erlendeide, @felicianotech, @felipeelia, @fumikito, @GaryJones, @ghost, @gitlost, @greatislander, @JanVoracek, @janw-oostendorp, @javorszky, @jblz, @jmichaelward, @johnbillion, @josephfusco, @kirtangajjar, @kshaner, @lalaithan, @lf-jeremy, @libertamohamed, @marcovalloni, @marksabbath, @miya0001, @MoisesMN, @montu1996, @NicktheGeek, @ocean90, @pdaalder, @pekapl, @pixolin, @pjeby, @pmbaldha, @ptrkcsk, @ryanjbonnell, @sagarnasit, @salcode, @sasagar, @schlessera, @spacedmonkey, @spicecadet, @stevegrunwell, @strandtc, @svenkaptein, @swissspidy, @terriann, @thrijith, @tiagohillebrandt, @tomjn, @torounit, @wojsmol, @wp-make-coffee, @yousan, @zipofar

Muito obrigado a todos os envolvidos! ❤️

#release, #v2-0-0