Skip to content

Commit 74836b4

Browse files
swissspidyclaude
andcommitted
Merge branch 'main' into feature/post-convert-to-blocks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx
2 parents 9280759 + a5bcc96 commit 74836b4

34 files changed

Lines changed: 1449 additions & 160 deletions

‎.github/actionlint.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,12 @@ paths:
1111
# catching genuine typos in permission names.
1212
# See https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli-in-actions
1313
- 'unknown permission scope "copilot-requests"'
14+
# Steps can run in parallel through the `background`, `wait`, `wait-all`,
15+
# `cancel` and `parallel` keywords, but actionlint does not know them yet:
16+
# it rejects `background` as an unexpected key, and a `wait-all` or
17+
# `parallel` step as one that has neither `run` nor `uses`. Drop these
18+
# entries once actionlint supports the keywords. Until then, a step that is
19+
# genuinely missing both `run` and `uses` is no longer reported.
20+
# See https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsparallel
21+
- 'unexpected key "background" for step'
22+
- 'step must run script with "run" section or run action with "uses" section'

‎.github/dependabot.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ updates:
99
- scope:distribution
1010
cooldown:
1111
default-days: 7
12+
# Packages from our own org are trusted, so they are updated immediately.
13+
exclude:
14+
- "wp-cli/*"
1215
# Only wp-cli-tests carries a package.json, holding the pinned version of the
1316
# Gherkin linter. This is a no-op in every other repository.
1417
- package-ecosystem: npm

‎.github/workflows/copilot-setup-steps.yml‎

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,40 +39,44 @@ jobs:
3939
id: check_composer_file
4040
run: echo "files_exists=$(test -f composer.json && echo true || echo false)" >> "$GITHUB_OUTPUT"
4141

42-
- name: Set up PHP environment
43-
if: steps.check_composer_file.outputs.files_exists == 'true'
44-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
45-
with:
46-
php-version: 'latest'
47-
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
48-
coverage: 'none'
49-
tools: composer,cs2pr
50-
env:
51-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
53-
- name: Install Composer dependencies & cache dependencies
54-
if: steps.check_composer_file.outputs.files_exists == 'true'
55-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
56-
env:
57-
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
58-
5942
# Without a database the Behat runner silently falls back to SQLite, so the
6043
# agent's test runs are not the ones CI will do. Mirrors the setup in
6144
# reusable-functional.yml.
6245
- name: Check existence of behat.yml file
6346
id: check_behat_file
6447
run: echo "files_exists=$(test -f behat.yml && echo true || echo false)" >> "$GITHUB_OUTPUT"
6548

49+
# Not run in the background: Copilot code review builds its workflow from
50+
# these steps and failed validation while they used `background` and
51+
# `wait-all`. Also, the action unpacks its binaries with the system `tar`,
52+
# which fails to load libpcre2 while setup-php upgrades it with apt.
6653
- name: Setup MySQL Server
6754
if: steps.check_behat_file.outputs.files_exists == 'true'
68-
uses: shogo82148/actions-setup-mysql@62da9377d83991fce27b6ed2a397d3306121e41d # v1
55+
uses: shogo82148/actions-setup-mysql@13a38f2af408e58a0c80168fc620a63a15357339 # v1
6956
with:
7057
mysql-version: '8.0' # Standard MySQL version for these tests
7158
auto-start: true
7259
root-password: ${{ env.WP_CLI_TEST_DBROOTPASS }}
7360
user: ${{ env.WP_CLI_TEST_DBUSER }}
7461
password: ${{ env.WP_CLI_TEST_DBPASS }}
7562

63+
- name: Set up PHP environment
64+
if: steps.check_composer_file.outputs.files_exists == 'true'
65+
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2
66+
with:
67+
php-version: 'latest'
68+
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
69+
coverage: 'none'
70+
tools: composer,cs2pr
71+
env:
72+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
74+
- name: Install Composer dependencies & cache dependencies
75+
if: steps.check_composer_file.outputs.files_exists == 'true'
76+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
77+
env:
78+
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
79+
7680
- name: Remove system MySQL binary
7781
if: steps.check_behat_file.outputs.files_exists == 'true'
7882
run: sudo rm -f /usr/bin/mysql /usr/bin/mysqldump
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Milestone Merged Pull Requests
3+
4+
'on':
5+
pull_request_target:
6+
types: [closed]
7+
branches:
8+
- main
9+
- master
10+
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
15+
jobs:
16+
milestone:
17+
uses: wp-cli/.github/.github/workflows/reusable-milestone-merged-prs.yml@main

