From a33e64470715aa28282c8f089647de8a81a59c8b Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Fri, 27 Oct 2023 11:17:10 +0200 Subject: [PATCH 01/15] Connection: add partner codes are added to connection URLs This was previously only done in the Jetpack plugin, in 2 ways: - The Partner package is initialized on plugins_loaded in the main Jetpack class. - In Jetpack's `build_authorize_url` method we have a `jetpack_build_authorize_url` filter that is leveraged by the Partner package. Standalone plugins, on the other hand, do not use `Jetpack::build_authorize_url()`. This method is obviously only available in the Jetpack plugin, and so standalone plugins do not have that `jetpack_build_authorize_url` filter. We fix this discrepancy in this commit: - We now initialize the Partner package in the connection package. - We add the `jetpack_build_authorize_url` filter to the connection package's `get_authorization_url` method, so the partner codes can be added to all URLs. **Note**: this does not add the Partner package as a new dependency for the Connection package, since the Partner package already declares the connection package as a dependency. --- .../changelog/fix-connection-partner-standalone-sites | 4 ++++ projects/packages/connection/src/class-manager.php | 9 ++++++++- .../packages/connection/src/class-package-version.php | 2 +- .../connection/src/webhooks/class-authorize-redirect.php | 4 +--- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 projects/packages/connection/changelog/fix-connection-partner-standalone-sites diff --git a/projects/packages/connection/changelog/fix-connection-partner-standalone-sites b/projects/packages/connection/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..5e412fcedd66a --- /dev/null +++ b/projects/packages/connection/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Connection: ensure that partner partners are passed on during the connection process, regardless of the plugin you use to connect. diff --git a/projects/packages/connection/src/class-manager.php b/projects/packages/connection/src/class-manager.php index 88622e79592a6..a0bbf062d1bc9 100644 --- a/projects/packages/connection/src/class-manager.php +++ b/projects/packages/connection/src/class-manager.php @@ -10,6 +10,7 @@ use Automattic\Jetpack\A8c_Mc_Stats; use Automattic\Jetpack\Constants; use Automattic\Jetpack\Heartbeat; +use Automattic\Jetpack\Partner; use Automattic\Jetpack\Roles; use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; @@ -138,6 +139,9 @@ public static function configure() { // Initialize token locks. new Tokens_Locks(); + + // Initial Partner management. + Partner::init(); } /** @@ -1923,7 +1927,10 @@ public function get_authorization_url( $user = null, $redirect = null ) { $api_url = $this->api_url( 'authorize' ); - return add_query_arg( $body, $api_url ); + $url = add_query_arg( $body, $api_url ); + + /** This filter is documented in plugins/jetpack/class-jetpack.php */ + return apply_filters( 'jetpack_build_authorize_url', $url ); } /** diff --git a/projects/packages/connection/src/class-package-version.php b/projects/packages/connection/src/class-package-version.php index d09a566a9cc4b..e531c42270358 100644 --- a/projects/packages/connection/src/class-package-version.php +++ b/projects/packages/connection/src/class-package-version.php @@ -12,7 +12,7 @@ */ class Package_Version { - const PACKAGE_VERSION = '1.58.2'; + const PACKAGE_VERSION = '1.58.3-alpha'; const PACKAGE_SLUG = 'connection'; diff --git a/projects/packages/connection/src/webhooks/class-authorize-redirect.php b/projects/packages/connection/src/webhooks/class-authorize-redirect.php index 6b7653f26113e..93e614eb12b3c 100644 --- a/projects/packages/connection/src/webhooks/class-authorize-redirect.php +++ b/projects/packages/connection/src/webhooks/class-authorize-redirect.php @@ -107,9 +107,7 @@ public function build_authorize_url( $redirect = false ) { remove_filter( 'jetpack_connect_request_body', array( __CLASS__, 'filter_connect_request_body' ) ); remove_filter( 'jetpack_connect_redirect_url', array( __CLASS__, 'filter_connect_redirect_url' ) ); - /** - * This filter is documented in plugins/jetpack/class-jetpack.php - */ + /** This filter is documented in plugins/jetpack/class-jetpack.php */ return apply_filters( 'jetpack_build_authorize_url', $url ); } From ea43d76c3937ad551dba1d693677cd44f3e2d9d8 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Fri, 27 Oct 2023 12:26:16 +0200 Subject: [PATCH 02/15] Stop initializing the Partner package in the Jetpack plugin It is no longer needed now that the package is set up as part of the connection package --- projects/plugins/jetpack/class.jetpack.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/projects/plugins/jetpack/class.jetpack.php b/projects/plugins/jetpack/class.jetpack.php index c6590f592e87a..7554f73aaad16 100644 --- a/projects/plugins/jetpack/class.jetpack.php +++ b/projects/plugins/jetpack/class.jetpack.php @@ -29,7 +29,6 @@ use Automattic\Jetpack\Licensing; use Automattic\Jetpack\Modules; use Automattic\Jetpack\My_Jetpack\Initializer as My_Jetpack_Initializer; -use Automattic\Jetpack\Partner; use Automattic\Jetpack\Paths; use Automattic\Jetpack\Plugin\Tracking as Plugin_Tracking; use Automattic\Jetpack\Redirect; @@ -956,7 +955,6 @@ public function configure() { public function late_initialization() { add_action( 'plugins_loaded', array( 'Jetpack', 'load_modules' ), 100 ); - Partner::init(); My_Jetpack_Initializer::init(); // Initialize Boost Speed Score From f137a6c04944e54196208b506a62f1d77ddb78d3 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Fri, 27 Oct 2023 12:34:59 +0200 Subject: [PATCH 03/15] Add changelog --- .../jetpack/changelog/fix-connection-partner-standalone-sites | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 projects/plugins/jetpack/changelog/fix-connection-partner-standalone-sites diff --git a/projects/plugins/jetpack/changelog/fix-connection-partner-standalone-sites b/projects/plugins/jetpack/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..60289ee61b5bc --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Partnerships: stop initializing the Partner package in the Jetpack plugin, it is now done directly in the Connection package. From 1468125694b02775bf09a5e6e6921c4e204b2364 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Mon, 30 Oct 2023 17:41:23 +0100 Subject: [PATCH 04/15] Move Partner package classes to the Connection package --- .../packages/{partner => connection}/src/class-partner-coupon.php | 0 projects/packages/{partner => connection}/src/class-partner.php | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename projects/packages/{partner => connection}/src/class-partner-coupon.php (100%) rename projects/packages/{partner => connection}/src/class-partner.php (100%) diff --git a/projects/packages/partner/src/class-partner-coupon.php b/projects/packages/connection/src/class-partner-coupon.php similarity index 100% rename from projects/packages/partner/src/class-partner-coupon.php rename to projects/packages/connection/src/class-partner-coupon.php diff --git a/projects/packages/partner/src/class-partner.php b/projects/packages/connection/src/class-partner.php similarity index 100% rename from projects/packages/partner/src/class-partner.php rename to projects/packages/connection/src/class-partner.php From e992f505a33c3c27daaca292ed0d90ec22abe4e5 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Mon, 30 Oct 2023 17:47:42 +0100 Subject: [PATCH 05/15] Update references --- .../connection/src/class-partner-coupon.php | 11 +++-- .../packages/connection/src/class-partner.php | 46 +++++++++++++------ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/projects/packages/connection/src/class-partner-coupon.php b/projects/packages/connection/src/class-partner-coupon.php index 4f3462e03cedb..80b510357da69 100644 --- a/projects/packages/connection/src/class-partner-coupon.php +++ b/projects/packages/connection/src/class-partner-coupon.php @@ -2,7 +2,7 @@ /** * Class for the Jetpack partner coupon logic. * - * @package automattic/jetpack-partner + * @package automattic/jetpack-connection */ namespace Automattic\Jetpack; @@ -21,7 +21,8 @@ /** * Class Jetpack_Partner_Coupon * - * @since 1.6.0 + * @since partner-1.6.0 + * @since $$next-version$$ */ class Partner_Coupon { @@ -436,7 +437,8 @@ private function get_supported_partners() { /** * Allow external code to add additional supported partners. * - * @since 1.6.0 + * @since partner-1.6.0 + * @since $$next-version$$ * * @param array $supported_partners A list of supported partners. * @return array @@ -453,7 +455,8 @@ private function get_supported_presets() { /** * Allow external code to add additional supported presets. * - * @since 1.6.0 + * @since partner-1.6.0 + * @since $$next-version$$ * * @param array $supported_presets A list of supported presets. * @return array diff --git a/projects/packages/connection/src/class-partner.php b/projects/packages/connection/src/class-partner.php index 2d70c521349f1..14853ae12ae2f 100644 --- a/projects/packages/connection/src/class-partner.php +++ b/projects/packages/connection/src/class-partner.php @@ -1,8 +1,8 @@ get_code_as_array( $type ), $url ); @@ -128,9 +138,11 @@ public function add_code_as_query_arg( $type, $url ) { /** * Gets the partner code in an associative array format * + * @since partner-1.5.0 + * @since $$next-version$$ + * * @param string $type The partner code. * @return array - * @since 1.5.0 */ private function get_code_as_array( $type ) { switch ( $type ) { @@ -156,10 +168,12 @@ private function get_code_as_array( $type ) { /** * Returns a partner code. * + * @since partner-1.0.0 + * @since $$next-version$$ + * * @param string $type This can be either 'affiliate' or 'subsidiary'. Returns empty string when code is unknown. * * @return string The partner code. - * @since 1.0.0 */ public function get_partner_code( $type ) { switch ( $type ) { @@ -167,19 +181,21 @@ public function get_partner_code( $type ) { /** * Allow to filter the affiliate code. * - * @param string $affiliate_code The affiliate code, blank by default. - * - * @since 1.0.0 + * @since partner-1.0.0 * @since-jetpack 6.9.0 + * @since $$next-version$$ + * + * @param string $affiliate_code The affiliate code, blank by default. */ return apply_filters( 'jetpack_affiliate_code', get_option( 'jetpack_affiliate_code', '' ) ); case self::SUBSIDIARY_CODE: /** * Allow to filter the partner subsidiary id. * - * @param string $subsidiary_id The partner subsidiary id, blank by default. + * @since partner-1.0.0 + * @since $$next-version$$ * - * @since 1.0.0 + * @param string $subsidiary_id The partner subsidiary id, blank by default. */ return apply_filters( 'jetpack_partner_subsidiary_id', From 248b98da03ccf2aea52a37871e7ce85d1b1fa8ad Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Mon, 30 Oct 2023 17:48:55 +0100 Subject: [PATCH 06/15] Move tests --- .../{partner => connection}/tests/php/test-partner-coupon.php | 0 .../packages/{partner => connection}/tests/php/test-partner.php | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename projects/packages/{partner => connection}/tests/php/test-partner-coupon.php (100%) rename projects/packages/{partner => connection}/tests/php/test-partner.php (100%) diff --git a/projects/packages/partner/tests/php/test-partner-coupon.php b/projects/packages/connection/tests/php/test-partner-coupon.php similarity index 100% rename from projects/packages/partner/tests/php/test-partner-coupon.php rename to projects/packages/connection/tests/php/test-partner-coupon.php diff --git a/projects/packages/partner/tests/php/test-partner.php b/projects/packages/connection/tests/php/test-partner.php similarity index 100% rename from projects/packages/partner/tests/php/test-partner.php rename to projects/packages/connection/tests/php/test-partner.php From 6aff68c71e2362dcb39b1b5022208606839ddfec Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Mon, 30 Oct 2023 17:50:23 +0100 Subject: [PATCH 07/15] Update references --- .../packages/connection/tests/php/test-partner-coupon.php | 4 ++-- projects/packages/connection/tests/php/test-partner.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/packages/connection/tests/php/test-partner-coupon.php b/projects/packages/connection/tests/php/test-partner-coupon.php index 422efb4b91e3a..22de276cb6f8d 100644 --- a/projects/packages/connection/tests/php/test-partner-coupon.php +++ b/projects/packages/connection/tests/php/test-partner-coupon.php @@ -3,7 +3,7 @@ /** * Tests the partner-coupon package. * - * @package automattic/jetpack-partner + * @package automattic/jetpack-connection */ // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable @@ -16,7 +16,7 @@ /** * Class Partner_Coupon_Test * - * @package Automattic\Jetpack + * @package Automattic\jetpack-connection * @covers Automattic\Jetpack\Partner_Coupon */ class Partner_Coupon_Test extends BaseTestCase { diff --git a/projects/packages/connection/tests/php/test-partner.php b/projects/packages/connection/tests/php/test-partner.php index 50df161f3469f..a9726b04fae46 100644 --- a/projects/packages/connection/tests/php/test-partner.php +++ b/projects/packages/connection/tests/php/test-partner.php @@ -2,7 +2,7 @@ /** * Tests the partner package. * - * @package automattic/jetpack-partner + * @package automattic/jetpack-connection */ namespace Automattic\Jetpack; @@ -15,7 +15,7 @@ /** * Class Partner_Test * - * @package Automattic\Jetpack + * @package Automattic\jetpack-connection * @covers Automattic\Jetpack\Partner */ class Partner_Test extends TestCase { From 1fc75562a916dcd6b6b63e232769ce13fb856a86 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Mon, 30 Oct 2023 18:06:59 +0100 Subject: [PATCH 08/15] Mark Partner package as deprecated --- .../packages/connection/docs/partner-tools.md | 37 ++++++++++++++++ projects/packages/partner/README.md | 44 +------------------ .../fix-connection-partner-standalone-sites | 4 ++ projects/packages/partner/composer.json | 3 +- .../partner/src/class-partner-coupon.php | 9 ++++ .../packages/partner/src/class-partner.php | 9 ++++ 6 files changed, 62 insertions(+), 44 deletions(-) create mode 100644 projects/packages/connection/docs/partner-tools.md create mode 100644 projects/packages/partner/changelog/fix-connection-partner-standalone-sites create mode 100644 projects/packages/partner/src/class-partner-coupon.php create mode 100644 projects/packages/partner/src/class-partner.php diff --git a/projects/packages/connection/docs/partner-tools.md b/projects/packages/connection/docs/partner-tools.md new file mode 100644 index 0000000000000..a5a7538530dff --- /dev/null +++ b/projects/packages/connection/docs/partner-tools.md @@ -0,0 +1,37 @@ +# Partner Tools + +The Connection package includes 2 classes, `Automattic\Jetpack\Partner` and `Automattic\Jetpack\Partner_Coupon`, that provide support functions for Jetpack hosting partners. + +### Usage for hosting partners + +As a hosting partner you will need to set either the subsidiary id or the affiliate code. Both can be set via an option or a filter (but please do not set them using an option and filter simultaneously as this may not result in the desired effect). + +The most straight forward way to set these is by using an option: + +```php +// Set or update subsidiary id. Note that subsidiary id is a string that will be filtered +// with WordPress' sanitize_key() so make sure it conforms to the regex [^a-z0-9_\-]. +update_option( 'jetpack_partner_subsidiary_id', '', true ); + +// Set or update the affiliate code. +update_option( 'jetpack_affiliate_code', '', true ); +``` + +Another way to set these is via a filter. This requires creating a function that returns the desired value. + +```php +// Set the subsidairy id. Note that subsidiary id is a string that will be filtered +// with WordPress' sanitize_key() so make sure it conforms to the regex [^a-z0-9_\-]. +function subsidiary_filter( ) { + return ''; +} + +add_filter( 'jetpack_partner_subsidiary_id', 'subsidiary_filter' ); + +// Set the affiliate code. +function affiliate_filter( ) { + return ''; +} + +add_filter( 'jetpack_affiliate_code', 'affiliate_filter' ); +``` diff --git a/projects/packages/partner/README.md b/projects/packages/partner/README.md index 21a9a1a0fc08f..2f1c42f62e32d 100644 --- a/projects/packages/partner/README.md +++ b/projects/packages/partner/README.md @@ -1,48 +1,6 @@ # Jetpack Partner -A package that provides support functions for Jetpack hosting partners. - -### Usage for hosting partners - -As a hosting partner you will need to set either the subsidiary id or the affiliate code. Both can be set via an option or a filter (but please do not set them using an option and filter simultaneously as this may not result in the desired effect). - -The most straight forward way to set these is by using an option: - -```php - -// Set or update subsidiary id. Note that subsidiary id is a string that will be filtered -// with WordPress' sanitize_key() so make sure it conforms to the regex [^a-z0-9_\-]. -update_option( 'jetpack_partner_subsidiary_id', '', true ); - - -// Set or update the affiliate code. -update_option( 'jetpack_affiliate_code', '', true ); -``` - -Another way to set these is via a filter. This requires creating a function that returns the desired value. - -```php - -// Set the subsidairy id. Note that subsidiary id is a string that will be filtered -// with WordPress' sanitize_key() so make sure it conforms to the regex [^a-z0-9_\-]. -function subsidiary_filter( ) { - return ''; -} - -add_filter( 'jetpack_partner_subsidiary_id', 'subsidiary_filter' ); - - - -// Set the affiliate code. -function affiliate_filter( ) { - return ''; -} - -add_filter( 'jetpack_affiliate_code', 'affiliate_filter' ); -``` -## Using this package in your WordPress plugin - -If you plan on using this package in your WordPress plugin, we would recommend that you use [Jetpack Autoloader](https://packagist.org/packages/automattic/jetpack-autoloader) as your autoloader. This will allow for maximum interoperability with other plugins that use this package as well. +**This package is deprecated. Its functionalities are now available as part of the `automattic/jetpack-connection` package.** ## Security diff --git a/projects/packages/partner/changelog/fix-connection-partner-standalone-sites b/projects/packages/partner/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..a51a211e1a5fa --- /dev/null +++ b/projects/packages/partner/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,4 @@ +Significance: major +Type: deprecated + +This package is now deprecated. Find Partner classes in the automattic/jetpack-connection package from now on. You can now remove this package from your project's dependencies. diff --git a/projects/packages/partner/composer.json b/projects/packages/partner/composer.json index 70ab33a382015..00619af658092 100644 --- a/projects/packages/partner/composer.json +++ b/projects/packages/partner/composer.json @@ -56,5 +56,6 @@ "allow-plugins": { "roots/wordpress-core-installer": true } - } + }, + "abandoned": "automattic/jetpack-connection" } diff --git a/projects/packages/partner/src/class-partner-coupon.php b/projects/packages/partner/src/class-partner-coupon.php new file mode 100644 index 0000000000000..dd999d4eed53a --- /dev/null +++ b/projects/packages/partner/src/class-partner-coupon.php @@ -0,0 +1,9 @@ + Date: Mon, 30 Oct 2023 18:11:12 +0100 Subject: [PATCH 09/15] Stop loading the Partner package as a dependency --- projects/packages/jitm/composer.json | 1 - projects/packages/partner/composer.json | 2 +- .../fix-connection-partner-standalone-sites | 5 ++ projects/plugins/backup/composer.lock | 62 +----------------- .../fix-connection-partner-standalone-sites | 5 ++ projects/plugins/boost/composer.lock | 62 +----------------- .../fix-connection-partner-standalone-sites#2 | 5 ++ projects/plugins/jetpack/composer.json | 1 - projects/plugins/jetpack/composer.lock | 65 +------------------ .../fix-connection-partner-standalone-sites | 5 ++ projects/plugins/migration/composer.lock | 62 +----------------- .../fix-connection-partner-standalone-sites | 5 ++ projects/plugins/protect/composer.lock | 62 +----------------- .../fix-connection-partner-standalone-sites | 5 ++ projects/plugins/search/composer.lock | 62 +----------------- .../fix-connection-partner-standalone-sites | 5 ++ projects/plugins/social/composer.lock | 62 +----------------- .../fix-connection-partner-standalone-sites | 5 ++ projects/plugins/starter-plugin/composer.lock | 62 +----------------- .../fix-connection-partner-standalone-sites | 5 ++ projects/plugins/videopress/composer.lock | 62 +----------------- 21 files changed, 56 insertions(+), 554 deletions(-) create mode 100644 projects/plugins/backup/changelog/fix-connection-partner-standalone-sites create mode 100644 projects/plugins/boost/changelog/fix-connection-partner-standalone-sites create mode 100644 projects/plugins/jetpack/changelog/fix-connection-partner-standalone-sites#2 create mode 100644 projects/plugins/migration/changelog/fix-connection-partner-standalone-sites create mode 100644 projects/plugins/protect/changelog/fix-connection-partner-standalone-sites create mode 100644 projects/plugins/search/changelog/fix-connection-partner-standalone-sites create mode 100644 projects/plugins/social/changelog/fix-connection-partner-standalone-sites create mode 100644 projects/plugins/starter-plugin/changelog/fix-connection-partner-standalone-sites create mode 100644 projects/plugins/videopress/changelog/fix-connection-partner-standalone-sites diff --git a/projects/packages/jitm/composer.json b/projects/packages/jitm/composer.json index 3b7a9d97eaf63..bb43a870e24b3 100644 --- a/projects/packages/jitm/composer.json +++ b/projects/packages/jitm/composer.json @@ -9,7 +9,6 @@ "automattic/jetpack-connection": "@dev", "automattic/jetpack-device-detection": "@dev", "automattic/jetpack-logo": "@dev", - "automattic/jetpack-partner": "@dev", "automattic/jetpack-redirect": "@dev", "automattic/jetpack-status": "@dev" }, diff --git a/projects/packages/partner/composer.json b/projects/packages/partner/composer.json index 00619af658092..e9d2a9eae99f0 100644 --- a/projects/packages/partner/composer.json +++ b/projects/packages/partner/composer.json @@ -49,7 +49,7 @@ "link-template": "https://github.com/Automattic/jetpack-partner/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "1.7.x-dev" + "dev-trunk": "2.0.x-dev" } }, "config": { diff --git a/projects/plugins/backup/changelog/fix-connection-partner-standalone-sites b/projects/plugins/backup/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/backup/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/backup/composer.lock b/projects/plugins/backup/composer.lock index 74dec60f4e962..f8575ac08bb6d 100644 --- a/projects/plugins/backup/composer.lock +++ b/projects/plugins/backup/composer.lock @@ -722,7 +722,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "abf3747a9f310a0dfc412252d27f098cb1cb2406" + "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -730,7 +730,6 @@ "automattic/jetpack-connection": "@dev", "automattic/jetpack-device-detection": "@dev", "automattic/jetpack-logo": "@dev", - "automattic/jetpack-partner": "@dev", "automattic/jetpack-redirect": "@dev", "automattic/jetpack-status": "@dev" }, @@ -981,65 +980,6 @@ "relative": true } }, - { - "name": "automattic/jetpack-partner", - "version": "dev-trunk", - "dist": { - "type": "path", - "url": "../../packages/partner", - "reference": "617ebd443fc95dbd3e907b463eed621506da8e31" - }, - "require": { - "automattic/jetpack-connection": "@dev", - "automattic/jetpack-status": "@dev" - }, - "require-dev": { - "automattic/jetpack-changelogger": "@dev", - "automattic/wordbless": "@dev", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-partner", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-partner/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "1.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "license": [ - "GPL-2.0-or-later" - ], - "description": "Support functions for Jetpack hosting partners.", - "transport-options": { - "relative": true - } - }, { "name": "automattic/jetpack-password-checker", "version": "dev-trunk", diff --git a/projects/plugins/boost/changelog/fix-connection-partner-standalone-sites b/projects/plugins/boost/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/boost/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/boost/composer.lock b/projects/plugins/boost/composer.lock index 32d4792f0b370..23010a47a85eb 100644 --- a/projects/plugins/boost/composer.lock +++ b/projects/plugins/boost/composer.lock @@ -711,7 +711,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "abf3747a9f310a0dfc412252d27f098cb1cb2406" + "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -719,7 +719,6 @@ "automattic/jetpack-connection": "@dev", "automattic/jetpack-device-detection": "@dev", "automattic/jetpack-logo": "@dev", - "automattic/jetpack-partner": "@dev", "automattic/jetpack-redirect": "@dev", "automattic/jetpack-status": "@dev" }, @@ -1036,65 +1035,6 @@ "relative": true } }, - { - "name": "automattic/jetpack-partner", - "version": "dev-trunk", - "dist": { - "type": "path", - "url": "../../packages/partner", - "reference": "617ebd443fc95dbd3e907b463eed621506da8e31" - }, - "require": { - "automattic/jetpack-connection": "@dev", - "automattic/jetpack-status": "@dev" - }, - "require-dev": { - "automattic/jetpack-changelogger": "@dev", - "automattic/wordbless": "@dev", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-partner", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-partner/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "1.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "license": [ - "GPL-2.0-or-later" - ], - "description": "Support functions for Jetpack hosting partners.", - "transport-options": { - "relative": true - } - }, { "name": "automattic/jetpack-plans", "version": "dev-trunk", diff --git a/projects/plugins/jetpack/changelog/fix-connection-partner-standalone-sites#2 b/projects/plugins/jetpack/changelog/fix-connection-partner-standalone-sites#2 new file mode 100644 index 0000000000000..a1c1831fa1ef7 --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-connection-partner-standalone-sites#2 @@ -0,0 +1,5 @@ +Significance: patch +Type: other +Comment: Updated composer.lock. + + diff --git a/projects/plugins/jetpack/composer.json b/projects/plugins/jetpack/composer.json index 5562328c8e88f..6e7c958619721 100644 --- a/projects/plugins/jetpack/composer.json +++ b/projects/plugins/jetpack/composer.json @@ -38,7 +38,6 @@ "automattic/jetpack-licensing": "@dev", "automattic/jetpack-logo": "@dev", "automattic/jetpack-my-jetpack": "@dev", - "automattic/jetpack-partner": "@dev", "automattic/jetpack-plugins-installer": "@dev", "automattic/jetpack-post-list": "@dev", "automattic/jetpack-publicize": "@dev", diff --git a/projects/plugins/jetpack/composer.lock b/projects/plugins/jetpack/composer.lock index 6dcabeb58a6f4..efe5f87e8b30f 100644 --- a/projects/plugins/jetpack/composer.lock +++ b/projects/plugins/jetpack/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f90a230c798731d826f3cfce465404f8", + "content-hash": "9746a40b4e4a455d9eb65650fc7ede73", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", @@ -1461,7 +1461,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "abf3747a9f310a0dfc412252d27f098cb1cb2406" + "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -1469,7 +1469,6 @@ "automattic/jetpack-connection": "@dev", "automattic/jetpack-device-detection": "@dev", "automattic/jetpack-logo": "@dev", - "automattic/jetpack-partner": "@dev", "automattic/jetpack-redirect": "@dev", "automattic/jetpack-status": "@dev" }, @@ -1720,65 +1719,6 @@ "relative": true } }, - { - "name": "automattic/jetpack-partner", - "version": "dev-trunk", - "dist": { - "type": "path", - "url": "../../packages/partner", - "reference": "617ebd443fc95dbd3e907b463eed621506da8e31" - }, - "require": { - "automattic/jetpack-connection": "@dev", - "automattic/jetpack-status": "@dev" - }, - "require-dev": { - "automattic/jetpack-changelogger": "@dev", - "automattic/wordbless": "@dev", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-partner", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-partner/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "1.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "license": [ - "GPL-2.0-or-later" - ], - "description": "Support functions for Jetpack hosting partners.", - "transport-options": { - "relative": true - } - }, { "name": "automattic/jetpack-password-checker", "version": "dev-trunk", @@ -5685,7 +5625,6 @@ "automattic/jetpack-licensing": 20, "automattic/jetpack-logo": 20, "automattic/jetpack-my-jetpack": 20, - "automattic/jetpack-partner": 20, "automattic/jetpack-plugins-installer": 20, "automattic/jetpack-post-list": 20, "automattic/jetpack-publicize": 20, diff --git a/projects/plugins/migration/changelog/fix-connection-partner-standalone-sites b/projects/plugins/migration/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/migration/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/migration/composer.lock b/projects/plugins/migration/composer.lock index 98ffa899eab3c..e82130b17f22c 100644 --- a/projects/plugins/migration/composer.lock +++ b/projects/plugins/migration/composer.lock @@ -722,7 +722,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "abf3747a9f310a0dfc412252d27f098cb1cb2406" + "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -730,7 +730,6 @@ "automattic/jetpack-connection": "@dev", "automattic/jetpack-device-detection": "@dev", "automattic/jetpack-logo": "@dev", - "automattic/jetpack-partner": "@dev", "automattic/jetpack-redirect": "@dev", "automattic/jetpack-status": "@dev" }, @@ -981,65 +980,6 @@ "relative": true } }, - { - "name": "automattic/jetpack-partner", - "version": "dev-trunk", - "dist": { - "type": "path", - "url": "../../packages/partner", - "reference": "617ebd443fc95dbd3e907b463eed621506da8e31" - }, - "require": { - "automattic/jetpack-connection": "@dev", - "automattic/jetpack-status": "@dev" - }, - "require-dev": { - "automattic/jetpack-changelogger": "@dev", - "automattic/wordbless": "@dev", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-partner", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-partner/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "1.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "license": [ - "GPL-2.0-or-later" - ], - "description": "Support functions for Jetpack hosting partners.", - "transport-options": { - "relative": true - } - }, { "name": "automattic/jetpack-password-checker", "version": "dev-trunk", diff --git a/projects/plugins/protect/changelog/fix-connection-partner-standalone-sites b/projects/plugins/protect/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/protect/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/protect/composer.lock b/projects/plugins/protect/composer.lock index 0dfaf90d15216..4a161c2878508 100644 --- a/projects/plugins/protect/composer.lock +++ b/projects/plugins/protect/composer.lock @@ -637,7 +637,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "abf3747a9f310a0dfc412252d27f098cb1cb2406" + "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -645,7 +645,6 @@ "automattic/jetpack-connection": "@dev", "automattic/jetpack-device-detection": "@dev", "automattic/jetpack-logo": "@dev", - "automattic/jetpack-partner": "@dev", "automattic/jetpack-redirect": "@dev", "automattic/jetpack-status": "@dev" }, @@ -896,65 +895,6 @@ "relative": true } }, - { - "name": "automattic/jetpack-partner", - "version": "dev-trunk", - "dist": { - "type": "path", - "url": "../../packages/partner", - "reference": "617ebd443fc95dbd3e907b463eed621506da8e31" - }, - "require": { - "automattic/jetpack-connection": "@dev", - "automattic/jetpack-status": "@dev" - }, - "require-dev": { - "automattic/jetpack-changelogger": "@dev", - "automattic/wordbless": "@dev", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-partner", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-partner/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "1.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "license": [ - "GPL-2.0-or-later" - ], - "description": "Support functions for Jetpack hosting partners.", - "transport-options": { - "relative": true - } - }, { "name": "automattic/jetpack-password-checker", "version": "dev-trunk", diff --git a/projects/plugins/search/changelog/fix-connection-partner-standalone-sites b/projects/plugins/search/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/search/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/search/composer.lock b/projects/plugins/search/composer.lock index a7326fdd2687b..d077d33440ca3 100644 --- a/projects/plugins/search/composer.lock +++ b/projects/plugins/search/composer.lock @@ -637,7 +637,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "abf3747a9f310a0dfc412252d27f098cb1cb2406" + "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -645,7 +645,6 @@ "automattic/jetpack-connection": "@dev", "automattic/jetpack-device-detection": "@dev", "automattic/jetpack-logo": "@dev", - "automattic/jetpack-partner": "@dev", "automattic/jetpack-redirect": "@dev", "automattic/jetpack-status": "@dev" }, @@ -896,65 +895,6 @@ "relative": true } }, - { - "name": "automattic/jetpack-partner", - "version": "dev-trunk", - "dist": { - "type": "path", - "url": "../../packages/partner", - "reference": "617ebd443fc95dbd3e907b463eed621506da8e31" - }, - "require": { - "automattic/jetpack-connection": "@dev", - "automattic/jetpack-status": "@dev" - }, - "require-dev": { - "automattic/jetpack-changelogger": "@dev", - "automattic/wordbless": "@dev", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-partner", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-partner/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "1.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "license": [ - "GPL-2.0-or-later" - ], - "description": "Support functions for Jetpack hosting partners.", - "transport-options": { - "relative": true - } - }, { "name": "automattic/jetpack-password-checker", "version": "dev-trunk", diff --git a/projects/plugins/social/changelog/fix-connection-partner-standalone-sites b/projects/plugins/social/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/social/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/social/composer.lock b/projects/plugins/social/composer.lock index 026daf485ecef..4809568e2d141 100644 --- a/projects/plugins/social/composer.lock +++ b/projects/plugins/social/composer.lock @@ -637,7 +637,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "abf3747a9f310a0dfc412252d27f098cb1cb2406" + "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -645,7 +645,6 @@ "automattic/jetpack-connection": "@dev", "automattic/jetpack-device-detection": "@dev", "automattic/jetpack-logo": "@dev", - "automattic/jetpack-partner": "@dev", "automattic/jetpack-redirect": "@dev", "automattic/jetpack-status": "@dev" }, @@ -896,65 +895,6 @@ "relative": true } }, - { - "name": "automattic/jetpack-partner", - "version": "dev-trunk", - "dist": { - "type": "path", - "url": "../../packages/partner", - "reference": "617ebd443fc95dbd3e907b463eed621506da8e31" - }, - "require": { - "automattic/jetpack-connection": "@dev", - "automattic/jetpack-status": "@dev" - }, - "require-dev": { - "automattic/jetpack-changelogger": "@dev", - "automattic/wordbless": "@dev", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-partner", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-partner/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "1.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "license": [ - "GPL-2.0-or-later" - ], - "description": "Support functions for Jetpack hosting partners.", - "transport-options": { - "relative": true - } - }, { "name": "automattic/jetpack-password-checker", "version": "dev-trunk", diff --git a/projects/plugins/starter-plugin/changelog/fix-connection-partner-standalone-sites b/projects/plugins/starter-plugin/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/starter-plugin/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/starter-plugin/composer.lock b/projects/plugins/starter-plugin/composer.lock index d52da13a530cf..f869c8e9b0566 100644 --- a/projects/plugins/starter-plugin/composer.lock +++ b/projects/plugins/starter-plugin/composer.lock @@ -637,7 +637,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "abf3747a9f310a0dfc412252d27f098cb1cb2406" + "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -645,7 +645,6 @@ "automattic/jetpack-connection": "@dev", "automattic/jetpack-device-detection": "@dev", "automattic/jetpack-logo": "@dev", - "automattic/jetpack-partner": "@dev", "automattic/jetpack-redirect": "@dev", "automattic/jetpack-status": "@dev" }, @@ -896,65 +895,6 @@ "relative": true } }, - { - "name": "automattic/jetpack-partner", - "version": "dev-trunk", - "dist": { - "type": "path", - "url": "../../packages/partner", - "reference": "617ebd443fc95dbd3e907b463eed621506da8e31" - }, - "require": { - "automattic/jetpack-connection": "@dev", - "automattic/jetpack-status": "@dev" - }, - "require-dev": { - "automattic/jetpack-changelogger": "@dev", - "automattic/wordbless": "@dev", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-partner", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-partner/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "1.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "license": [ - "GPL-2.0-or-later" - ], - "description": "Support functions for Jetpack hosting partners.", - "transport-options": { - "relative": true - } - }, { "name": "automattic/jetpack-password-checker", "version": "dev-trunk", diff --git a/projects/plugins/videopress/changelog/fix-connection-partner-standalone-sites b/projects/plugins/videopress/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/videopress/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/videopress/composer.lock b/projects/plugins/videopress/composer.lock index 333ef21dfa01c..9a380a2be613f 100644 --- a/projects/plugins/videopress/composer.lock +++ b/projects/plugins/videopress/composer.lock @@ -637,7 +637,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "abf3747a9f310a0dfc412252d27f098cb1cb2406" + "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -645,7 +645,6 @@ "automattic/jetpack-connection": "@dev", "automattic/jetpack-device-detection": "@dev", "automattic/jetpack-logo": "@dev", - "automattic/jetpack-partner": "@dev", "automattic/jetpack-redirect": "@dev", "automattic/jetpack-status": "@dev" }, @@ -896,65 +895,6 @@ "relative": true } }, - { - "name": "automattic/jetpack-partner", - "version": "dev-trunk", - "dist": { - "type": "path", - "url": "../../packages/partner", - "reference": "617ebd443fc95dbd3e907b463eed621506da8e31" - }, - "require": { - "automattic/jetpack-connection": "@dev", - "automattic/jetpack-status": "@dev" - }, - "require-dev": { - "automattic/jetpack-changelogger": "@dev", - "automattic/wordbless": "@dev", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-partner", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-partner/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "1.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "license": [ - "GPL-2.0-or-later" - ], - "description": "Support functions for Jetpack hosting partners.", - "transport-options": { - "relative": true - } - }, { "name": "automattic/jetpack-password-checker", "version": "dev-trunk", From 3393ec092a5bda8e397b1128376d2ac348391f4c Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Mon, 30 Oct 2023 18:25:37 +0100 Subject: [PATCH 10/15] changelog --- .../jitm/changelog/fix-connection-partner-standalone-sites | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 projects/packages/jitm/changelog/fix-connection-partner-standalone-sites diff --git a/projects/packages/jitm/changelog/fix-connection-partner-standalone-sites b/projects/packages/jitm/changelog/fix-connection-partner-standalone-sites new file mode 100644 index 0000000000000..2b56ee2b211b2 --- /dev/null +++ b/projects/packages/jitm/changelog/fix-connection-partner-standalone-sites @@ -0,0 +1,4 @@ +Significance: minor +Type: removed + +Do not require the Partner package anymore. Rely on the Connection package instead. From 857c749a693c1647b29c0042463fd2097b6b5d9c Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Mon, 30 Oct 2023 18:28:24 +0100 Subject: [PATCH 11/15] Bump JITM package everywhere where it is required. --- projects/packages/jitm/composer.json | 2 +- projects/packages/jitm/src/class-jitm.php | 2 +- projects/plugins/backup/composer.lock | 4 ++-- projects/plugins/boost/composer.lock | 4 ++-- projects/plugins/jetpack/composer.lock | 4 ++-- projects/plugins/migration/composer.lock | 4 ++-- projects/plugins/protect/composer.lock | 4 ++-- projects/plugins/search/composer.lock | 4 ++-- projects/plugins/social/composer.lock | 4 ++-- projects/plugins/starter-plugin/composer.lock | 4 ++-- projects/plugins/videopress/composer.lock | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/projects/packages/jitm/composer.json b/projects/packages/jitm/composer.json index bb43a870e24b3..4ba22919fc5aa 100644 --- a/projects/packages/jitm/composer.json +++ b/projects/packages/jitm/composer.json @@ -65,7 +65,7 @@ "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "2.5.x-dev" + "dev-trunk": "2.6.x-dev" } } } diff --git a/projects/packages/jitm/src/class-jitm.php b/projects/packages/jitm/src/class-jitm.php index 32ce193e98f1d..2ae47c4b4642e 100644 --- a/projects/packages/jitm/src/class-jitm.php +++ b/projects/packages/jitm/src/class-jitm.php @@ -20,7 +20,7 @@ */ class JITM { - const PACKAGE_VERSION = '2.5.1'; + const PACKAGE_VERSION = '2.6.0-alpha'; /** * The configuration method that is called from the jetpack-config package. diff --git a/projects/plugins/backup/composer.lock b/projects/plugins/backup/composer.lock index f8575ac08bb6d..2100ae26ba561 100644 --- a/projects/plugins/backup/composer.lock +++ b/projects/plugins/backup/composer.lock @@ -722,7 +722,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" + "reference": "e13900c78f3b7dfc0ed2ecede10c8ddcc9a5fd4d" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -753,7 +753,7 @@ "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "2.5.x-dev" + "dev-trunk": "2.6.x-dev" } }, "autoload": { diff --git a/projects/plugins/boost/composer.lock b/projects/plugins/boost/composer.lock index 23010a47a85eb..0dbc95ae11b74 100644 --- a/projects/plugins/boost/composer.lock +++ b/projects/plugins/boost/composer.lock @@ -711,7 +711,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" + "reference": "e13900c78f3b7dfc0ed2ecede10c8ddcc9a5fd4d" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -742,7 +742,7 @@ "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "2.5.x-dev" + "dev-trunk": "2.6.x-dev" } }, "autoload": { diff --git a/projects/plugins/jetpack/composer.lock b/projects/plugins/jetpack/composer.lock index efe5f87e8b30f..fedf8634deed1 100644 --- a/projects/plugins/jetpack/composer.lock +++ b/projects/plugins/jetpack/composer.lock @@ -1461,7 +1461,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" + "reference": "e13900c78f3b7dfc0ed2ecede10c8ddcc9a5fd4d" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -1492,7 +1492,7 @@ "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "2.5.x-dev" + "dev-trunk": "2.6.x-dev" } }, "autoload": { diff --git a/projects/plugins/migration/composer.lock b/projects/plugins/migration/composer.lock index e82130b17f22c..5d771498c4616 100644 --- a/projects/plugins/migration/composer.lock +++ b/projects/plugins/migration/composer.lock @@ -722,7 +722,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" + "reference": "e13900c78f3b7dfc0ed2ecede10c8ddcc9a5fd4d" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -753,7 +753,7 @@ "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "2.5.x-dev" + "dev-trunk": "2.6.x-dev" } }, "autoload": { diff --git a/projects/plugins/protect/composer.lock b/projects/plugins/protect/composer.lock index 4a161c2878508..cd7ecbe0be879 100644 --- a/projects/plugins/protect/composer.lock +++ b/projects/plugins/protect/composer.lock @@ -637,7 +637,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" + "reference": "e13900c78f3b7dfc0ed2ecede10c8ddcc9a5fd4d" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -668,7 +668,7 @@ "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "2.5.x-dev" + "dev-trunk": "2.6.x-dev" } }, "autoload": { diff --git a/projects/plugins/search/composer.lock b/projects/plugins/search/composer.lock index d077d33440ca3..9acf2b3f3ec93 100644 --- a/projects/plugins/search/composer.lock +++ b/projects/plugins/search/composer.lock @@ -637,7 +637,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" + "reference": "e13900c78f3b7dfc0ed2ecede10c8ddcc9a5fd4d" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -668,7 +668,7 @@ "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "2.5.x-dev" + "dev-trunk": "2.6.x-dev" } }, "autoload": { diff --git a/projects/plugins/social/composer.lock b/projects/plugins/social/composer.lock index 4809568e2d141..7d9052f7b3d39 100644 --- a/projects/plugins/social/composer.lock +++ b/projects/plugins/social/composer.lock @@ -637,7 +637,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" + "reference": "e13900c78f3b7dfc0ed2ecede10c8ddcc9a5fd4d" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -668,7 +668,7 @@ "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "2.5.x-dev" + "dev-trunk": "2.6.x-dev" } }, "autoload": { diff --git a/projects/plugins/starter-plugin/composer.lock b/projects/plugins/starter-plugin/composer.lock index f869c8e9b0566..fc210eab428c3 100644 --- a/projects/plugins/starter-plugin/composer.lock +++ b/projects/plugins/starter-plugin/composer.lock @@ -637,7 +637,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" + "reference": "e13900c78f3b7dfc0ed2ecede10c8ddcc9a5fd4d" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -668,7 +668,7 @@ "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "2.5.x-dev" + "dev-trunk": "2.6.x-dev" } }, "autoload": { diff --git a/projects/plugins/videopress/composer.lock b/projects/plugins/videopress/composer.lock index 9a380a2be613f..900c51bf56562 100644 --- a/projects/plugins/videopress/composer.lock +++ b/projects/plugins/videopress/composer.lock @@ -637,7 +637,7 @@ "dist": { "type": "path", "url": "../../packages/jitm", - "reference": "af8c4beb7c0aaae888e30ae904c91be129ea189c" + "reference": "e13900c78f3b7dfc0ed2ecede10c8ddcc9a5fd4d" }, "require": { "automattic/jetpack-a8c-mc-stats": "@dev", @@ -668,7 +668,7 @@ "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "2.5.x-dev" + "dev-trunk": "2.6.x-dev" } }, "autoload": { From eef214324a7dbbc7362294b5b656f5da03d0a236 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Mon, 30 Oct 2023 19:00:42 +0100 Subject: [PATCH 12/15] Avoid test pollution --- projects/packages/connection/tests/php/test-partner.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/packages/connection/tests/php/test-partner.php b/projects/packages/connection/tests/php/test-partner.php index a9726b04fae46..ee689b40ad412 100644 --- a/projects/packages/connection/tests/php/test-partner.php +++ b/projects/packages/connection/tests/php/test-partner.php @@ -32,6 +32,15 @@ public function set_up() { Partner::reset(); } + /** + * Test teardown. + * + * @after + */ + public function tear_down() { + Monkey\tearDown(); + } + /** * Tests the class returns the instance. */ From 5ef3fef107fc23433a04fb028fd7b1dfcaa075e2 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Mon, 30 Oct 2023 19:17:21 +0100 Subject: [PATCH 13/15] Revert teardown --- projects/packages/connection/tests/php/test-partner.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/projects/packages/connection/tests/php/test-partner.php b/projects/packages/connection/tests/php/test-partner.php index ee689b40ad412..a9726b04fae46 100644 --- a/projects/packages/connection/tests/php/test-partner.php +++ b/projects/packages/connection/tests/php/test-partner.php @@ -32,15 +32,6 @@ public function set_up() { Partner::reset(); } - /** - * Test teardown. - * - * @after - */ - public function tear_down() { - Monkey\tearDown(); - } - /** * Tests the class returns the instance. */ From 3da653a17dbcf64621c332cdc4ae55e92250988c Mon Sep 17 00:00:00 2001 From: Sergey Mitroshin Date: Tue, 31 Oct 2023 13:48:21 -0400 Subject: [PATCH 14/15] Fix the Partner package unit tests. --- .../tests/php/test-partner-coupon.php | 4 +- .../connection/tests/php/test-partner.php | 68 +++++++++++++++---- 2 files changed, 56 insertions(+), 16 deletions(-) diff --git a/projects/packages/connection/tests/php/test-partner-coupon.php b/projects/packages/connection/tests/php/test-partner-coupon.php index 22de276cb6f8d..9dbcfd2453389 100644 --- a/projects/packages/connection/tests/php/test-partner-coupon.php +++ b/projects/packages/connection/tests/php/test-partner-coupon.php @@ -11,7 +11,7 @@ namespace Automattic\Jetpack; use Jetpack_Options; -use WorDBless\BaseTestCase; +use PHPUnit\Framework\TestCase; /** * Class Partner_Coupon_Test @@ -19,7 +19,7 @@ * @package Automattic\jetpack-connection * @covers Automattic\Jetpack\Partner_Coupon */ -class Partner_Coupon_Test extends BaseTestCase { +class Partner_Coupon_Test extends TestCase { use \Yoast\PHPUnitPolyfills\Polyfills\AssertIsType; const PRODUCT = array( diff --git a/projects/packages/connection/tests/php/test-partner.php b/projects/packages/connection/tests/php/test-partner.php index a9726b04fae46..55a46ec0ff633 100644 --- a/projects/packages/connection/tests/php/test-partner.php +++ b/projects/packages/connection/tests/php/test-partner.php @@ -7,9 +7,6 @@ namespace Automattic\Jetpack; -use Brain\Monkey; -use Brain\Monkey\Filters; -use Brain\Monkey\Functions; use PHPUnit\Framework\TestCase; /** @@ -23,12 +20,11 @@ class Partner_Test extends TestCase { const TEST_CODE = 'abc-123'; /** - * Set ups the tests. + * Reset the environment after each test. * - * @before + * @after */ - public function set_up() { - Monkey\setUp(); + public function tear_down() { Partner::reset(); } @@ -72,8 +68,20 @@ public function code_provider() { * @throws Monkey\Expectation\Exception\ExpectationArgsRequired Function requires args. */ public function test_partner_code_is_empty_by_default( $code_type, $option_name ) { - Functions\expect( 'get_option' )->once()->with( $option_name )->andReturn( '' ); - $this->assertEmpty( Partner::init()->get_partner_code( $code_type ) ); + $call_counter = 0; + $option_filter = function () use ( &$call_counter ) { + ++$call_counter; + return ''; + }; + + add_filter( 'pre_option_' . $option_name, $option_filter ); + + $partner_code = Partner::init()->get_partner_code( $code_type ); + + remove_filter( 'pre_option_' . $option_name, $option_filter ); + + $this->assertEmpty( $partner_code ); + $this->assertSame( 1, $call_counter, 'The option should be loaded once.' ); } /** @@ -87,8 +95,20 @@ public function test_partner_code_is_empty_by_default( $code_type, $option_name * @throws Monkey\Expectation\Exception\ExpectationArgsRequired Function requires args. */ public function test_partner_code_is_set_via_option( $code_type, $option_name ) { - Functions\expect( 'get_option' )->once()->with( $option_name, '' )->andReturn( self::TEST_CODE ); - $this->assertEquals( self::TEST_CODE, Partner::init()->get_partner_code( $code_type ) ); + $call_counter = 0; + $option_filter = function () use ( &$call_counter ) { + ++$call_counter; + return self::TEST_CODE; + }; + + add_filter( 'pre_option_' . $option_name, $option_filter ); + + $partner_code = Partner::init()->get_partner_code( $code_type ); + + remove_filter( 'pre_option_' . $option_name, $option_filter ); + + $this->assertEquals( self::TEST_CODE, $partner_code ); + $this->assertSame( 1, $call_counter, 'The option should be loaded once.' ); } /** @@ -102,8 +122,28 @@ public function test_partner_code_is_set_via_option( $code_type, $option_name ) * @throws Monkey\Expectation\Exception\ExpectationArgsRequired Function requires args. */ public function test_partner_code_is_set_via_filter( $code_type, $option_name ) { - Functions\expect( 'get_option' )->once()->with( $option_name )->andReturn( '' ); - Filters\expectApplied( $option_name )->once()->with( '' )->with( self::TEST_CODE ); - $this->assertEquals( self::TEST_CODE, Partner::init()->get_partner_code( $code_type ) ); + $call_counter = 0; + $option_filter = function () use ( &$call_counter ) { + ++$call_counter; + return ''; + }; + + $filter_call_counter = 0; + $filter_filter = function () use ( &$filter_call_counter ) { + ++$filter_call_counter; + return self::TEST_CODE; + }; + + add_filter( 'pre_option_' . $option_name, $option_filter ); + add_filter( $option_name, $filter_filter ); + + $partner_code = Partner::init()->get_partner_code( $code_type ); + + remove_filter( 'pre_option_' . $option_name, $option_filter ); + remove_filter( $option_name, $filter_filter ); + + $this->assertEquals( self::TEST_CODE, $partner_code ); + $this->assertSame( 1, $call_counter, 'The option should be loaded once.' ); + $this->assertSame( 1, $filter_call_counter, 'The filter should be called once.' ); } } From d529be42abb1e45d2019b5ab790d92bac2bc7806 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Tue, 14 Nov 2023 18:45:15 +0100 Subject: [PATCH 15/15] Update lock file --- projects/plugins/jetpack/composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/plugins/jetpack/composer.lock b/projects/plugins/jetpack/composer.lock index 99065714a578e..4ccf4cb4f7f4f 100644 --- a/projects/plugins/jetpack/composer.lock +++ b/projects/plugins/jetpack/composer.lock @@ -2752,16 +2752,16 @@ }, { "name": "scssphp/scssphp", - "version": "v1.11.1", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "ace2503684bab0dcc817d7614c8a54b865122414" + "reference": "a6b20c170ddb95f116b3d148a466a7bed1e85c35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/ace2503684bab0dcc817d7614c8a54b865122414", - "reference": "ace2503684bab0dcc817d7614c8a54b865122414", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/a6b20c170ddb95f116b3d148a466a7bed1e85c35", + "reference": "a6b20c170ddb95f116b3d148a466a7bed1e85c35", "shasum": "" }, "require": { @@ -2826,9 +2826,9 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.11.1" + "source": "https://github.com/scssphp/scssphp/tree/v1.12.0" }, - "time": "2023-09-24T13:38:17+00:00" + "time": "2023-11-14T14:56:09+00:00" }, { "name": "wikimedia/aho-corasick",