Skip to content

Commit c7de1d9

Browse files
anomiexmatticbot
authored andcommitted
phpcs: Fix and enable Jetpack.PHPUnit.Attributes sniff (#43175)
Mostly this is the result of running phpcbf on files failing the sniff. Things needing manual cleanup were: * `projects/packages/image-cdn/tests/php/Image_CDN_Test.php`: Remove a broken `@covers` that had no space between the tag and class name. * `projects/plugins/jetpack/tests/php/core-api/WPCOM_REST_API_V2_Field_Controller_Test.php`: Fix a `@group` that was accidentally "rest-api\n\nphpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound". * `projects/plugins/jetpack/tests/php/core-api/wpcom-fields/WPCOM_REST_API_V2_Attachment_VideoPress_Data_Test.php`: * `projects/plugins/jetpack/tests/php/sync/Jetpack_Sync_Queue_TestBase.php`: Move some `@group`s from the file comment to class comment. * `projects/plugins/jetpack/tests/php/Functions_OpenGraph_Test.php`: * `projects/plugins/jetpack/tests/php/general/Jetpack_Client_Server_Test.php`: Fix where it got confused about whether a comment was a file or class comment. * `projects/plugins/jetpack/tests/php/json-api/Jetpack_Json_Api_Plugins_Endpoints_Test.php`: Fix `@covers` for nonexistent class. * `projects/plugins/jetpack/tests/php/modules/shortcodes/trait.http-request-cache.php`: * `projects/plugins/jetpack/tests/php/trait-woo-tests.php`: Manually fix, since the sniff doesn't recognize the trait as a test class. * Disable `PHPCompatibility.Attributes.NewAttributes.PHPUnitAttributeFound` in phpcompatibility-dev run. `PHPCompatibility.Attributes.NewAttributes.Found` was already disabled. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/14603283610 Upstream-Ref: Automattic/jetpack@c49fe68
1 parent 4d31324 commit c7de1d9

File tree

6 files changed

+23
-18
lines changed

6 files changed

+23
-18
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"type": "wordpress-plugin",
55
"license": "GPL-2.0-or-later",
66
"require": {
7-
"automattic/jetpack-device-detection": "^3.0.5"
7+
"automattic/jetpack-device-detection": "^3.0.6-alpha"
88
},
99
"require-dev": {
1010
"yoast/phpunit-polyfills": "^3.0.0",
11-
"automattic/jetpack-changelogger": "^6.0.4",
11+
"automattic/jetpack-changelogger": "^6.0.5-alpha",
1212
"automattic/phpunit-select-config": "^1.0.2"
1313
},
1414
"autoload": {

composer.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/automattic/jetpack-device-detection/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
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.6-alpha] - unreleased
9+
10+
This is an alpha version! The changes listed here are not final.
11+
812
## [3.0.5] - 2025-03-21
913
### Changed
1014
- Internal updates.
@@ -232,6 +236,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
232236

233237
- Moving jetpack_is_mobile into a package
234238

239+
[3.0.6-alpha]: https://github.com/Automattic/jetpack-device-detection/compare/v3.0.5...v3.0.6-alpha
235240
[3.0.5]: https://github.com/Automattic/jetpack-device-detection/compare/v3.0.4...v3.0.5
236241
[3.0.4]: https://github.com/Automattic/jetpack-device-detection/compare/v3.0.3...v3.0.4
237242
[3.0.3]: https://github.com/Automattic/jetpack-device-detection/compare/v3.0.2...v3.0.3

vendor/automattic/jetpack-device-detection/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"require-dev": {
1010
"yoast/phpunit-polyfills": "^3.0.0",
11-
"automattic/jetpack-changelogger": "^6.0.4",
11+
"automattic/jetpack-changelogger": "^6.0.5-alpha",
1212
"automattic/phpunit-select-config": "^1.0.2"
1313
},
1414
"suggest": {

vendor/composer/installed.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
"packages": [
33
{
44
"name": "automattic/jetpack-device-detection",
5-
"version": "3.0.5",
6-
"version_normalized": "3.0.5.0",
5+
"version": "3.0.6-alpha.1745351100",
6+
"version_normalized": "3.0.6.0-alpha1745351100",
77
"dist": {
88
"type": "path",
99
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
10-
"reference": "03f4308b70945b46767101f139d095fd7f796ad0"
10+
"reference": "a14c799385e95f39635bf247497b5d97ab15ddda"
1111
},
1212
"require": {
1313
"php": ">=7.2"
1414
},
1515
"require-dev": {
16-
"automattic/jetpack-changelogger": "^6.0.4",
16+
"automattic/jetpack-changelogger": "^6.0.5-alpha",
1717
"automattic/phpunit-select-config": "^1.0.2",
1818
"yoast/phpunit-polyfills": "^3.0.0"
1919
},

vendor/composer/installed.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
),
1212
'versions' => array(
1313
'automattic/jetpack-device-detection' => array(
14-
'pretty_version' => '3.0.5',
15-
'version' => '3.0.5.0',
16-
'reference' => '03f4308b70945b46767101f139d095fd7f796ad0',
14+
'pretty_version' => '3.0.6-alpha.1745351100',
15+
'version' => '3.0.6.0-alpha1745351100',
16+
'reference' => 'a14c799385e95f39635bf247497b5d97ab15ddda',
1717
'type' => 'jetpack-library',
1818
'install_path' => __DIR__ . '/../automattic/jetpack-device-detection',
1919
'aliases' => array(),

0 commit comments

Comments
 (0)