Skip to content

Commit

Permalink
Connection: remove deprecated code from connected plugins component (…
Browse files Browse the repository at this point in the history
…#39375)

Remove the long deprecated remains of the "soft disconnect" functionality which hasn't been in use since 2022.

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

Upstream-Ref: Automattic/jetpack@caf8dcd
  • Loading branch information
sergeymitr authored and matticbot committed Sep 12, 2024
1 parent 21a9825 commit 545c0ce
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 191 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 @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

This is an alpha version! The changes listed here are not final.

### Removed
- Remove deprecated code from connected plugins component.

### Fixed
- Fix the connected plugins option on multisites.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ class Plugin_Storage {

const ACTIVE_PLUGINS_OPTION_NAME = 'jetpack_connection_active_plugins';

/**
* Options where disabled plugins were stored
*
* @deprecated since 1.39.0.
* @var string
*/
const PLUGINS_DISABLED_OPTION_NAME = 'jetpack_connection_disabled_plugins';

/**
* Transient name used as flag to indicate that the active connected plugins list needs refreshing.
*/
Expand Down Expand Up @@ -93,13 +85,9 @@ public static function get_one( $slug ) {
* Even if you don't use Jetpack Config, it may be introduced later by other plugins,
* so please make sure not to run the method too early in the code.
*
* @since 1.39.0 deprecated the $connected_only argument.
*
* @param null $deprecated null plugins that were explicitly disconnected. Deprecated, there's no such a thing as disconnecting only specific plugins anymore.
*
* @return array|WP_Error
*/
public static function get_all( $deprecated = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
public static function get_all() {
$maybe_error = self::ensure_configured();

if ( $maybe_error instanceof WP_Error ) {
Expand Down Expand Up @@ -237,43 +225,6 @@ public static function update_active_plugins_option() {
}
}

/**
* Add the plugin to the set of disconnected ones.
*
* @deprecated since 1.39.0.
*
* @param string $slug Plugin slug.
*
* @return bool
*/
public static function disable_plugin( $slug ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
return true;
}

/**
* Remove the plugin from the set of disconnected ones.
*
* @deprecated since 1.39.0.
*
* @param string $slug Plugin slug.
*
* @return bool
*/
public static function enable_plugin( $slug ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
return true;
}

/**
* Get all plugins that were disconnected by user.
*
* @deprecated since 1.39.0.
*
* @return array
*/
public static function get_all_disabled_plugins() { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
return array();
}

/**
* Update active plugins option with current list of active plugins on WPCOM.
* This is a fallback to ensure this option is always up to date on WPCOM in case
Expand Down
32 changes: 0 additions & 32 deletions jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,36 +87,4 @@ public function is_only() {

return ! $plugins || ( array_key_exists( $this->slug, $plugins ) && 1 === count( $plugins ) );
}

/**
* Add the plugin to the set of disconnected ones.
*
* @deprecated since 1.39.0.
*
* @return bool
*/
public function disable() {
return true;
}

/**
* Remove the plugin from the set of disconnected ones.
*
* @deprecated since 1.39.0.
*
* @return bool
*/
public function enable() {
return true;
}

/**
* Whether this plugin is allowed to use the connection.
*
* @deprecated since 11.0
* @return bool
*/
public function is_enabled() {
return true;
}
}
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' => '4.0.3-alpha1726080715',
'ver' => '4.0.3-alpha1726149962',
),
'jetpack-explat' => array(
'path' => 'jetpack_vendor/automattic/jetpack-explat',
Expand Down
60 changes: 30 additions & 30 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": "e696c84fd6141a5970f0609fb436ab0e6545d54a"
"reference": "0da7a06dd32104e323a15bdb44e4e017e9d8968f"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -60,7 +60,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
"reference": "14ef3128f40528d15d9107527ad888d50eda814d"
"reference": "a6e7ca0256ad6bf1968d9476a719c9dc66c4c0de"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -125,7 +125,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
"reference": "95c489d4539074255ae7200ff3c1ff6ec9d9e9fc"
"reference": "5dd2a98090e36f18b87343e14d625586680e2d8d"
},
"require": {
"automattic/jetpack-constants": "^2.0.4",
Expand Down Expand Up @@ -194,7 +194,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
"reference": "11fd34f972a38e1732a43389cc7be47ac8af5d15"
"reference": "08032d6e031d804fa90d2171fe9c6ace6845c8ff"
},
"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": "10a22770ef297722d4de2b99f8908e33f8b514e4"
"reference": "fef9308001c528ef30779a5b4107e31d89ebcb48"
},
"require": {
"automattic/jetpack-connection": "^4.0.3-alpha",
Expand Down Expand Up @@ -329,7 +329,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-speed-score",
"reference": "c057b6dbf65349f4963ea157d7fbe498427ee075"
"reference": "649bed313f0ef6e6f5ec3e3e8ed363037a17dd02"
},
"require": {
"automattic/jetpack-boost-core": "^0.2.11",
Expand Down Expand Up @@ -405,7 +405,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
"reference": "02a7feaabc0ea79035b9bc7075861a9c1d46bf06"
"reference": "96dad072e07039f33778dd6ea23cafc0d7c2282c"
},
"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": "fe9319259c39f02926365893dbee6336fac868be"
"reference": "ce7f9967da7f579f3c303edbdaefdfea8bff6795"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -535,12 +535,12 @@
},
{
"name": "automattic/jetpack-connection",
"version": "4.0.3-alpha.1726080715",
"version_normalized": "4.0.3.0-alpha1726080715",
"version": "4.0.3-alpha.1726149962",
"version_normalized": "4.0.3.0-alpha1726149962",
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
"reference": "bc2c96bca9cdfb056cd5f52bf39ce4395f7ccc46"
"reference": "b50985f0d8c2a2c6db20592a292132c4e0248a64"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^2.0.2",
Expand Down Expand Up @@ -630,7 +630,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
"reference": "7747ea69281cd5e355239e5d8596965dcc0be608"
"reference": "bf596b62f8c95a215026efbce19c2401901db590"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -684,7 +684,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "96632526cde8f5eaddc4bbe85706ec8e1ca0acef"
"reference": "fecbd23128f9ddfee6f72aea5c7ae609ad0ebcb9"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -737,7 +737,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-explat",
"reference": "ea9f08f7413302ce54a6295316aceecec6926b12"
"reference": "90ad0ba4094e57cdc4a0730a2579f9f2f8ae0c5d"
},
"require": {
"automattic/jetpack-connection": "^4.0.3-alpha",
Expand Down Expand Up @@ -812,7 +812,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
"reference": "241fad1f3349834c11f6a41dc38e075c54718c0d"
"reference": "77793e8e8e8529639cb62780cc3c565c3cbdd02d"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -870,7 +870,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
"reference": "4ff0df9938df762745649b223aa6755e564859de"
"reference": "599a571133c028ed87fafeac97b85d2139dd541b"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^2.0.2",
Expand Down Expand Up @@ -945,7 +945,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
"reference": "c6d7d73e3d32142f9d813fa854f992247e0d7f32"
"reference": "0df9b4e02a73e5219d0cc2a683ed77570f1662e4"
},
"require": {
"automattic/jetpack-connection": "^4.0.3-alpha",
Expand Down Expand Up @@ -1007,7 +1007,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
"reference": "5b344c6ec06c7b1e83f33fa288c1332d8f1d61d6"
"reference": "b8d250dbba474fc8543fac1e2f8f9e04d6c3d7af"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -1060,7 +1060,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
"reference": "9aefcc6421e01189235d45daf83a618f44663e79"
"reference": "4304c718f81cf641090b8c5fa9bb47548a51a3d0"
},
"require": {
"automattic/jetpack-admin-ui": "^0.4.5",
Expand Down Expand Up @@ -1162,7 +1162,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
"reference": "a41482c091a992b9d74970e7eef15bc1d1d48f47"
"reference": "5836d695f9dd33b8b3aa338f0ddb74a4c7b3bbba"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -1223,7 +1223,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
"reference": "5098f281e86552a8656d2e62666b467d0fbba0f6"
"reference": "d5e65fc238a03e47672039be83dc1787b913c06d"
},
"require": {
"automattic/jetpack-connection": "^4.0.3-alpha",
Expand Down Expand Up @@ -1291,7 +1291,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
"reference": "0dd170113569b103d24d9b4928120e804028ff9a"
"reference": "fce6fab716977d6b108d4a1746e271ca34a97e31"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^2.0.2",
Expand Down Expand Up @@ -1347,7 +1347,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-models",
"reference": "963f5361278ad8ff2ada9879dcd0a0b35185b2f8"
"reference": "53712c15bbb964792517cc522df1a37c94d83ff9"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -1417,7 +1417,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-status",
"reference": "ce23a0519a17caaa216de7ed29317a8587a33a53"
"reference": "64ac6d5cd4f8947590aab229c339a13b1dcd8661"
},
"require": {
"automattic/jetpack-connection": "^4.0.3-alpha",
Expand Down Expand Up @@ -1492,7 +1492,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
"reference": "5cbd40bedf45ba045374c62ba3f6ac00742a08f8"
"reference": "e864dc1bec56cbe2476e455f04ffa9c19bf87369"
},
"require": {
"automattic/jetpack-status": "^4.0.1",
Expand Down Expand Up @@ -1547,7 +1547,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
"reference": "6a6185108fb404daff2e2a675d2d69ad7c523df8"
"reference": "60af8ee2c5174e23c9c336f1118f75ae2baa15d4"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -1601,7 +1601,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-search",
"reference": "35244f6cdb8fa1c786880661504c264c4897e39e"
"reference": "071ca1c648effffb458d0ebe892caae595b76631"
},
"require": {
"automattic/jetpack-assets": "^2.3.8",
Expand Down Expand Up @@ -1689,7 +1689,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-stats",
"reference": "9bcbfd853874db9f10033cb714cdf0ac45df5136"
"reference": "01c0a4b6a688d0d6f085e22595e462f392241908"
},
"require": {
"automattic/jetpack-connection": "^4.0.3-alpha",
Expand Down Expand Up @@ -1756,7 +1756,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
"reference": "7dd8b065bed7ee0f4dba282d39c815d519563536"
"reference": "e79572b4dc2ceab1e164bf3e965979f3b6f3eb0f"
},
"require": {
"automattic/jetpack-constants": "^2.0.4",
Expand Down Expand Up @@ -1820,7 +1820,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
"reference": "31d363b5d05e88c8260f92fb5f5c364aeb8278f4"
"reference": "9a59f1edda347fb229894c0794571206c217d4e8"
},
"require": {
"automattic/jetpack-connection": "^4.0.3-alpha",
Expand Down
Loading

0 comments on commit 545c0ce

Please sign in to comment.