Skip to content

Add --locale support to wp core multisite-install command docs and coverage#331

Merged
swissspidy merged 2 commits intomainfrom
copilot/add-locale-argument-multisite-install
May 8, 2026
Merged

Add --locale support to wp core multisite-install command docs and coverage#331
swissspidy merged 2 commits intomainfrom
copilot/add-locale-argument-multisite-install

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

wp core multisite-install did not expose --locale, even though install flow already accepts and applies locale via Core_Command::do_install(). This PR aligns multisite install with wp core install by surfacing locale in command docs/synopsis and acceptance coverage.

  • Command interface/docs alignment

    • Added --locale=<locale> to core multisite-install command option docs in src/Core_Command.php.
    • Updated multisite-install assoc args phpdoc to include locale?: string.
  • User-facing docs

    • Updated README.md multisite-install synopsis and options to include:
      • [--locale=<locale>]
      • description matching existing install semantics.
  • Acceptance coverage

    • Updated existing Behat scenario for multisite install without explicit password to pass --locale=de_DE, ensuring the flag is accepted on multisite-install.
wp core multisite-install \
  --url=foobar.org \
  --title=Test \
  --admin_user=wpcli \
  --admin_email=admin@example.com \
  --locale=de_DE

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
    • Triggering command: /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)
    • Triggering command: /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)
    • Triggering command: /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
    • Triggering command: /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)
    • Triggering command: /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)
    • Triggering command: /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:

Copilot AI linked an issue May 8, 2026 that may be closed by this pull request
1 task
@github-actions github-actions Bot added command:core-multisite-install Related to 'core multisite-install' command scope:distribution Related to distribution labels May 8, 2026
Copilot AI changed the title [WIP] Add locale argument to wp core multisite-install Add --locale support to wp core multisite-install command docs and coverage May 8, 2026
Copilot AI requested a review from swissspidy May 8, 2026 09:32
@swissspidy swissspidy added this to the 2.1.29 milestone May 8, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>] for wp core multisite-install in src/Core_Command.php (and updated the assoc-args phpdoc shape).
  • Updated the generated user-facing docs in README.md to include --locale in 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.

@swissspidy swissspidy marked this pull request as ready for review May 8, 2026 10:41
@swissspidy swissspidy requested a review from a team as a code owner May 8, 2026 10:41
@swissspidy
Copy link
Copy Markdown
Member

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md
Comment thread src/Core_Command.php
@swissspidy swissspidy merged commit a34c146 into main May 8, 2026
66 checks passed
@swissspidy swissspidy deleted the copilot/add-locale-argument-multisite-install branch May 8, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:core-multisite-install Related to 'core multisite-install' command scope:distribution Related to distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add locale argument to wp core multisite-install

3 participants