Bump jetpack connection, stats and constants (#50471)

* Bump jetpack-connection package

* Fix deprecated is_staging_site

* Add required declare( strict_types = 1)

* Revert -- Add required declare( strict_types = 1)

* Bump Stats versions

* Add changelog
This commit is contained in:
Miguel Pérez Pellicer 2024-08-08 18:19:46 +02:00 committed by GitHub
parent 79ccf3a77f
commit c6732011d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 437 additions and 328 deletions

View File

@ -625,16 +625,16 @@
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.10.1",
"version": "3.10.2",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
"reference": "8f90f7a53ce271935282967f53d0894f8f1ff877"
"reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877",
"reference": "8f90f7a53ce271935282967f53d0894f8f1ff877",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017",
"reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017",
"shasum": ""
},
"require": {
@ -701,7 +701,7 @@
"type": "open_collective"
}
],
"time": "2024-05-22T21:24:41+00:00"
"time": "2024-07-21T23:26:44+00:00"
},
{
"name": "suin/phpcs-psr4-sniff",

View File

@ -222,16 +222,16 @@
},
{
"name": "mck89/peast",
"version": "v1.16.2",
"version": "v1.16.3",
"source": {
"type": "git",
"url": "https://github.com/mck89/peast.git",
"reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe"
"reference": "645ec21b650bc2aced18285c85f220d22afc1430"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mck89/peast/zipball/2791b08ffcc1862fe18eef85675da3aa58c406fe",
"reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe",
"url": "https://api.github.com/repos/mck89/peast/zipball/645ec21b650bc2aced18285c85f220d22afc1430",
"reference": "645ec21b650bc2aced18285c85f220d22afc1430",
"shasum": ""
},
"require": {
@ -244,7 +244,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.16.2-dev"
"dev-master": "1.16.3-dev"
}
},
"autoload": {
@ -265,9 +265,9 @@
"description": "Peast is PHP library that generates AST for JavaScript code",
"support": {
"issues": "https://github.com/mck89/peast/issues",
"source": "https://github.com/mck89/peast/tree/v1.16.2"
"source": "https://github.com/mck89/peast/tree/v1.16.3"
},
"time": "2024-03-05T09:16:03+00:00"
"time": "2024-07-23T14:00:32+00:00"
},
{
"name": "mustache/mustache",
@ -373,16 +373,16 @@
},
{
"name": "wp-cli/i18n-command",
"version": "2.6.1",
"version": "v2.6.2",
"source": {
"type": "git",
"url": "https://github.com/wp-cli/i18n-command.git",
"reference": "7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1"
"reference": "53518a11f314119e320597c7a8274f11b1295bdc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1",
"reference": "7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1",
"url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/53518a11f314119e320597c7a8274f11b1295bdc",
"reference": "53518a11f314119e320597c7a8274f11b1295bdc",
"shasum": ""
},
"require": {
@ -436,9 +436,9 @@
"homepage": "https://github.com/wp-cli/i18n-command",
"support": {
"issues": "https://github.com/wp-cli/i18n-command/issues",
"source": "https://github.com/wp-cli/i18n-command/tree/2.6.1"
"source": "https://github.com/wp-cli/i18n-command/tree/v2.6.2"
},
"time": "2024-02-28T11:27:34+00:00"
"time": "2024-07-03T12:50:00+00:00"
},
{
"name": "wp-cli/mustangostang-spyc",
@ -556,16 +556,16 @@
},
{
"name": "wp-cli/wp-cli",
"version": "v2.10.0",
"version": "v2.11.0",
"source": {
"type": "git",
"url": "https://github.com/wp-cli/wp-cli.git",
"reference": "a339dca576df73c31af4b4d8054efc2dab9a0685"
"reference": "53f0df112901fcf95099d0f501912a209429b6a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/a339dca576df73c31af4b4d8054efc2dab9a0685",
"reference": "a339dca576df73c31af4b4d8054efc2dab9a0685",
"url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/53f0df112901fcf95099d0f501912a209429b6a9",
"reference": "53f0df112901fcf95099d0f501912a209429b6a9",
"shasum": ""
},
"require": {
@ -595,7 +595,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.10.x-dev"
"dev-main": "2.11.x-dev"
}
},
"autoload": {
@ -622,7 +622,7 @@
"issues": "https://github.com/wp-cli/wp-cli/issues",
"source": "https://github.com/wp-cli/wp-cli"
},
"time": "2024-02-08T16:52:43+00:00"
"time": "2024-08-08T03:04:55+00:00"
}
],
"aliases": [],

View File

@ -0,0 +1,4 @@
Significance: minor
Type: tweak
Bump Jetpack COnnection, Jetpack Constants and a8c MC Stats

View File

@ -19,11 +19,11 @@
],
"require": {
"php": ">=7.4",
"automattic/jetpack-a8c-mc-stats": "^1.4",
"automattic/jetpack-a8c-mc-stats": "^2.0.1",
"automattic/jetpack-autoloader": "2.11.18",
"automattic/jetpack-config": "1.15.2",
"automattic/jetpack-connection": "^1.57",
"automattic/jetpack-constants": "^1.6.22",
"automattic/jetpack-connection": "^2.10.1",
"automattic/jetpack-constants": "^2.0.3",
"composer/installers": "^1.9",
"maxmind-db/reader": "^1.11",
"pelago/emogrifier": "^6.0",

File diff suppressed because it is too large Load Diff

View File

@ -112,13 +112,20 @@ class WC_Tracker {
* However, there are version of JP where \Automattic\Jetpack\Status exists, but does *not* contain is_staging_site method,
* so with those, code still needs to use the previous check as a fallback.
*
* After upgrading Jetpack Status to v3.3.2 is_staging_site is also deprecated and in_safe_mode is the new replacement.
* So we check this first of all.
*
* @return bool
*/
private static function is_jetpack_staging_site() {
if ( class_exists( '\Automattic\Jetpack\Status' ) ) {
// Preferred way of checking with Jetpack 8.1+.
$jp_status = new \Automattic\Jetpack\Status();
if ( is_callable( array( $jp_status, 'is_staging_site' ) ) ) {
if ( is_callable( array( $jp_status, 'in_safe_mode' ) ) ) {
return $jp_status->in_safe_mode();
} elseif ( is_callable( array( $jp_status, 'is_staging_site' ) ) ) {
// Preferred way of checking with Jetpack 8.1+.
return $jp_status->is_staging_site();
}
}