Skip to content

Commit dad3772

Browse files
anomiexmatticbot
authored andcommitted
phpunit: Use phpunit-select-config, and some cleanup (#42266)
* Remove obsolete polyfills * gitignore `.phpunit.cache` by default * production-exclude `phpunit.xml.dist` and `phpunit.*.xml.dist` by default * production-exclude tests dirs * Use phpunit-select-config everywhere * cli: Support copying symlinks for `jetpack generate` Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/13813825579 Upstream-Ref: Automattic/jetpack@237f3f5
1 parent 10bd7bf commit dad3772

26 files changed

+111
-122
lines changed

composer.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
"name": "automattic/jetpackcrm",
33
"description": "[Jetpack CRM](https://jetpackcrm.com) Core CRM Plugin - WordPress.org Hosted",
44
"require-dev": {
5-
"automattic/jetpack-changelogger": "^6.0.0",
5+
"automattic/jetpack-changelogger": "^6.0.1-alpha",
66
"codeception/codeception": "^4.1 || ^5.0",
77
"codeception/module-asserts": "^2.0 || ^3.0",
88
"codeception/module-phpbrowser": "^2.0 || ^3.0",
99
"codeception/module-webdriver": "^2.0 || ^3.0 || ^4.0",
1010
"codeception/module-db": "^2.0 || 3.1.0 || ^3.1.2",
1111
"codeception/module-filesystem": "^2.0 || ^3.0",
1212
"codeception/util-universalframework": "^1.0",
13-
"yoast/phpunit-polyfills": "^1.1.1"
13+
"yoast/phpunit-polyfills": "^1.1.1",
14+
"automattic/phpunit-select-config": "^1.0.1-alpha"
1415
},
1516
"scripts": {
1617
"build-development": [
@@ -20,7 +21,7 @@
2021
"pnpm run build-production"
2122
],
2223
"test-coverage": [
23-
"php -dpcov.directory=. ./vendor/bin/phpunit --coverage-php \"$COVERAGE_DIR/php.cov\""
24+
"php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\""
2425
],
2526
"tests": "vendor/bin/codecept run acceptance --fail-fast",
2627
"tests-debug": "vendor/bin/codecept run acceptance --fail-fast --debug",
@@ -31,7 +32,7 @@
3132
"cs-staged": "temp=$(git diff --diff-filter=d --name-only --cached | grep '.php'); [[ -n $temp ]] && phpcs-changed -s --always-exit-zero --git --git-staged $temp || echo 'No changes found.'",
3233
"cs-unstaged": "temp=$(git diff --diff-filter=d --name-only | grep '.php'); [[ -n $temp ]] && phpcs-changed -s --always-exit-zero --git --git-unstaged $temp || echo 'No changes found.'",
3334
"phpunit": [
34-
"./vendor/phpunit/phpunit/phpunit --colors=always"
35+
"phpunit-select-config phpunit.#.xml.dist --colors=always"
3536
],
3637
"skip-test-php": "tests/action-skip-test-php.sh",
3738
"test-php": [
@@ -54,9 +55,9 @@
5455
},
5556
"require": {
5657
"php": ">=7.4",
57-
"automattic/jetpack-assets": "^4.0.10",
58-
"automattic/jetpack-autoloader": "^5.0.2",
59-
"automattic/jetpack-composer-plugin": "^4.0.2",
58+
"automattic/jetpack-assets": "^4.0.11-alpha",
59+
"automattic/jetpack-autoloader": "^5.0.3-alpha",
60+
"automattic/jetpack-composer-plugin": "^4.0.3-alpha",
6061
"automattic/woocommerce": "^3.1",
6162
"dompdf/dompdf": "^2.0"
6263
},

jetpack_vendor/automattic/jetpack-assets/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [4.0.11-alpha] - unreleased
9+
10+
This is an alpha version! The changes listed here are not final.
11+
812
## [4.0.10] - 2025-03-05
913
### Changed
1014
- Internal updates.
@@ -576,6 +580,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
576580

577581
- Statically access asset tools
578582

583+
[4.0.11-alpha]: https://github.com/Automattic/jetpack-assets/compare/v4.0.10...v4.0.11-alpha
579584
[4.0.10]: https://github.com/Automattic/jetpack-assets/compare/v4.0.9...v4.0.10
580585
[4.0.9]: https://github.com/Automattic/jetpack-assets/compare/v4.0.8...v4.0.9
581586
[4.0.8]: https://github.com/Automattic/jetpack-assets/compare/v4.0.7...v4.0.8

jetpack_vendor/automattic/jetpack-assets/composer.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
"license": "GPL-2.0-or-later",
66
"require": {
77
"php": ">=7.2",
8-
"automattic/jetpack-constants": "^3.0.3"
8+
"automattic/jetpack-constants": "^3.0.4-alpha"
99
},
1010
"require-dev": {
1111
"brain/monkey": "^2.6.2",
1212
"yoast/phpunit-polyfills": "^1.1.1",
13-
"automattic/jetpack-changelogger": "^6.0.0",
14-
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0 || ^3.0"
13+
"automattic/jetpack-changelogger": "^6.0.1-alpha",
14+
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0 || ^3.0",
15+
"automattic/phpunit-select-config": "^1.0.1-alpha"
1516
},
1617
"suggest": {
1718
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
@@ -32,9 +33,9 @@
3233
"pnpm run build-production"
3334
],
3435
"phpunit": [
35-
"./vendor/phpunit/phpunit/phpunit --colors=always"
36+
"phpunit-select-config phpunit.#.xml.dist --colors=always"
3637
],
37-
"test-coverage": "pnpm concurrently --names php,js 'php -dpcov.directory=. ./vendor/bin/phpunit --coverage-php \"$COVERAGE_DIR/php.cov\"' 'pnpm:test-coverage'",
38+
"test-coverage": "pnpm concurrently --names php,js 'php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\"' 'pnpm:test-coverage'",
3839
"test-js": [
3940
"pnpm run test"
4041
],

jetpack_vendor/automattic/jetpack-constants/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.0.4-alpha] - unreleased
9+
10+
This is an alpha version! The changes listed here are not final.
11+
812
## [3.0.3] - 2025-03-05
913
### Changed
1014
- Internal updates.
@@ -194,6 +198,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
194198

195199
- Packages: Finish the constants package
196200

201+
[3.0.4-alpha]: https://github.com/Automattic/jetpack-constants/compare/v3.0.3...v3.0.4-alpha
197202
[3.0.3]: https://github.com/Automattic/jetpack-constants/compare/v3.0.2...v3.0.3
198203
[3.0.2]: https://github.com/Automattic/jetpack-constants/compare/v3.0.1...v3.0.2
199204
[3.0.1]: https://github.com/Automattic/jetpack-constants/compare/v3.0.0...v3.0.1

jetpack_vendor/automattic/jetpack-constants/composer.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"require-dev": {
1010
"brain/monkey": "^2.6.2",
1111
"yoast/phpunit-polyfills": "^1.1.1",
12-
"automattic/jetpack-changelogger": "^6.0.0"
12+
"automattic/jetpack-changelogger": "^6.0.1-alpha",
13+
"automattic/phpunit-select-config": "^1.0.1-alpha"
1314
},
1415
"suggest": {
1516
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
@@ -21,10 +22,10 @@
2122
},
2223
"scripts": {
2324
"phpunit": [
24-
"./vendor/phpunit/phpunit/phpunit --colors=always"
25+
"phpunit-select-config phpunit.#.xml.dist --colors=always"
2526
],
2627
"test-coverage": [
27-
"php -dpcov.directory=. ./vendor/bin/phpunit --coverage-php \"$COVERAGE_DIR/php.cov\""
28+
"php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\""
2829
],
2930
"test-php": [
3031
"@composer phpunit"

jetpack_vendor/i18n-map.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
'packages' => array(
77
'jetpack-assets' => array(
88
'path' => 'jetpack_vendor/automattic/jetpack-assets',
9-
'ver' => '4.0.10',
9+
'ver' => '4.0.11-alpha1741789611',
1010
),
1111
),
1212
);

phpunit.xml.dist

-28
This file was deleted.

vendor/autoload_packages.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package automattic/jetpack-autoloader
66
*/
77

8-
namespace Automattic\Jetpack\Autoloader\jp06c775433a83ed276f0a1d8ac25f93ba_crmⓥ6_6_0_alpha\al5_0_2;
8+
namespace Automattic\Jetpack\Autoloader\jp06c775433a83ed276f0a1d8ac25f93ba_crmⓥ6_6_0_alpha\al5_0_3_alpha;
99

1010
// phpcs:ignore
1111

vendor/composer/installed.json

+29-25
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
"packages": [
33
{
44
"name": "automattic/jetpack-assets",
5-
"version": "4.0.10",
6-
"version_normalized": "4.0.10.0",
5+
"version": "4.0.11-alpha.1741789611",
6+
"version_normalized": "4.0.11.0-alpha1741789611",
77
"dist": {
88
"type": "path",
99
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
10-
"reference": "d725c4ce0a79df2985715523cd3d60e51aba56b5"
10+
"reference": "5e33f491c4f5df403879045c1a209e0d57e4554d"
1111
},
1212
"require": {
13-
"automattic/jetpack-constants": "^3.0.3",
13+
"automattic/jetpack-constants": "^3.0.4-alpha",
1414
"php": ">=7.2"
1515
},
1616
"require-dev": {
17-
"automattic/jetpack-changelogger": "^6.0.0",
17+
"automattic/jetpack-changelogger": "^6.0.1-alpha",
18+
"automattic/phpunit-select-config": "^1.0.1-alpha",
1819
"brain/monkey": "^2.6.2",
1920
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0 || ^3.0",
2021
"yoast/phpunit-polyfills": "^1.1.1"
@@ -51,10 +52,10 @@
5152
"pnpm run build-production"
5253
],
5354
"phpunit": [
54-
"./vendor/phpunit/phpunit/phpunit --colors=always"
55+
"phpunit-select-config phpunit.#.xml.dist --colors=always"
5556
],
5657
"test-coverage": [
57-
"pnpm concurrently --names php,js 'php -dpcov.directory=. ./vendor/bin/phpunit --coverage-php \"$COVERAGE_DIR/php.cov\"' 'pnpm:test-coverage'"
58+
"pnpm concurrently --names php,js 'php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\"' 'pnpm:test-coverage'"
5859
],
5960
"test-js": [
6061
"pnpm run test"
@@ -74,19 +75,20 @@
7475
},
7576
{
7677
"name": "automattic/jetpack-autoloader",
77-
"version": "5.0.2",
78-
"version_normalized": "5.0.2.0",
78+
"version": "5.0.3-alpha.1741789611",
79+
"version_normalized": "5.0.3.0-alpha1741789611",
7980
"dist": {
8081
"type": "path",
8182
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
82-
"reference": "9931de05dc9e86e31dde570aaddd4ce1da0d6183"
83+
"reference": "4817a1dcb3a2dff94e5b1a4e63b12e928b78554e"
8384
},
8485
"require": {
8586
"composer-plugin-api": "^2.2",
8687
"php": ">=7.2"
8788
},
8889
"require-dev": {
89-
"automattic/jetpack-changelogger": "^6.0.0",
90+
"automattic/jetpack-changelogger": "^6.0.1-alpha",
91+
"automattic/phpunit-select-config": "^1.0.1-alpha",
9092
"composer/composer": "^2.2",
9193
"yoast/phpunit-polyfills": "^1.1.1"
9294
},
@@ -116,10 +118,10 @@
116118
},
117119
"scripts": {
118120
"phpunit": [
119-
"./vendor/phpunit/phpunit/phpunit --colors=always"
121+
"phpunit-select-config phpunit.#.xml.dist --colors=always"
120122
],
121123
"test-coverage": [
122-
"php -dpcov.directory=. ./vendor/bin/phpunit --coverage-php \"./tests/php/tmp/coverage-report.php\"",
124+
"php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"./tests/php/tmp/coverage-report.php\"",
123125
"php ./tests/php/bin/test-coverage.php \"$COVERAGE_DIR/php.cov\""
124126
],
125127
"test-php": [
@@ -145,19 +147,20 @@
145147
},
146148
{
147149
"name": "automattic/jetpack-composer-plugin",
148-
"version": "4.0.2",
149-
"version_normalized": "4.0.2.0",
150+
"version": "4.0.3-alpha.1741789611",
151+
"version_normalized": "4.0.3.0-alpha1741789611",
150152
"dist": {
151153
"type": "path",
152154
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
153-
"reference": "5419b77a77d4e1dd0a37f93578c0d75f8897dee0"
155+
"reference": "7b0f3557e82c06150fea9d5439c78b69f074905d"
154156
},
155157
"require": {
156158
"composer-plugin-api": "^2.2",
157159
"php": ">=7.2"
158160
},
159161
"require-dev": {
160-
"automattic/jetpack-changelogger": "^6.0.0",
162+
"automattic/jetpack-changelogger": "^6.0.1-alpha",
163+
"automattic/phpunit-select-config": "^1.0.1-alpha",
161164
"composer/composer": "^2.2",
162165
"yoast/phpunit-polyfills": "^1.1.1"
163166
},
@@ -182,10 +185,10 @@
182185
},
183186
"scripts": {
184187
"phpunit": [
185-
"./vendor/phpunit/phpunit/phpunit --colors=always"
188+
"phpunit-select-config phpunit.#.xml.dist --colors=always"
186189
],
187190
"test-coverage": [
188-
"php -dpcov.directory=. ./vendor/bin/phpunit --coverage-php \"$COVERAGE_DIR/php.cov\""
191+
"php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\""
189192
],
190193
"test-php": [
191194
"@composer phpunit"
@@ -208,18 +211,19 @@
208211
},
209212
{
210213
"name": "automattic/jetpack-constants",
211-
"version": "3.0.3",
212-
"version_normalized": "3.0.3.0",
214+
"version": "3.0.4-alpha.1741789611",
215+
"version_normalized": "3.0.4.0-alpha1741789611",
213216
"dist": {
214217
"type": "path",
215218
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
216-
"reference": "3f48ac30d01f4839683bf5a9a8434647b2a32ed4"
219+
"reference": "33cecfa6ff42ebeb89464b8b201d265fea165892"
217220
},
218221
"require": {
219222
"php": ">=7.2"
220223
},
221224
"require-dev": {
222-
"automattic/jetpack-changelogger": "^6.0.0",
225+
"automattic/jetpack-changelogger": "^6.0.1-alpha",
226+
"automattic/phpunit-select-config": "^1.0.1-alpha",
223227
"brain/monkey": "^2.6.2",
224228
"yoast/phpunit-polyfills": "^1.1.1"
225229
},
@@ -245,10 +249,10 @@
245249
},
246250
"scripts": {
247251
"phpunit": [
248-
"./vendor/phpunit/phpunit/phpunit --colors=always"
252+
"phpunit-select-config phpunit.#.xml.dist --colors=always"
249253
],
250254
"test-coverage": [
251-
"php -dpcov.directory=. ./vendor/bin/phpunit --coverage-php \"$COVERAGE_DIR/php.cov\""
255+
"php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\""
252256
],
253257
"test-php": [
254258
"@composer phpunit"

vendor/composer/installed.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,36 @@
1111
),
1212
'versions' => array(
1313
'automattic/jetpack-assets' => array(
14-
'pretty_version' => '4.0.10',
15-
'version' => '4.0.10.0',
16-
'reference' => 'd725c4ce0a79df2985715523cd3d60e51aba56b5',
14+
'pretty_version' => '4.0.11-alpha.1741789611',
15+
'version' => '4.0.11.0-alpha1741789611',
16+
'reference' => '5e33f491c4f5df403879045c1a209e0d57e4554d',
1717
'type' => 'jetpack-library',
1818
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-assets',
1919
'aliases' => array(),
2020
'dev_requirement' => false,
2121
),
2222
'automattic/jetpack-autoloader' => array(
23-
'pretty_version' => '5.0.2',
24-
'version' => '5.0.2.0',
25-
'reference' => '9931de05dc9e86e31dde570aaddd4ce1da0d6183',
23+
'pretty_version' => '5.0.3-alpha.1741789611',
24+
'version' => '5.0.3.0-alpha1741789611',
25+
'reference' => '4817a1dcb3a2dff94e5b1a4e63b12e928b78554e',
2626
'type' => 'composer-plugin',
2727
'install_path' => __DIR__ . '/../automattic/jetpack-autoloader',
2828
'aliases' => array(),
2929
'dev_requirement' => false,
3030
),
3131
'automattic/jetpack-composer-plugin' => array(
32-
'pretty_version' => '4.0.2',
33-
'version' => '4.0.2.0',
34-
'reference' => '5419b77a77d4e1dd0a37f93578c0d75f8897dee0',
32+
'pretty_version' => '4.0.3-alpha.1741789611',
33+
'version' => '4.0.3.0-alpha1741789611',
34+
'reference' => '7b0f3557e82c06150fea9d5439c78b69f074905d',
3535
'type' => 'composer-plugin',
3636
'install_path' => __DIR__ . '/../automattic/jetpack-composer-plugin',
3737
'aliases' => array(),
3838
'dev_requirement' => false,
3939
),
4040
'automattic/jetpack-constants' => array(
41-
'pretty_version' => '3.0.3',
42-
'version' => '3.0.3.0',
43-
'reference' => '3f48ac30d01f4839683bf5a9a8434647b2a32ed4',
41+
'pretty_version' => '3.0.4-alpha.1741789611',
42+
'version' => '3.0.4.0-alpha1741789611',
43+
'reference' => '33cecfa6ff42ebeb89464b8b201d265fea165892',
4444
'type' => 'jetpack-library',
4545
'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-constants',
4646
'aliases' => array(),

0 commit comments

Comments
 (0)