Skip to content

Commit

Permalink
Jetpack Connection: Add stricter check before updating 'jetpack_conne…
Browse files Browse the repository at this point in the history
…ction_active_plugins' option (#37755)

* Jetpack Connection: Add stricter check before updating 'jetpack_connection_active_plugins' option

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/9447346273

Upstream-Ref: Automattic/jetpack@8045378
  • Loading branch information
fgiannar authored and matticbot committed Jun 10, 2024
1 parent 87c6fb5 commit 8c55d41
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 103 deletions.
3 changes: 3 additions & 0 deletions jetpack_vendor/automattic/jetpack-connection/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ This is an alpha version! The changes listed here are not final.
### Added
- Staging: deprecating staging mode and separating the logic into is_development_site and in_safe_mode

### Fixed
- Jetpack Connection: Add stricter check before updating 'jetpack_connection_active_plugins' option

## [2.9.3] - 2024-06-06
### Added
- Add mechanism to track previously working plugins [#37537]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,12 @@ public static function maybe_update_active_connected_plugins() {

// If a plugin was activated or deactivated.
// self::$plugins is populated in Config::ensure_options_connection().
$number_of_plugins_differ = count( self::$plugins ) !== count( (array) get_option( self::ACTIVE_PLUGINS_OPTION_NAME, array() ) );
$configured_plugin_keys = array_keys( self::$plugins );
$stored_plugin_keys = array_keys( (array) get_option( self::ACTIVE_PLUGINS_OPTION_NAME, array() ) );
sort( $configured_plugin_keys );
sort( $stored_plugin_keys );

if ( $number_of_plugins_differ ) {
if ( $configured_plugin_keys !== $stored_plugin_keys ) {
self::update_active_plugins_option();
}
}
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
),
'jetpack-connection' => array(
'path' => 'jetpack_vendor/automattic/jetpack-connection',
'ver' => '2.10.0-alpha1717767165',
'ver' => '2.10.0-alpha1718018146',
),
'jetpack-ip' => array(
'path' => 'jetpack_vendor/automattic/jetpack-ip',
Expand Down
54 changes: 27 additions & 27 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
"reference": "ad28edd71b3caff1fc5d4e28296825e2ff6aa8e6"
"reference": "06df7a84ba589b004dc38f0b82c837f13ceef819"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -60,7 +60,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
"reference": "6fb5df9208673f67caf2918b228b9a26fbd8b467"
"reference": "c6fc9586117eb47bf417217ee3a63df59bc816fd"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -125,7 +125,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
"reference": "28a38c47161f9979f0b711b4406c4f828cbcdae1"
"reference": "4afb8b3b514a68f2aa07ff36043487ef504492af"
},
"require": {
"automattic/jetpack-constants": "^2.0.3",
Expand Down Expand Up @@ -194,7 +194,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
"reference": "256dab27f444400e9c48f96e1dbaa775f8a0e809"
"reference": "927eaa9b7ec5f393bdb232eb7f43ea2b8ce98ee8"
},
"require": {
"composer-plugin-api": "^1.1 || ^2.0",
Expand Down Expand Up @@ -261,7 +261,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-core",
"reference": "c8ce3e584e3841b639e36b6a0da0d6cbee590b5c"
"reference": "477716da3fc7e635027a20a9345aa57f544f0b93"
},
"require": {
"automattic/jetpack-connection": "^2.10.0-alpha",
Expand Down Expand Up @@ -329,7 +329,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-speed-score",
"reference": "12eb97c764877bf5228db8bf2387ebd5fbb2c9c4"
"reference": "6e689b5e0f4b25e257a658df56e22e1277a02a50"
},
"require": {
"automattic/jetpack-boost-core": "^0.2.7",
Expand Down Expand Up @@ -405,7 +405,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
"reference": "df4bee0a28e0ca60f1cbae579c03026a25811893"
"reference": "57b2a6dca67aeb301af193247512ab8cc82fde9a"
},
"require": {
"composer-plugin-api": "^2.1.0",
Expand Down Expand Up @@ -465,7 +465,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
"reference": "f26ac2c75b6c39b4344a00e85b6f405c9732a308"
"reference": "820ea47d3704c628a2316cc6adb1ecf64600503d"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -536,12 +536,12 @@
},
{
"name": "automattic/jetpack-connection",
"version": "2.10.0-alpha.1717767165",
"version_normalized": "2.10.0.0-alpha1717767165",
"version": "2.10.0-alpha.1718018146",
"version_normalized": "2.10.0.0-alpha1718018146",
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
"reference": "9249223cf6086941e58382bae44e7cc7b98d476e"
"reference": "a5fac34257218f67b2a1d129e04992caf9a89f7a"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^2.0.1",
Expand Down Expand Up @@ -628,7 +628,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
"reference": "163e21ca52bae47ded5b9ac62a0545aec8082c24"
"reference": "efd151412a8d73c25dab0d47fe295acaf97b8a95"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -682,7 +682,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "de15e4047c1b32e64bea05c9f36dcd342787e488"
"reference": "362fb51f9131549897aa277919dc202901b3f393"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -735,7 +735,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
"reference": "a31348b83a91f2aa3edf636f2ef499b62aab4d17"
"reference": "8d79e6c862fe137ee1c4798c0b115e6d0b875e1a"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -793,7 +793,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
"reference": "0d88d1bc65489803d52468dd7673a9d875ba6523"
"reference": "43139ec28e6aa53c0c61764f60951e9773db3585"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^2.0.1",
Expand Down Expand Up @@ -868,7 +868,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
"reference": "7b27175a7537157cd3f89d5fe9d276e8729211aa"
"reference": "54ed01ae2d2cb8e8e379f7f5ee65ae293d71f001"
},
"require": {
"automattic/jetpack-connection": "^2.10.0-alpha",
Expand Down Expand Up @@ -930,7 +930,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
"reference": "df4e132bce6c39fe9f09c57d30cb0c2d030c2a1d"
"reference": "90d7589360f12604da26e4849b99fc45df2e8d51"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -983,7 +983,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
"reference": "653091950fd7c420436b6e8bb1ef004f8f57db14"
"reference": "21063974becf84012d1020812097734acd1cff29"
},
"require": {
"automattic/jetpack-admin-ui": "^0.4.2",
Expand Down Expand Up @@ -1082,7 +1082,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
"reference": "e28ebb39f644475be261348e4d3d8c326506576b"
"reference": "931009856b9a2dc009d863fc75d241244ca7b1df"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -1143,7 +1143,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
"reference": "30b21ce69c397c7040ba1cce559120d51fb19566"
"reference": "6eae7dbbafdf6eef8c2823c356cb6a776f7ac90f"
},
"require": {
"automattic/jetpack-connection": "^2.10.0-alpha",
Expand Down Expand Up @@ -1211,7 +1211,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
"reference": "81bc7d7fa46d799d5aa864152f087a2f7cf10403"
"reference": "9b81c1d178882114e2942eeea207817d09d9ed6d"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^2.0.1",
Expand Down Expand Up @@ -1267,7 +1267,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
"reference": "1393d4b5a9d0a6226607263b2dcaa69eb4197ba5"
"reference": "36900bdad8d98d533b31af0117e647cea1872200"
},
"require": {
"automattic/jetpack-status": "^3.3.0-alpha",
Expand Down Expand Up @@ -1322,7 +1322,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
"reference": "3f5c52ca40922edfecf178ecaeff04c02da609f0"
"reference": "dde99984944503b841a609ac0e8720a3a008bb41"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -1376,7 +1376,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-search",
"reference": "588e8bd8ca187b31250d532a97958de9b61abe60"
"reference": "dc1dace53518d1df6ebbf4d77143dd2bde9d568a"
},
"require": {
"automattic/jetpack-assets": "^2.1.12",
Expand Down Expand Up @@ -1464,7 +1464,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-stats",
"reference": "e2d4213448aaba92bea796b5060e756c8b7be2e2"
"reference": "64991c0a4be81b41e0959ac048cf95007e985349"
},
"require": {
"automattic/jetpack-connection": "^2.10.0-alpha",
Expand Down Expand Up @@ -1531,7 +1531,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
"reference": "aa80756839fca1624faf93da50a65d416dde54ff"
"reference": "cdc3e0e4b9fa91054505976116bfaf5788baf3fb"
},
"require": {
"automattic/jetpack-constants": "^2.0.3",
Expand Down Expand Up @@ -1596,7 +1596,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
"reference": "204d076225eb3ccc4c791ee89af4357d34532070"
"reference": "6fdccaa3d7a66db677e52ebf70c90fa931baa613"
},
"require": {
"automattic/jetpack-connection": "^2.10.0-alpha",
Expand Down
Loading

0 comments on commit 8c55d41

Please sign in to comment.