Add --locale support to wp core multisite-install command docs and coverage#331
Conversation
Agent-Logs-Url: https://github.com/wp-cli/core-command/sessions/8aeba576-61f1-44df-bd67-4416478fd632 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
--locale support to wp core multisite-install command docs and coverage
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR exposes the existing locale-aware install behavior to wp core multisite-install by adding --locale to the command’s documented options/synopsis and by extending the Behat coverage to ensure the flag is accepted.
Changes:
- Documented
[--locale=<locale>]forwp core multisite-installinsrc/Core_Command.php(and updated the assoc-args phpdoc shape). - Updated the generated user-facing docs in
README.mdto include--localein synopsis/options. - Updated the multisite-install acceptance scenario to invoke the command with
--locale=de_DE.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Core_Command.php |
Adds --locale to multisite-install option docs and updates phpdoc assoc-args shape to include locale. |
README.md |
Updates the wp core multisite-install synopsis and options list to mention --locale. |
features/core-install.feature |
Extends the multisite-install scenario to pass --locale=de_DE, validating the flag is accepted. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds a --locale option to the wp core multisite-install command, updating the documentation, test suite, and PHPDoc. Feedback suggests correcting the command synopsis and PHPDoc type hints to accurately reflect that admin_user and base are optional parameters with default values.
wp core multisite-installdid not expose--locale, even though install flow already accepts and applies locale viaCore_Command::do_install(). This PR aligns multisite install withwp core installby surfacing locale in command docs/synopsis and acceptance coverage.Command interface/docs alignment
--locale=<locale>tocore multisite-installcommand option docs insrc/Core_Command.php.locale?: string.User-facing docs
README.mdmultisite-install synopsis and options to include:[--locale=<locale>]Acceptance coverage
--locale=de_DE, ensuring the flag is accepted onmultisite-install.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
example.com/usr/bin/php /usr/bin/php /home/REDACTED/work/core-command/core-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php core install --url=REDACTED --title=WP CLI Site --admin_user=admin --admin_email=admin@example.com --admin_password=password1 --skip-email(dns block)/usr/bin/php /usr/bin/php /home/REDACTED/work/core-command/core-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php core update(dns block)/usr/bin/php /usr/bin/php /home/REDACTED/work/core-command/core-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php core install --url=example.com --title=Test --admin_user=wpcli --admin_email=wpcli@example.org --admin_password=password --skip-email(dns block)foobar.org/usr/bin/php /usr/bin/php /home/REDACTED/work/core-command/core-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php core multisite-install --url=foobar.org --title=Test --admin_user=wpcli --admin_email=admin@example.com HooksPath(dns block)/usr/bin/php /usr/bin/php /home/REDACTED/work/core-command/core-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php core multisite-install --url=foobar.org --title=Test --admin_user=wpcli --admin_email=admin@example.com --admin_password=password --skip-config(dns block)/usr/bin/php /usr/bin/php /home/REDACTED/work/core-command/core-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php core multisite-install --url=foobar.org --title=Test --admin_user=wpcli --admin_email=admin@example.com --admin_password=1 --strict(dns block)If you need me to access, download, or install something from one of these locations, you can either: