Skip to content

Commit

Permalink
Jetpack: Deprecate Jetpack Onboarding system (#39229)
Browse files Browse the repository at this point in the history
* Remove registering of jetpack_onboarding option

* Deprecate method Status::is_onboarding

Also, remove check for is_onboarding from module activation code path

* Deprecate method Jetpack_XMLRPC_Methods::remote_provision_response.

* Also remove the body of the function to prevent it triggering a static analysis error due to calling Jetpack::create_onboarding_token() which is also being deprecated.
* Also remove its hook from jetpack_remote_xmlrpc_provision_response filter

* Remove references to onboarding option from CLI Command parter_provision

* Remove onboarding token verification hook from jetpack_signature_check_token filter

* Remove already deprecated method Jetpack::is_onboarding

* Remove refrences to jetpack onboarding tokens from authorization code paths

* Deprecate Jetpack::verify_onboarding_token()

* Deprecate Jetpack::create_onboarding_token()

* Deprecate Jetpack::invalidate_onboarding_token()

* Deprecate Jetpack::validate_onboarding_token_action()

* Remove refrences to jetpack onboarding tokens from registration code paths

* Remove onboarding setting from settings endpoint and deprecate Jetpack_Core_Json_Api_endpoints::validate_onboarding

Also remove the body of the function to prevent it triggering a static analysis error due to calling itself while being deprecated

* Deprecate Jetpack_Core_Api_Data::process_onboarding()

Also remove the body of the function to prevent it triggering a static analysis error
due to calling Jetpack::invalidate_onboarding_token() and Jetpack_Core_API_Data::handle_business_address()
which are also being deprecated.

* Remove reference to jetpack onboarding from Jetpack_Core_API_XMLRPC_Consumer_Endpoint::can_request

* Remove tests for JPO (Jetpack Onboarding)

* changelog

* Deprecate options jpo_site_type, jpo_business_address, jpo_homepage_format, jpo_contact_page

* Deprecated Jetpack::handle_business_address used for JPO (Jetpack Onboarding)

* Update phan baseline

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

Upstream-Ref: Automattic/jetpack@23e8929
  • Loading branch information
kraftbj authored and matticbot committed Sep 5, 2024
1 parent f9fdd9b commit 9c6004d
Show file tree
Hide file tree
Showing 26 changed files with 187 additions and 174 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"automattic/jetpack-autoloader": "^3.0.10",
"automattic/jetpack-composer-plugin": "^2.0.3",
"automattic/jetpack-config": "^2.0.4",
"automattic/jetpack-connection": "^3.0.0",
"automattic/jetpack-connection": "^4.0.0-alpha",
"automattic/jetpack-my-jetpack": "^4.35.0",
"automattic/jetpack-search": "^0.45.1-alpha",
"automattic/jetpack-stats": "^0.13.2-alpha",
"automattic/jetpack-status": "^3.3.4",
"automattic/jetpack-status": "^4.0.0-alpha",
"automattic/jetpack-sync": "^3.10.0-alpha"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-boost-core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-connection": "^3.0.0"
"automattic/jetpack-connection": "^4.0.0-alpha"
},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
Expand Down
8 changes: 8 additions & 0 deletions jetpack_vendor/automattic/jetpack-connection/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.0.0-alpha] - unreleased

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

### Deprecated
- Deprecated Jetpack Onboarding system

