Skip to content

Commit 78e1db0

Browse files
committed
Merge branch 'master' of github.com:alexstine/extension-command into add/mu-plugin-title
2 parents 10b75d3 + cef1595 commit 78e1db0

File tree

8 files changed

+74
-38
lines changed

8 files changed

+74
-38
lines changed

.github/workflows/code-quality.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7+
- main
78
- master
89

910
# Cancels all previous workflow runs for the same branch that have not yet completed.
@@ -33,12 +34,14 @@ jobs:
3334
with:
3435
php-version: '7.4'
3536
tools: cs2pr
37+
env:
38+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3639

3740
- name: Install Composer dependencies & cache dependencies
3841
if: steps.check_composer_file.outputs.files_exists == 'true'
39-
uses: "ramsey/composer-install@v1"
42+
uses: "ramsey/composer-install@v2"
4043
env:
41-
COMPOSER_ROOT_VERSION: 'dev-master'
44+
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
4245

4346
- name: Check existence of vendor/bin/parallel-lint file
4447
id: check_linter_file
@@ -70,12 +73,14 @@ jobs:
7073
with:
7174
php-version: '7.4'
7275
tools: cs2pr
76+
env:
77+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7378

7479
- name: Install Composer dependencies & cache dependencies
7580
if: steps.check_files.outputs.files_exists == 'true'
76-
uses: "ramsey/composer-install@v1"
81+
uses: "ramsey/composer-install@v2"
7782
env:
78-
COMPOSER_ROOT_VERSION: 'dev-master'
83+
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
7984

8085
- name: Check existence of vendor/bin/phpcs file
8186
id: check_phpcs_binary_file

.github/workflows/regenerate-readme.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ on:
44
workflow_dispatch:
55
push:
66
branches:
7+
- main
78
- master
89
paths-ignore:
910
- 'features/**'
1011
- 'README.md'
11-
12+
1213
# Cancels all previous workflow runs for the same branch that have not yet completed.
1314
concurrency:
1415
# The concurrency group contains the workflow name and the branch name.
@@ -30,6 +31,8 @@ jobs:
3031
uses: shivammathur/setup-php@v2
3132
with:
3233
php-version: '7.4'
34+
env:
35+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3336

3437
- name: Check existence of composer.json file
3538
id: check_composer_file
@@ -39,9 +42,9 @@ jobs:
3942

4043
- name: Install Composer dependencies & cache dependencies
4144
if: steps.check_composer_file.outputs.files_exists == 'true'
42-
uses: "ramsey/composer-install@v1"
45+
uses: "ramsey/composer-install@v2"
4346
env:
44-
COMPOSER_ROOT_VERSION: 'dev-master'
47+
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
4548

4649
- name: Configure git user
4750
run: |
@@ -93,7 +96,7 @@ jobs:
9396
uses: repo-sync/pull-request@v2
9497
with:
9598
source_branch: regenerate-readme
96-
destination_branch: master
99+
destination_branch: ${{ github.event.repository.default_branch }}
97100
github_token: ${{ secrets.GITHUB_TOKEN }}
98101
pr_title: Regenerate README file
99102
pr_body: "**This is an automated pull-request**\n\nRefreshes the `README.md` file with the latest changes to the docblocks in the source code."

.github/workflows/testing.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7+
- main
78
- master
89

910
# Cancels all previous workflow runs for the same branch that have not yet completed.
@@ -19,7 +20,7 @@ jobs:
1920
strategy:
2021
fail-fast: false
2122
matrix:
22-
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
23+
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
2324
runs-on: ubuntu-20.04
2425

2526
steps:
@@ -39,12 +40,14 @@ jobs:
3940
php-version: '${{ matrix.php }}'
4041
coverage: none
4142
tools: composer,cs2pr
43+
env:
44+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4245

4346
- name: Install Composer dependencies & cache dependencies
4447
if: steps.check_files.outputs.files_exists == 'true'
45-
uses: "ramsey/composer-install@v1"
48+
uses: "ramsey/composer-install@v2"
4649
env:
47-
COMPOSER_ROOT_VERSION: 'dev-master'
50+
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
4851

4952
- name: Setup problem matcher to provide annotations for PHPUnit
5053
if: steps.check_files.outputs.files_exists == 'true'
@@ -59,7 +62,7 @@ jobs:
5962
strategy:
6063
fail-fast: false
6164
matrix:
62-
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
65+
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
6366
wp: ['latest']
6467
mysql: ['8.0']
6568
include:
@@ -84,6 +87,9 @@ jobs:
8487
- php: '8.0'
8588
wp: 'trunk'
8689
mysql: '5.6'
90+
- php: '8.1'
91+
wp: 'trunk'
92+
mysql: '8.0'
8793
- php: '5.6'
8894
wp: '3.7'
8995
mysql: '5.6'
@@ -120,6 +126,8 @@ jobs:
120126
extensions: gd, imagick, mysql, zip
121127
coverage: none
122128
tools: composer
129+
env:
130+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123131

124132
- name: Change ImageMagick policy to allow pdf->png conversion.
125133
if: steps.check_files.outputs.files_exists == 'true'
@@ -128,9 +136,9 @@ jobs:
128136
129137
- name: Install Composer dependencies & cache dependencies
130138
if: steps.check_files.outputs.files_exists == 'true'
131-
uses: "ramsey/composer-install@v1"
139+
uses: "ramsey/composer-install@v2"
132140
env:
133-
COMPOSER_ROOT_VERSION: 'dev-master'
141+
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
134142