‎AGENTS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This package is part of WP-CLI, the official command line interface for WordPress. For a detailed explanation of the project structure and development workflow, please refer to the main @README.md file.
44

5+
If the repository contains an @AGENTS.local.md file, read it as well. It holds instructions specific to this repository and takes precedence over this file where the two disagree.
6+
57
## Best Practices for Code Contributions
68

79
When contributing to this package, please adhere to the following guidelines:

‎README.md‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2880,7 +2880,7 @@ wp option list [--search=<pattern>] [--exclude=<pattern>] [--autoload=<value>] [
28802880
Pattern to exclude. Use wildcards ( * and ? ) to match option name.
28812881

28822882
[--autoload=<value>]
2883-
Match only autoload options when value is on, and only not-autoload option when off.
2883+
Match only autoload options when value is on, and only not-autoload option when off. On WordPress 6.6 and later, options with the `auto` and `auto-on` values count as autoload options.
28842884

28852885
[--transients]
28862886
List only transients. Use `--no-transients` to ignore all transients.
@@ -8435,7 +8435,7 @@ wp user check-password <user> <user_pass> [--escape-chars]
84358435
Creates a new user.
84368436

84378437
~~~
8438-
wp user create <user-login> <user-email> [--role=<role>] [--user_pass=<password>] [--user_registered=<yyyy-mm-dd-hh-ii-ss>] [--display_name=<name>] [--user_nicename=<nice_name>] [--user_url=<url>] [--nickname=<nickname>] [--first_name=<first_name>] [--last_name=<last_name>] [--description=<description>] [--rich_editing=<rich_editing>] [--send-email] [--porcelain]
8438+
wp user create <user-login> <user-email> [--role=<role>] [--user_pass=<password>] [--user_registered=<yyyy-mm-dd-hh-ii-ss>] [--display_name=<name>] [--user_nicename=<nice_name>] [--user_url=<url>] [--nickname=<nickname>] [--first_name=<first_name>] [--last_name=<last_name>] [--description=<description>] [--rich_editing=<rich_editing>] [--syntax_highlighting=<syntax_highlighting>] [--send-email] [--porcelain]
84398439
~~~
84408440

84418441
**OPTIONS**
@@ -8478,7 +8478,14 @@ wp user create <user-login> <user-email> [--role=<role>] [--user_pass=<password>
84788478
A string containing content about the user.
84798479

84808480
[--rich_editing=<rich_editing>]
8481-
A string for whether to enable the rich editor or not. False if not empty.
8481+
Whether to enable the rich editor for the user. Accepts 'true' or 'false',
8482+
or their numeric forms 1 and 0.
8483+
Default: true
8484+
8485+
[--syntax_highlighting=<syntax_highlighting>]
8486+
Whether to enable the rich code editor for the user. Accepts 'true' or 'false',
8487+
or their numeric forms 1 and 0.
8488+
Default: true
84828489

84838490
[--send-email]
84848491
Send an email to the user with their new account details.
@@ -10100,7 +10107,7 @@ wp user unspam <user>...
1010010107
# Remove user from spam.
1010110108
$ wp user unspam 123
1010210109
User 123 removed from spam.
10103-
Success: Unspamed 1 of 1 users.
10110+
Success: Unspammed 1 of 1 users.
1010410111

1010510112

1010610113

@@ -10145,11 +10152,12 @@ wp user update <user>... [--user_pass=<password>] [--user_nicename=<nice_name>]
1014510152
A string containing content about the user.
1014610153

1014710154
[--rich_editing=<rich_editing>]
10148-
A string for whether to enable the rich editor or not. False if not empty.
10155+
Whether to enable the rich editor for the user. Accepts 'true' or 'false',
10156+
or their numeric forms 1 and 0.
1014910157

1015010158
[--syntax_highlighting=<syntax_highlighting>]
10151-
Whether to enable the rich code editor for the user. Accepts 'true' or
10152-
'false' as a string literal, not boolean.
10159+
Whether to enable the rich code editor for the user. Accepts 'true' or 'false',
10160+
or their numeric forms 1 and 0.
1015310161

1015410162
[--comment_shortcuts=<comment_shortcuts>]
1015510163
Whether to enable comment moderation keyboard shortcuts for the user.

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"wp-cli/extension-command": "^1.2 || ^2 || ^3",
2121
"wp-cli/media-command": "^1.1 || ^2 || ^3",
2222
"wp-cli/super-admin-command": "^1 || ^2 || ^3",
23-
"wp-cli/wp-cli-tests": "^5"
23+
"wp-cli/wp-cli-tests": "^5.4.0"
2424
},
2525
"config": {
2626
"process-timeout": 7200,

‎features/comment-recount.feature‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ Feature: Recount comments on a post
33
Scenario: Recount comments on a post
44
Given a WP install
55

6-
When I run `wp comment create --comment_post_ID=1 --comment_approved=1 --porcelain`
7-
And I run `wp comment create --comment_post_ID=1 --comment_approved=1 --porcelain`
8-
And I run `wp post get 1 --field=comment_count`
6+
And these setup commands:
7+
| command |
8+
| wp comment create --comment_post_ID=1 --comment_approved=1 --porcelain |
9+
| wp comment create --comment_post_ID=1 --comment_approved=1 --porcelain |
10+
When I run `wp post get 1 --field=comment_count`
911
Then STDOUT should be:
1012
"""
1113
3

‎features/comment.feature‎

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ Feature: Manage WordPress comments
4848
"""
4949
And the return code should be 1
5050

51-
When I run `wp comment create --comment_post_ID=1`
52-
And I run `wp comment create --comment_post_ID=1`
53-
And I run `wp comment delete 3 4`
51+
Given these setup commands:
52+
| command |
53+
| wp comment create --comment_post_ID=1 |
54+
| wp comment create --comment_post_ID=1 |
55+
When I run `wp comment delete 3 4`
5456
Then STDOUT should be:
5557
"""
5658
Success: Trashed comment 3.
@@ -475,3 +477,24 @@ Feature: Manage WordPress comments
475477
And I run `wp comment unspam {COMMENT_ID} --url=www.example.com`
476478
And I run `wp comment trash {COMMENT_ID} --url=www.example.com`
477479
And I run `wp comment untrash {COMMENT_ID} --url=www.example.com`
480+
481+
Scenario: List more comments than are loaded from the database at a time
482+
Given a WP install
483+
And I run `wp comment generate --count=1200 --post_id=1`
484+
And I run `wp comment list --orderby=comment_ID --order=asc --format=ids`
485+
And save STDOUT as {IDS}
486+
487+
When I run `wp comment list --orderby=comment_ID --order=asc --field=comment_ID | tr '\n' ' ' | sed 's/ $//'`
488+
Then STDOUT should be:
489+
"""
490+
{IDS}
491+
"""
492+
493+
When I run `wp comment list --fields=comment_ID,comment_post_ID --format=csv | wc -l`
494+
Then STDOUT should contain:
495+
"""
496+
1202
497+
"""
498+
499+
When I run `wp comment list --orderby=comment_ID --order=asc --number=1 --fields=comment_ID,url --format=csv`
500+
Then STDOUT should match /^comment_ID,url\n(\d+),https?:\/\/example\.com\/\?p=1#comment-\1$/

‎features/icon.feature‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ Feature: Manage WordPress SVG icons
123123
"""
124124
And STDOUT should not contain:
125125
"""
126-
width=
126+
width="24"
127+
"""
128+
And STDOUT should not contain:
129+
"""
130+
height="24"
127131
"""
128132

129133
@require-wp-7.1

0 commit comments

Comments
 (0)