## [3.0.0] - 2024-09-05
### Changed
- Jetpack Connection: Restrict handling verified errors on admin pages only [#39233]
Expand Down Expand Up @@ -1179,6 +1186,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Separate the connection library into its own package.

[4.0.0-alpha]: https://github.com/Automattic/jetpack-connection/compare/v3.0.0...v4.0.0-alpha
[3.0.0]: https://github.com/Automattic/jetpack-connection/compare/v2.12.5...v3.0.0
[2.12.5]: https://github.com/Automattic/jetpack-connection/compare/v2.12.4...v2.12.5
[2.12.4]: https://github.com/Automattic/jetpack-connection/compare/v2.12.3...v2.12.4
Expand Down
4 changes: 2 additions & 2 deletions jetpack_vendor/automattic/jetpack-connection/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"automattic/jetpack-assets": "^2.3.6",
"automattic/jetpack-constants": "^2.0.4",
"automattic/jetpack-roles": "^2.0.3",
"automattic/jetpack-status": "^3.3.4",
"automattic/jetpack-status": "^4.0.0-alpha",
"automattic/jetpack-redirect": "^2.0.3"
},
"require-dev": {
Expand Down Expand Up @@ -62,7 +62,7 @@
"link-template": "https://github.com/Automattic/jetpack-connection/compare/v${old}...v${new}"
},
"branch-alias": {
"dev-trunk": "3.0.x-dev"
"dev-trunk": "4.0.x-dev"
},
"dependencies": {
"test-only": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public static function get_option_names( $type = 'compact' ) {
'safe_mode_confirmed', // (bool) True if someone confirms that this site was correctly put into safe mode automatically after an identity crisis is discovered.
'migrate_for_idc', // (bool) True if someone confirms that this site should migrate stats and subscribers from its previous URL
'ab_connect_banner_green_bar', // (int) Version displayed of the A/B test for the green bar at the top of the connect banner.
'onboarding', // (string) Auth token to be used in the onboarding connection flow
'tos_agreed', // (bool) Whether or not the TOS for connection has been agreed upon.
'static_asset_cdn_files', // (array) An nested array of files that we can swap out for cdn versions.
'mapbox_api_key', // (string) Mapbox API Key, for use with Map block.
Expand All @@ -85,7 +84,6 @@ public static function get_option_names( $type = 'compact' ) {

case 'network':
return array(
'onboarding', // (string) Auth token to be used in the onboarding connection flow
'file_data', // (array) List of absolute paths to all Jetpack modules
);
}
Expand Down Expand Up @@ -638,10 +636,6 @@ public static function get_all_wp_options() {
'jetpack_sso_require_two_step',
'jetpack_sso_remove_login_form',
'jetpack_last_connect_url_check',
'jpo_business_address',
'jpo_site_type',
'jpo_homepage_format',
'jpo_contact_page',
'jetpack_excluded_extensions',
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class Package_Version {

const PACKAGE_VERSION = '3.0.0';
const PACKAGE_VERSION = '4.0.0-alpha';

const PACKAGE_SLUG = 'connection';

Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-explat/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-connection": "^3.0.0"
"automattic/jetpack-connection": "^4.0.0-alpha"
},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
Expand Down
4 changes: 2 additions & 2 deletions jetpack_vendor/automattic/jetpack-jitm/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"php": ">=7.0",
"automattic/jetpack-a8c-mc-stats": "^2.0.2",
"automattic/jetpack-assets": "^2.3.6",
"automattic/jetpack-connection": "^3.0.0",
"automattic/jetpack-connection": "^4.0.0-alpha",
"automattic/jetpack-device-detection": "^2.1.4",
"automattic/jetpack-logo": "^2.0.4",
"automattic/jetpack-redirect": "^2.0.3",
"automattic/jetpack-status": "^3.3.4"
"automattic/jetpack-status": "^4.0.0-alpha"
},
"require-dev": {
"brain/monkey": "2.6.1",
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-licensing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-connection": "^3.0.0"
"automattic/jetpack-connection": "^4.0.0-alpha"
},
"require-dev": {
"automattic/wordbless": "@dev",
Expand Down
4 changes: 2 additions & 2 deletions jetpack_vendor/automattic/jetpack-my-jetpack/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"automattic/jetpack-admin-ui": "^0.4.5",
"automattic/jetpack-assets": "^2.3.6",
"automattic/jetpack-boost-speed-score": "^0.3.12",
"automattic/jetpack-connection": "^3.0.0",
"automattic/jetpack-connection": "^4.0.0-alpha",
"automattic/jetpack-explat": "^0.1.6",
"automattic/jetpack-jitm": "^3.1.20",
"automattic/jetpack-licensing": "^2.0.8",
"automattic/jetpack-plugins-installer": "^0.4.2",
"automattic/jetpack-redirect": "^2.0.3",
"automattic/jetpack-constants": "^2.0.4",
"automattic/jetpack-plans": "^0.4.9",
"automattic/jetpack-status": "^3.3.4",
"automattic/jetpack-status": "^4.0.0-alpha",
"automattic/jetpack-sync": "^3.10.0-alpha",
"automattic/jetpack-protect-status": "^0.1.4"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"require": {
"php": ">=7.0",
"automattic/jetpack-a8c-mc-stats": "^2.0.2",
"automattic/jetpack-status": "^3.3.4"
"automattic/jetpack-status": "^4.0.0-alpha"
},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-connection": "^3.0.0",
"automattic/jetpack-connection": "^4.0.0-alpha",
"automattic/jetpack-plugins-installer": "^0.4.2",
"automattic/jetpack-sync": "^3.10.0-alpha",
"automattic/jetpack-protect-models": "^0.2.1",
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-redirect/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-status": "^3.3.4"
"automattic/jetpack-status": "^4.0.0-alpha"
},
"require-dev": {
"brain/monkey": "2.6.1",
Expand Down
4 changes: 2 additions & 2 deletions jetpack_vendor/automattic/jetpack-search/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-connection": "^3.0.0",
"automattic/jetpack-connection": "^4.0.0-alpha",
"automattic/jetpack-assets": "^2.3.6",
"automattic/jetpack-constants": "^2.0.4",
"automattic/jetpack-status": "^3.3.4",
"automattic/jetpack-status": "^4.0.0-alpha",
"automattic/jetpack-config": "^2.0.4",
"automattic/jetpack-my-jetpack": "^4.35.0",
"automattic/jetpack-sync": "^3.10.0-alpha"
Expand Down
4 changes: 2 additions & 2 deletions jetpack_vendor/automattic/jetpack-stats/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-connection": "^3.0.0",
"automattic/jetpack-connection": "^4.0.0-alpha",
"automattic/jetpack-constants": "^2.0.4",
"automattic/jetpack-status": "^3.3.4"
"automattic/jetpack-status": "^4.0.0-alpha"
},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
Expand Down
8 changes: 8 additions & 0 deletions jetpack_vendor/automattic/jetpack-status/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.0.0-alpha] - unreleased

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

### Deprecated
- Deprecated Jetpack Onboarding system

## [3.3.4] - 2024-08-23
### Changed
- Updated package dependencies. [#39004]
Expand Down Expand Up @@ -389,6 +396,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Packages: Introduce a status package

[4.0.0-alpha]: https://github.com/Automattic/jetpack-status/compare/v3.3.4...v4.0.0-alpha
[3.3.4]: https://github.com/Automattic/jetpack-status/compare/v3.3.3...v3.3.4
[3.3.3]: https://github.com/Automattic/jetpack-status/compare/v3.3.2...v3.3.3
[3.3.2]: https://github.com/Automattic/jetpack-status/compare/v3.3.1...v3.3.2
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-status/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"link-template": "https://github.com/Automattic/jetpack-status/compare/v${old}...v${new}"
},
"branch-alias": {
"dev-trunk": "3.3.x-dev"
"dev-trunk": "4.0.x-dev"
},
"dependencies": {
"test-only": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public function activate( $module, $exit = true, $redirect = true ) {
$state = new CookieState();

if ( ! \Jetpack::is_connection_ready() ) {
if ( ! $status->is_offline_mode() && ! $status->is_onboarding() ) {
if ( ! $status->is_offline_mode() ) {
return false;
}

Expand Down
3 changes: 3 additions & 0 deletions jetpack_vendor/automattic/jetpack-status/src/class-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,15 @@ public static function is_development_site() {
*
* @since-jetpack 5.8
*
* @deprecated since 4.0.0-alpha
*
* @access public
* @static
*
* @return bool True if the site is currently onboarding, false otherwise
*/
public function is_onboarding() {
_deprecated_function( __FUNCTION__, '4.0.0-alpha' );
return \Jetpack_Options::get_option( 'onboarding' ) !== false;
}

Expand Down
4 changes: 2 additions & 2 deletions jetpack_vendor/automattic/jetpack-sync/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-connection": "^3.0.0",
"automattic/jetpack-connection": "^4.0.0-alpha",
"automattic/jetpack-constants": "^2.0.4",
"automattic/jetpack-password-checker": "^0.3.2",
"automattic/jetpack-ip": "^0.2.3",
"automattic/jetpack-roles": "^2.0.3",
"automattic/jetpack-status": "^3.3.4"
"automattic/jetpack-status": "^4.0.0-alpha"
},
"require-dev": {
"automattic/jetpack-changelogger": "^4.2.6",
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' => '3.0.0',
'ver' => '4.0.0-alpha1725546138',
),
'jetpack-explat' => array(
'path' => 'jetpack_vendor/automattic/jetpack-explat',
Expand Down
4 changes: 2 additions & 2 deletions vendor/automattic/jetpack-plans/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-connection": "^3.0.0"
"automattic/jetpack-connection": "^4.0.0-alpha"
},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "^4.2.6",
"automattic/jetpack-status": "^3.3.4",
"automattic/jetpack-status": "^4.0.0-alpha",
"automattic/wordbless": "@dev"
},
"suggest": {
Expand Down
Loading

0 comments on commit 9c6004d

Please sign in to comment.