135143
- name: Start MySQL server
136144
if: steps.check_files.outputs.files_exists == 'true'

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ Returns exit code 0 when installed, 1 when uninstalled.
301301
Gets a list of plugins.
302302

303303
~~~
304-
wp plugin list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>] [--status=<status>]
304+
wp plugin list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>] [--status=<status>] [--skip-update-check]
305305
~~~
306306

307307
Displays a list of the plugins installed on the site with activation
@@ -343,6 +343,9 @@ Use `--status=dropin` to list installed dropins (e.g. `object-cache.php`).
343343
- must-use
344344
---
345345

346+
[--skip-update-check]
347+
If set, the plugin update check will be skipped.
348+
346349
**AVAILABLE FIELDS**
347350

348351
These fields will be displayed by default for each plugin:
@@ -977,7 +980,7 @@ Returns exit code 0 when installed, 1 when uninstalled.
977980
Gets a list of themes.
978981

979982
~~~
980-
wp theme list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>] [--status=<status>]
983+
wp theme list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>] [--status=<status>] [--skip-update-check]
981984
~~~
982985

983986
**OPTIONS**
@@ -1012,6 +1015,9 @@ wp theme list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--forma
10121015
- inactive
10131016
---
10141017

1018+
[--skip-update-check]
1019+
If set, the theme update check will be skipped.
1020+
10151021
**AVAILABLE FIELDS**
10161022

10171023
These fields will be displayed by default for each theme:

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@
2424
"wp-cli/cache-command": "^2.0",
2525
"wp-cli/entity-command": "^1.3 || ^2",
2626
"wp-cli/scaffold-command": "^1.2 || ^2",
27-
"wp-cli/wp-cli-tests": "^3.0.16"
27+
"wp-cli/wp-cli-tests": "^3.1"
2828
},
2929
"config": {
3030
"process-timeout": 7200,
31-
"sort-packages": true
31+
"sort-packages": true,
32+
"allow-plugins": {
33+
"dealerdirect/phpcodesniffer-composer-installer": true
34+
}
3235
},
3336
"extra": {
3437
"branch-alias": {

features/plugin-status.feature

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@ Feature: List the status of plugins
33
@require-wp-4.0
44
Scenario: Status should include drop-ins
55
Given a WP install
6-
And a wp-debug.php file:
7-
"""
8-
<?php
9-
define( 'WP_DEBUG', true );
10-
"""
11-
And a wp-cli.yml file:
12-
"""
13-
require:
14-
- wp-debug.php
15-
"""
166
And a wp-content/db-error.php file:
177
"""
188
<?php

features/theme.feature

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ Feature: Manage WordPress themes
8585
When I run `wp theme activate p2`
8686
Then STDOUT should not be empty
8787

88+
# Ensure no other themes interfere with update.
89+
When I run `wp theme list --status=inactive --field=name | xargs wp theme delete`
90+
Then STDOUT should contain:
91+
"""
92+
Success: Deleted
93+
"""
94+
8895
When I run `wp theme install p2 --version=1.4.1 --force`
8996
Then STDOUT should not be empty
9097

@@ -120,19 +127,29 @@ Feature: Manage WordPress themes
120127

121128
When I run `wp theme install p2 --version=1.4.1 --force`
122129
Then STDOUT should contain:
123-
""""
130+
"""
124131
Downloading install
125-
""""
132+
"""
126133
And STDOUT should contain:
127-
""""
134+
"""
128135
package from https://downloads.wordpress.org/theme/p2.1.4.1.zip...
129-
""""
136+
"""
137+
138+
When I run `wp theme activate p2`
139+
Then STDOUT should not be empty
140+
141+
# Ensure no other themes interfere with update.
142+
When I run `wp theme list --status=inactive --field=name | xargs wp theme delete`
143+
Then STDOUT should contain:
144+
"""
145+
Success: Deleted
146+
"""
130147

131148
When I run `wp theme status p2`
132149
Then STDOUT should contain:
133-
""""
150+
"""
134151
Update available
135-
""""
152+
"""
136153

137154
When I run `wp theme update --all --exclude=p2 | grep 'Skipped'`
138155
Then STDOUT should contain:
@@ -142,9 +159,9 @@ Feature: Manage WordPress themes
142159

143160
When I run `wp theme status p2`
144161
Then STDOUT should contain:
145-
""""
162+
"""
146163
Update available
147-
""""
164+
"""
148165

149166
Scenario: Get the path of an installed theme
150167
Given a WP install

features/upgradables.feature

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,12 @@ Feature: Manage WordPress themes and plugins
9090
"""
9191
And the {SUITE_CACHE_DIR}/<type>/<item>-{NEW_VERSION}.zip file should exist
9292

93-
When I run `wp <type> update --all`
94-
Then STDOUT should not be empty
93+
# This can throw warnings about versions being higher than expected.
94+
When I try `wp <type> update --all 2>&1`
95+
Then STDOUT should contain:
96+
"""
97+
updated
98+
"""
9599

96100
When I run `wp <type> status <item>`
97101
Then STDOUT should not contain:

0 commit comments

Comments
 (0)