diff options
Diffstat (limited to 'plugins/jetpack/vendor')
38 files changed, 2036 insertions, 680 deletions
diff --git a/plugins/jetpack/vendor/autoload.php b/plugins/jetpack/vendor/autoload.php index c8666721..09a57b54 100644 --- a/plugins/jetpack/vendor/autoload.php +++ b/plugins/jetpack/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit2476b41c8cf17e4e68e22a516cf4ed25::getLoader(); +return ComposerAutoloaderInitb971f5b5f09f65d7b815d2961dc675a0::getLoader(); diff --git a/plugins/jetpack/vendor/autoload_packages.php b/plugins/jetpack/vendor/autoload_packages.php index 3a963857..70bd4cfe 100644 --- a/plugins/jetpack/vendor/autoload_packages.php +++ b/plugins/jetpack/vendor/autoload_packages.php @@ -73,26 +73,7 @@ if ( ! function_exists( __NAMESPACE__ . '\autoloader' ) ) { if ( isset( $jetpack_packages_classes[ $class_name ] ) ) { if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { - // TODO ideally we shouldn't skip any of these, see: https://github.com/Automattic/jetpack/pull/12646. - $ignore = in_array( - $class_name, - array( - 'Automattic\Jetpack\JITM', - 'Automattic\Jetpack\Connection\Manager', - 'Automattic\Jetpack\Connection\Manager_Interface', - 'Automattic\Jetpack\Connection\XMLRPC_Connector', - 'Jetpack_IXR_Client', - 'Jetpack_Options', - 'Jetpack_Signature', - 'Jetpack_XMLRPC_Server', - 'Automattic\Jetpack\Sync\Main', - 'Automattic\Jetpack\Constants', - 'Automattic\Jetpack\Tracking', - 'Automattic\Jetpack\Plugin\Tracking', - ), - true - ); - if ( ! $ignore && function_exists( 'did_action' ) && ! did_action( 'plugins_loaded' ) ) { + if ( function_exists( 'did_action' ) && ! did_action( 'plugins_loaded' ) ) { _doing_it_wrong( esc_html( $class_name ), sprintf( @@ -122,7 +103,7 @@ if ( ! function_exists( __NAMESPACE__ . '\autoloader' ) ) { /** * Prepare all the classes for autoloading. */ -function enqueue_packages_e5e1fcbf7e161455e15277144d4cf8d1() { +function enqueue_packages_3ddf029ed8348ddcc3b8bc31397b655d() { $class_map = require_once dirname( __FILE__ ) . '/composer/autoload_classmap_package.php'; foreach ( $class_map as $class_name => $class_info ) { enqueue_package_class( $class_name, $class_info['version'], $class_info['path'] ); @@ -131,7 +112,7 @@ function enqueue_packages_e5e1fcbf7e161455e15277144d4cf8d1() { $autoload_file = __DIR__ . '/composer/autoload_files.php'; $includeFiles = file_exists( $autoload_file ) ? require $autoload_file - : []; + : array(); foreach ( $includeFiles as $fileIdentifier => $file ) { if ( empty( $GLOBALS['__composer_autoload_files'][ $fileIdentifier ] ) ) { @@ -141,4 +122,4 @@ function enqueue_packages_e5e1fcbf7e161455e15277144d4cf8d1() { } } } -enqueue_packages_e5e1fcbf7e161455e15277144d4cf8d1(); +enqueue_packages_3ddf029ed8348ddcc3b8bc31397b655d(); diff --git a/plugins/jetpack/vendor/automattic/jetpack-assets/src/class-assets.php b/plugins/jetpack/vendor/automattic/jetpack-assets/src/class-assets.php index 7713aadf..b071ab1f 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-assets/src/class-assets.php +++ b/plugins/jetpack/vendor/automattic/jetpack-assets/src/class-assets.php @@ -37,6 +37,20 @@ class Assets { $path = ( Jetpack_Constants::is_defined( 'SCRIPT_DEBUG' ) && Jetpack_Constants::get_constant( 'SCRIPT_DEBUG' ) ) ? $non_min_path : $min_path; - return plugins_url( $path, Jetpack_Constants::get_constant( 'JETPACK__PLUGIN_FILE' ) ); + + $url = plugins_url( $path, Jetpack_Constants::get_constant( 'JETPACK__PLUGIN_FILE' ) ); + + /** + * Filters the URL for a file passed through the get_file_url_for_environment function. + * + * @since 8.1.0 + * + * @package assets + * + * @param string $url The URL to the file. + * @param string $min_path The minified path. + * @param string $non_min_path The non-minified path. + */ + return apply_filters( 'jetpack_get_file_for_environment', $url, $min_path, $non_min_path ); } } diff --git a/plugins/jetpack/vendor/automattic/jetpack-config/src/class-config.php b/plugins/jetpack/vendor/automattic/jetpack-config/src/class-config.php new file mode 100644 index 00000000..6f16373a --- /dev/null +++ b/plugins/jetpack/vendor/automattic/jetpack-config/src/class-config.php @@ -0,0 +1,200 @@ +<?php +/** + * The base Jetpack configuration class file. + * + * @package automattic/jetpack-config + */ + +namespace Automattic\Jetpack; + +use Automattic\Jetpack\Connection\Manager; +use Automattic\Jetpack\JITM; +use Automattic\Jetpack\Plugin\Tracking as Plugin_Tracking; +use Automattic\Jetpack\Sync\Main as Sync_Main; +use Automattic\Jetpack\Terms_Of_Service; + +/** + * The configuration class. + */ +class Config { + + const FEATURE_ENSURED = 1; + const FEATURE_NOT_AVAILABLE = 0; + const FEATURE_ALREADY_ENSURED = -1; + + /** + * The initial setting values. + * + * @var Array + */ + protected $config = array( + 'jitm' => false, + 'connection' => false, + 'sync' => false, + 'tracking' => false, + 'tos' => false, + ); + + /** + * Creates the configuration class instance. + */ + public function __construct() { + + /** + * Adding the config handler to run on priority 2 because the class itself is + * being constructed on priority 1. + */ + add_action( 'plugins_loaded', array( $this, 'on_plugins_loaded' ), 2 ); + } + + /** + * Require a feature to be initialized. It's up to the package consumer to actually add + * the package to their composer project. Declaring a requirement using this method + * instructs the class to initalize it. + * + * @param String $feature the feature slug. + */ + public function ensure( $feature ) { + $this->config[ $feature ] = true; + } + + /** + * Runs on plugins_loaded hook priority with priority 2. + * + * @action plugins_loaded + */ + public function on_plugins_loaded() { + if ( $this->config['connection'] ) { + $this->ensure_class( 'Automattic\Jetpack\Connection\Manager' ) + && $this->ensure_feature( 'connection' ); + } + + if ( $this->config['tracking'] ) { + $this->ensure_class( 'Automattic\Jetpack\Terms_Of_Service' ) + && $this->ensure_class( 'Automattic\Jetpack\Tracking' ) + && $this->ensure_feature( 'tracking' ); + } + + if ( $this->config['sync'] ) { + $this->ensure_class( 'Automattic\Jetpack\Sync\Main' ) + && $this->ensure_feature( 'sync' ); + } + + if ( $this->config['jitm'] ) { + $this->ensure_class( 'Automattic\Jetpack\JITM' ) + && $this->ensure_feature( 'jitm' ); + } + } + + /** + * Returns true if the required class is available and alerts the user if it's not available + * in case the site is in debug mode. + * + * @param String $classname a fully qualified class name. + * @return Boolean whether the class is available. + */ + protected function ensure_class( $classname ) { + $available = class_exists( $classname ); + + if ( ! $available && defined( 'WP_DEBUG' ) && WP_DEBUG ) { + trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error + sprintf( + /* translators: %1$s is a PHP class name. */ + esc_html__( + 'Unable to load class %1$s. Please add the package that contains it using composer and make sure you are requiring the Jetpack autoloader', + 'jetpack' + ), + esc_html( $classname ) + ), + E_USER_NOTICE + ); + } + + return $available; + } + + /** + * Ensures a feature is enabled, sets it up if it hasn't already been set up. + * + * @param String $feature slug of the feature. + * @return Integer either FEATURE_ENSURED, FEATURE_ALREADY_ENSURED or FEATURE_NOT_AVAILABLE constants. + */ + protected function ensure_feature( $feature ) { + $method = 'enable_' . $feature; + if ( ! method_exists( $this, $method ) ) { + return self::FEATURE_NOT_AVAILABLE; + } + + if ( did_action( 'jetpack_feature_' . $feature . '_enabled' ) ) { + return self::FEATURE_ALREADY_ENSURED; + } + + $this->{ $method }(); + + /** + * Fires when a specific Jetpack package feature is initalized using the Config package. + * + * @since 8.2.0 + */ + do_action( 'jetpack_feature_' . $feature . '_enabled' ); + + return self::FEATURE_ENSURED; + } + + /** + * Dummy method to enable Terms of Service. + */ + protected function enable_tos() { + return true; + } + + /** + * Enables the tracking feature. Depends on the Terms of Service package, so enables it too. + */ + protected function enable_tracking() { + + // Enabling dependencies. + $this->ensure_feature( 'tos' ); + + $terms_of_service = new Terms_Of_Service(); + $tracking = new Plugin_Tracking(); + if ( $terms_of_service->has_agreed() ) { + add_action( 'init', array( $tracking, 'init' ) ); + } else { + /** + * Initialize tracking right after the user agrees to the terms of service. + */ + add_action( 'jetpack_agreed_to_terms_of_service', array( $tracking, 'init' ) ); + } + + return true; + } + + /** + * Enables the JITM feature. + */ + protected function enable_jitm() { + JITM::configure(); + + return true; + } + + /** + * Enables the Sync feature. + */ + protected function enable_sync() { + Sync_Main::configure(); + + return true; + } + + /** + * Enables the Connection feature. + */ + protected function enable_connection() { + Manager::configure(); + + return true; + } + +} diff --git a/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-client.php b/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-client.php index 0070f294..e8f16b6e 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-client.php +++ b/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-client.php @@ -70,7 +70,7 @@ class Client { $token_key = sprintf( '%s:%d:%d', $token_key, - Constants::get_constant( 'JETPACK__API_VERSION' ), + Utils::get_jetpack_api_version(), $token->external_user_id ); diff --git a/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-manager.php b/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-manager.php index f37dbf88..d97cf077 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-manager.php +++ b/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-manager.php @@ -50,20 +50,22 @@ class Manager { * * @todo Implement a proper nonce verification. */ - public function init() { - $this->setup_xmlrpc_handlers( + public static function configure() { + $manager = new self(); + + $manager->setup_xmlrpc_handlers( $_GET, // phpcs:ignore WordPress.Security.NonceVerification.Recommended - $this->is_active(), - $this->verify_xml_rpc_signature() + $manager->is_active(), + $manager->verify_xml_rpc_signature() ); - if ( $this->is_active() ) { - add_filter( 'xmlrpc_methods', array( $this, 'public_xmlrpc_methods' ) ); + if ( $manager->is_active() ) { + add_filter( 'xmlrpc_methods', array( $manager, 'public_xmlrpc_methods' ) ); } else { - add_action( 'rest_api_init', array( $this, 'initialize_rest_api_registration_connector' ) ); + add_action( 'rest_api_init', array( $manager, 'initialize_rest_api_registration_connector' ) ); } - add_action( 'jetpack_clean_nonces', array( $this, 'clean_nonces' ) ); + add_action( 'jetpack_clean_nonces', array( $manager, 'clean_nonces' ) ); if ( ! wp_next_scheduled( 'jetpack_clean_nonces' ) ) { wp_schedule_event( time(), 'hourly', 'jetpack_clean_nonces' ); } @@ -335,7 +337,7 @@ class Manager { if ( empty( $token_key ) || - empty( $version ) || strval( JETPACK__API_VERSION ) !== $version + empty( $version ) || strval( Utils::get_jetpack_api_version() ) !== $version ) { return new \WP_Error( 'malformed_token', 'Malformed token in request', compact( 'signature_details' ) ); } @@ -526,7 +528,7 @@ class Manager { * @return string|int Returns the ID of the connection owner or False if no connection owner found. */ public function get_connection_owner_id() { - $user_token = $this->get_access_token( JETPACK_MASTER_USER ); + $user_token = $this->get_access_token( self::JETPACK_MASTER_USER ); $connection_owner = false; if ( $user_token && is_object( $user_token ) && isset( $user_token->external_user_id ) ) { $connection_owner = $user_token->external_user_id; @@ -601,7 +603,7 @@ class Manager { * @return object|false False if no connection owner found. */ public function get_connection_owner() { - $user_token = $this->get_access_token( JETPACK_MASTER_USER ); + $user_token = $this->get_access_token( self::JETPACK_MASTER_USER ); $connection_owner = false; if ( $user_token && is_object( $user_token ) && isset( $user_token->external_user_id ) ) { @@ -623,7 +625,7 @@ class Manager { $user_id = get_current_user_id(); } - $user_token = $this->get_access_token( JETPACK_MASTER_USER ); + $user_token = $this->get_access_token( self::JETPACK_MASTER_USER ); return $user_token && is_object( $user_token ) && isset( $user_token->external_user_id ) && $user_id === $user_token->external_user_id; } @@ -714,10 +716,8 @@ class Manager { */ public function api_url( $relative_url ) { $api_base = Constants::get_constant( 'JETPACK__API_BASE' ); - $version = Constants::get_constant( 'JETPACK__API_VERSION' ); - $api_base = $api_base ? $api_base : 'https://jetpack.wordpress.com/jetpack.'; - $version = $version ? '/' . $version . '/' : '/1/'; + $version = '/' . Utils::get_jetpack_api_version() . '/'; /** * Filters the API URL that Jetpack uses for server communication. @@ -1556,6 +1556,7 @@ class Manager { return new \WP_Error( 'unknown', '', $code ); } + /* translators: Error description string. */ $error_description = isset( $json->error_description ) ? sprintf( __( 'Error Details: %s', 'jetpack' ), (string) $json->error_description ) : ''; return new \WP_Error( (string) $json->error, $error_description, $code ); diff --git a/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-utils.php b/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-utils.php index 1c280262..652fd250 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-utils.php +++ b/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-utils.php @@ -14,6 +14,8 @@ use Automattic\Jetpack\Constants; */ class Utils { + const DEFAULT_JETPACK_API_VERSION = 1; + /** * Some hosts disable the OpenSSL extension and so cannot make outgoing HTTPS requests. * This method sets the URL scheme to HTTP when HTTPS requests can't be made. @@ -59,4 +61,16 @@ class Utils { } return \Jetpack_Options::update_options( $options ); } + + /** + * Returns the Jetpack__API_VERSION constant if it exists, else returns a + * default value of 1. + * + * @return integer + */ + public static function get_jetpack_api_version() { + $api_version = Constants::get_constant( 'JETPACK__API_VERSION' ); + $api_version = $api_version ? $api_version : self::DEFAULT_JETPACK_API_VERSION; + return $api_version; + } } diff --git a/plugins/jetpack/vendor/automattic/jetpack-jitm/src/class-jitm.php b/plugins/jetpack/vendor/automattic/jetpack-jitm/src/class-jitm.php index ccdd1d72..79a2947f 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-jitm/src/class-jitm.php +++ b/plugins/jetpack/vendor/automattic/jetpack-jitm/src/class-jitm.php @@ -11,6 +11,7 @@ use Automattic\Jetpack\Assets; use Automattic\Jetpack\Connection\Manager as Jetpack_Connection; use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Assets\Logo as Jetpack_Logo; +use Automattic\Jetpack\Partner; use Automattic\Jetpack\Tracking; use Automattic\Jetpack\Connection\Manager; @@ -33,6 +34,14 @@ class JITM { private $tracking; /** + * The configuration method that is called from the jetpack-config package. + */ + public static function configure() { + $jitm = new self(); + $jitm->register(); + } + + /** * JITM constructor. */ public function __construct() { @@ -564,11 +573,8 @@ class JITM { 'u' => $user->ID, ); - if ( ! class_exists( 'Jetpack_Affiliate' ) ) { - require_once JETPACK__PLUGIN_DIR . 'class.jetpack-affiliate.php'; - } // Get affiliate code and add it to the array of URL parameters. - $aff = \Jetpack_Affiliate::init()->get_affiliate_code(); + $aff = Partner::init()->get_partner_code( Partner::AFFILIATE_CODE ); if ( '' !== $aff ) { $url_params['aff'] = $aff; } diff --git a/plugins/jetpack/vendor/automattic/jetpack-partner/src/class-partner.php b/plugins/jetpack/vendor/automattic/jetpack-partner/src/class-partner.php new file mode 100644 index 00000000..62d984e8 --- /dev/null +++ b/plugins/jetpack/vendor/automattic/jetpack-partner/src/class-partner.php @@ -0,0 +1,152 @@ +<?php +/** + * Jetpack Partner package. + * + * @package automattic/jetpack-partner + */ + +namespace Automattic\Jetpack; + +/** + * This class introduces functionality used by Jetpack hosting partners. + * + * @since 8.1.0 + */ +class Partner { + + /** + * Affiliate code. + */ + const AFFILIATE_CODE = 'affiliate'; + + /** + * Subsidiary id code. + */ + const SUBSIDIARY_CODE = 'subsidiary'; + + /** + * Singleton instance. + * + * @since 8.1.0 + * + * @var Partner This class instance. + */ + private static $instance = null; + + /** + * Partner constructor. + */ + private function __construct() { + } + + /** + * Initializes the class or returns the singleton. + * + * @return Partner | false + * @since 8.1.0 + */ + public static function init() { + if ( is_null( self::$instance ) ) { + self::$instance = new Partner(); + add_filter( 'jetpack_build_connection_url', array( self::$instance, 'add_subsidiary_id_as_query_arg' ) ); + add_filter( 'jetpack_build_connection_url', array( self::$instance, 'add_affiliate_code_as_query_arg' ) ); + } + + return self::$instance; + } + + /** + * Adds the partner subsidiary code to the passed URL. + * + * @param string $url The URL. + * + * @return string + */ + public function add_subsidiary_id_as_query_arg( $url ) { + return $this->add_code_as_query_arg( self::SUBSIDIARY_CODE, $url ); + } + + /** + * Adds the affiliate code to the passed URL. + * + * @param string $url The URL. + * + * @return string + */ + public function add_affiliate_code_as_query_arg( $url ) { + return $this->add_code_as_query_arg( self::AFFILIATE_CODE, $url ); + } + + /** + * Returns the passed URL with the partner code added as a URL query arg. + * + * @param string $type The partner code. + * @param string $url The URL where the partner subsidiary id will be added. + * + * @return string The passed URL with the partner code added. + * @since 8.1.0 + */ + public function add_code_as_query_arg( $type, $url ) { + switch ( $type ) { + case self::AFFILIATE_CODE: + $query_arg_name = 'aff'; + break; + case self::SUBSIDIARY_CODE: + $query_arg_name = 'subsidiaryId'; + break; + default: + return $url; + } + + $code = $this->get_partner_code( $type ); + + if ( '' === $code ) { + return $url; + } + + return add_query_arg( $query_arg_name, $code, $url ); + } + + /** + * Returns a partner code. + * + * @param string $type This can be either 'affiliate' or 'subsidiary'. Returns empty string when code is unknown. + * + * @return string The partner code. + * @since 8.1.0 + */ + public function get_partner_code( $type ) { + switch ( $type ) { + case self::AFFILIATE_CODE: + /** + * Allow to filter the affiliate code. + * + * @param string $affiliate_code The affiliate code, blank by default. + * + * @since 6.9.0 + */ + 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 8.1.0 + */ + return apply_filters( + 'jetpack_partner_subsidiary_id', + get_option( 'jetpack_partner_subsidiary_id', '' ) + ); + default: + return ''; + } + } + + /** + * Resets the singleton for testing purposes. + */ + public static function reset() { + self::$instance = null; + } +} diff --git a/plugins/jetpack/vendor/automattic/jetpack-status/src/class-status.php b/plugins/jetpack/vendor/automattic/jetpack-status/src/class-status.php index f87ca9af..5a299056 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-status/src/class-status.php +++ b/plugins/jetpack/vendor/automattic/jetpack-status/src/class-status.php @@ -80,4 +80,72 @@ class Status { } return 1 === (int) $some_users; } + + /** + * If is a staging site. + * + * @todo Add IDC detection to a package. + * + * @return bool + */ + public function is_staging_site() { + $is_staging = false; + + $known_staging = array( + 'urls' => array( + '#\.staging\.wpengine\.com$#i', // WP Engine. + '#\.staging\.kinsta\.com$#i', // Kinsta.com. + '#\.stage\.site$#i', // DreamPress. + ), + 'constants' => array( + 'IS_WPE_SNAPSHOT', // WP Engine. + 'KINSTA_DEV_ENV', // Kinsta.com. + 'WPSTAGECOACH_STAGING', // WP Stagecoach. + 'JETPACK_STAGING_MODE', // Generic. + ), + ); + /** + * Filters the flags of known staging sites. + * + * @since 3.9.0 + * + * @param array $known_staging { + * An array of arrays that each are used to check if the current site is staging. + * @type array $urls URLs of staging sites in regex to check against site_url. + * @type array $constants PHP constants of known staging/developement environments. + * } + */ + $known_staging = apply_filters( 'jetpack_known_staging', $known_staging ); + + if ( isset( $known_staging['urls'] ) ) { + foreach ( $known_staging['urls'] as $url ) { + if ( preg_match( $url, site_url() ) ) { + $is_staging = true; + break; + } + } + } + + if ( isset( $known_staging['constants'] ) ) { + foreach ( $known_staging['constants'] as $constant ) { + if ( defined( $constant ) && constant( $constant ) ) { + $is_staging = true; + } + } + } + + // Last, let's check if sync is erroring due to an IDC. If so, set the site to staging mode. + if ( ! $is_staging && method_exists( 'Jetpack', 'validate_sync_error_idc_option' ) && \Jetpack::validate_sync_error_idc_option() ) { + $is_staging = true; + } + + /** + * Filters is_staging_site check. + * + * @since 3.9.0 + * + * @param bool $is_staging If the current site is a staging site. + */ + return apply_filters( 'jetpack_is_staging_site', $is_staging ); + } } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-actions.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-actions.php index 2c31b914..3cd482e6 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-actions.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-actions.php @@ -128,7 +128,7 @@ class Actions { ) ) { self::initialize_sender(); add_action( 'shutdown', array( self::$sender, 'do_sync' ) ); - add_action( 'shutdown', array( self::$sender, 'do_full_sync' ) ); + add_action( 'shutdown', array( self::$sender, 'do_full_sync' ), 9999 ); } } @@ -177,6 +177,10 @@ class Actions { * @return bool */ public static function sync_allowed() { + if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { + return false; + } + if ( defined( 'PHPUNIT_JETPACK_TESTSUITE' ) ) { return true; } @@ -189,7 +193,7 @@ class Actions { return false; } - if ( \Jetpack::is_staging_site() ) { + if ( ( new Status() )->is_staging_site() ) { return false; } @@ -723,9 +727,10 @@ class Actions { $sync_module = Modules::get_module( 'full-sync' ); $queue = self::$sender->get_sync_queue(); - $full_queue = self::$sender->get_full_sync_queue(); - $cron_timestamps = array_keys( _get_cron_array() ); - $next_cron = $cron_timestamps[0] - time(); + + // _get_cron_array can be false + $cron_timestamps = ( _get_cron_array() ) ? array_keys( _get_cron_array() ) : array(); + $next_cron = ( ! empty( $cron_timestamps ) ) ? $cron_timestamps[0] - time() : ''; $checksums = array(); @@ -749,7 +754,9 @@ class Actions { $full_sync_status = ( $sync_module ) ? $sync_module->get_status() : array(); - return array_merge( + $full_queue = self::$sender->get_full_sync_queue(); + + $result = array_merge( $full_sync_status, $checksums, array( @@ -758,10 +765,15 @@ class Actions { 'queue_size' => $queue->size(), 'queue_lag' => $queue->lag(), 'queue_next_sync' => ( self::$sender->get_next_sync_time( 'sync' ) - microtime( true ) ), - 'full_queue_size' => $full_queue->size(), - 'full_queue_lag' => $full_queue->lag(), 'full_queue_next_sync' => ( self::$sender->get_next_sync_time( 'full_sync' ) - microtime( true ) ), ) ); + + // Verify $sync_module is not false + if ( ( $sync_module ) && false === strpos( get_class( $sync_module ), 'Full_Sync_Immediately' ) ) { + $result['full_queue_size'] = $full_queue->size(); + $result['full_queue_lag'] = $full_queue->lag(); + } + return $result; } } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-defaults.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-defaults.php index 69b7c7a8..c6ff4632 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-defaults.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-defaults.php @@ -7,10 +7,7 @@ namespace Automattic\Jetpack\Sync; -require_once JETPACK__PLUGIN_DIR . 'modules/sso/class.jetpack-sso-helpers.php'; - use Automattic\Jetpack\Status; -use Automattic\Jetpack\Sync\Functions; /** * Just some defaults that we share with the server. @@ -283,11 +280,6 @@ class Defaults { 'shortcodes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_shortcodes' ), 'rest_api_allowed_post_types' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_post_types' ), 'rest_api_allowed_public_metadata' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_public_metadata' ), - 'sso_is_two_step_required' => array( 'Jetpack_SSO_Helpers', 'is_two_step_required' ), - 'sso_should_hide_login_form' => array( 'Jetpack_SSO_Helpers', 'should_hide_login_form' ), - 'sso_match_by_email' => array( 'Jetpack_SSO_Helpers', 'match_by_email' ), - 'sso_new_user_override' => array( 'Jetpack_SSO_Helpers', 'new_user_override' ), - 'sso_bypass_default_login_form' => array( 'Jetpack_SSO_Helpers', 'bypass_login_forward_wpcom' ), 'wp_version' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'wp_version' ), 'get_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins' ), 'get_plugins_action_links' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins_action_links' ), @@ -346,6 +338,19 @@ class Defaults { * @return array Whitelist of callables allowed to be managed via the JSON API. */ public static function get_callable_whitelist() { + $default = self::$default_callable_whitelist; + + if ( defined( 'JETPACK__PLUGIN_DIR' ) && include_once JETPACK__PLUGIN_DIR . 'modules/sso/class.jetpack-sso-helpers.php' ) { + $sso_helpers = array( + 'sso_is_two_step_required' => array( 'Jetpack_SSO_Helpers', 'is_two_step_required' ), + 'sso_should_hide_login_form' => array( 'Jetpack_SSO_Helpers', 'should_hide_login_form' ), + 'sso_match_by_email' => array( 'Jetpack_SSO_Helpers', 'match_by_email' ), + 'sso_new_user_override' => array( 'Jetpack_SSO_Helpers', 'new_user_override' ), + 'sso_bypass_default_login_form' => array( 'Jetpack_SSO_Helpers', 'bypass_login_forward_wpcom' ), + ); + $default = array_merge( $default, $sso_helpers ); + } + /** * Filter the list of callables that are manageable via the JSON API. * @@ -355,7 +360,7 @@ class Defaults { * * @param array The default list of callables. */ - return apply_filters( 'jetpack_sync_callable_whitelist', self::$default_callable_whitelist ); + return apply_filters( 'jetpack_sync_callable_whitelist', $default ); } /** @@ -1018,14 +1023,14 @@ class Defaults { * * @var int Number of seconds. */ - public static $default_sync_wait_threshold = 5; + public static $default_sync_wait_threshold = 10; /** * Default wait between attempting to continue a full sync via requests. * * @var int Number of seconds. */ - public static $default_enqueue_wait_time = 10; + public static $default_enqueue_wait_time = 1; /** * Maximum queue size. @@ -1130,6 +1135,13 @@ class Defaults { public static $default_max_queue_size_full_sync = 1000; // max number of total items in the full sync queue. /** + * Default max time for sending in immediate mode. + * + * @var float Number of Seconds + */ + public static $default_full_sync_send_duration = 9; + + /** * Defaul for time between syncing callables. * * @var int Number of seconds. @@ -1154,7 +1166,7 @@ class Defaults { * * @var int Number of seconds. */ - public static $default_cron_sync_time_limit = 30; // 30 seconds. + public static $default_cron_sync_time_limit = 4 * MINUTE_IN_SECONDS; /** * Default for number of term relationship items sent in an full sync item. @@ -1176,4 +1188,51 @@ class Defaults { * @var int 1 for true. */ public static $default_full_sync_sender_enabled = 1; // Should send full sync items. + + /** + * Default Full Sync config + * + * @var array list of module names. + */ + public static $default_full_sync_config = array( + 'constants' => 1, + 'functions' => 1, + 'options' => 1, + 'updates' => 1, + 'themes' => 1, + 'users' => 1, + 'terms' => 1, + 'posts' => 1, + 'comments' => 1, + 'term_relationships' => 1, + ); + + /** + * Default Full Sync max objects to send on a single request. + * + * @var array list of module => max. + */ + public static $default_full_sync_limits = array( + 'users' => array( + 'chunk_size' => 100, + 'max_chunks' => 10, + ), + 'terms' => array( + 'chunk_size' => 1000, + 'max_chunks' => 10, + ), + 'posts' => array( + 'chunk_size' => 100, + 'max_chunks' => 1, + ), + 'comments' => array( + 'chunk_size' => 100, + 'max_chunks' => 10, + ), + 'term_relationships' => array( + 'chunk_size' => 1000, + 'max_chunks' => 10, + ), + ); + } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-functions.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-functions.php index dc45c5c8..cfdc2bd8 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-functions.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-functions.php @@ -161,22 +161,83 @@ class Functions { * @return string Hosting provider. */ public static function get_hosting_provider() { - if ( defined( 'GD_SYSTEM_PLUGIN_DIR' ) || class_exists( '\\WPaaS\\Plugin' ) ) { - return 'gd-managed-wp'; - } - if ( defined( 'MM_BASE_DIR' ) ) { - return 'bh'; + $hosting_provider_detection_methods = array( + 'get_hosting_provider_by_known_constant', + 'get_hosting_provider_by_known_class', + 'get_hosting_provider_by_known_function', + ); + + $functions = new Functions(); + foreach ( $hosting_provider_detection_methods as $method ) { + $hosting_provider = call_user_func( array( $functions, $method ) ); + if ( false !== $hosting_provider ) { + return $hosting_provider; + } } - if ( defined( 'IS_PRESSABLE' ) ) { - return 'pressable'; + + return 'unknown'; + } + + /** + * Return a hosting provider using a set of known constants. + * + * @return mixed A host identifier string or false. + */ + public function get_hosting_provider_by_known_constant() { + $hosting_provider_constants = array( + 'GD_SYSTEM_PLUGIN_DIR' => 'gd-managed-wp', + 'MM_BASE_DIR' => 'bh', + 'PAGELYBIN' => 'pagely', + 'KINSTAMU_VERSION' => 'kinsta', + 'FLYWHEEL_CONFIG_DIR' => 'flywheel', + 'IS_PRESSABLE' => 'pressable', + 'VIP_GO_ENV' => 'vip-go', + ); + + foreach ( $hosting_provider_constants as $constant => $constant_value ) { + if ( Constants::is_defined( $constant ) ) { + if ( 'VIP_GO_ENV' === $constant && false === Constants::get_constant( 'VIP_GO_ENV' ) ) { + continue; + } + return $constant_value; + } } - if ( function_exists( 'is_wpe' ) || function_exists( 'is_wpe_snapshot' ) ) { - return 'wpe'; + + return false; + } + + /** + * Return a hosting provider using a set of known classes. + * + * @return mixed A host identifier string or false. + */ + public function get_hosting_provider_by_known_class() { + $hosting_provider = false; + + switch ( true ) { + case ( class_exists( '\\WPaaS\\Plugin' ) ): + $hosting_provider = 'gd-managed-wp'; + break; } - if ( defined( 'VIP_GO_ENV' ) && false !== VIP_GO_ENV ) { - return 'vip-go'; + + return $hosting_provider; + } + + /** + * Return a hosting provider using a set of known functions. + * + * @return mixed A host identifier string or false. + */ + public function get_hosting_provider_by_known_function() { + $hosting_provider = false; + + switch ( true ) { + case ( function_exists( 'is_wpe' ) || function_exists( 'is_wpe_snapshot' ) ): + $hosting_provider = 'wpe'; + break; } - return 'unknown'; + + return $hosting_provider; } /** diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-listener.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-listener.php index 8073e11b..db5f377e 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-listener.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-listener.php @@ -70,7 +70,6 @@ class Listener { * This is necessary because you can't use "new" when you declare instance properties >:( */ protected function __construct() { - Main::init(); $this->set_defaults(); $this->init(); } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-main.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-main.php index 2e1c3cbd..ac552008 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-main.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-main.php @@ -7,28 +7,59 @@ namespace Automattic\Jetpack\Sync; +use Automattic\Jetpack\Sync\Actions as Sync_Actions; + /** * Jetpack Sync main class. */ class Main { + + /** + * Sets up event handlers for the Sync package. Is used from the Config package. + * + * @action plugins_loaded + */ + public static function configure() { + if ( Actions::sync_allowed() ) { + add_action( 'plugins_loaded', array( __CLASS__, 'on_plugins_loaded_early' ), 5 ); + add_action( 'plugins_loaded', array( __CLASS__, 'on_plugins_loaded_late' ), 90 ); + } + // Any hooks below are special cases that need to be declared even if Sync is not allowed. + add_action( 'jetpack_user_authorized', array( 'Automattic\\Jetpack\\Sync\\Actions', 'do_initial_sync' ), 10, 0 ); + } + /** * Initialize the main sync actions. + * + * @action plugins_loaded */ - public static function init() { - // Check for WooCommerce support. - add_action( 'plugins_loaded', array( 'Automattic\\Jetpack\\Sync\\Actions', 'initialize_woocommerce' ), 5 ); + public static function on_plugins_loaded_early() { + /** + * Additional Sync modules can be carried out into their own packages and they + * will get their own config settings. + * + * For now additional modules are enabled based on whether the third party plugin + * class exists or not. + */ + Sync_Actions::initialize_woocommerce(); + Sync_Actions::initialize_wp_super_cache(); - // Check for WP Super Cache. - add_action( 'plugins_loaded', array( 'Automattic\\Jetpack\\Sync\\Actions', 'initialize_wp_super_cache' ), 5 ); + // We need to define this here so that it's hooked before `updating_jetpack_version` is called. + add_action( 'updating_jetpack_version', array( 'Automattic\\Jetpack\\Sync\\Actions', 'cleanup_on_upgrade' ), 10, 2 ); + } + /** + * Runs after most of plugins_loaded hook functions have been run. + * + * @action plugins_loaded + */ + public static function on_plugins_loaded_late() { /* * Init after plugins loaded and before the `init` action. This helps with issues where plugins init * with a high priority or sites that use alternate cron. */ - add_action( 'plugins_loaded', array( 'Automattic\\Jetpack\\Sync\\Actions', 'init' ), 90 ); - - // We need to define this here so that it's hooked before `updating_jetpack_version` is called. - add_action( 'updating_jetpack_version', array( 'Automattic\\Jetpack\\Sync\\Actions', 'cleanup_on_upgrade' ), 10, 2 ); - add_action( 'jetpack_user_authorized', array( 'Automattic\\Jetpack\\Sync\\Actions', 'do_initial_sync' ), 10, 0 ); + Sync_Actions::init(); } + + } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-modules.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-modules.php index 1aaddb9a..09e95e5d 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-modules.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-modules.php @@ -8,6 +8,8 @@ namespace Automattic\Jetpack\Sync; +use Automattic\Jetpack\Sync\Modules\Module; + /** * A class to handle loading of sync modules. */ @@ -21,56 +23,28 @@ class Modules { * @var array */ const DEFAULT_SYNC_MODULES = array( - 'Jetpack_Sync_Modules_Constants', - 'Jetpack_Sync_Modules_Callables', - 'Jetpack_Sync_Modules_Network_Options', - 'Jetpack_Sync_Modules_Options', - 'Jetpack_Sync_Modules_Terms', - 'Jetpack_Sync_Modules_Menus', - 'Jetpack_Sync_Modules_Themes', - 'Jetpack_Sync_Modules_Users', - 'Jetpack_Sync_Modules_Import', - 'Jetpack_Sync_Modules_Posts', - 'Jetpack_Sync_Modules_Protect', - 'Jetpack_Sync_Modules_Comments', - 'Jetpack_Sync_Modules_Updates', - 'Jetpack_Sync_Modules_Attachments', - 'Jetpack_Sync_Modules_Meta', - 'Jetpack_Sync_Modules_Plugins', - 'Jetpack_Sync_Modules_Stats', - 'Jetpack_Sync_Modules_Full_Sync', + 'Automattic\\Jetpack\\Sync\\Modules\\Constants', + 'Automattic\\Jetpack\\Sync\\Modules\\Callables', + 'Automattic\\Jetpack\\Sync\\Modules\\Network_Options', + 'Automattic\\Jetpack\\Sync\\Modules\\Options', + 'Automattic\\Jetpack\\Sync\\Modules\\Terms', + 'Automattic\\Jetpack\\Sync\\Modules\\Menus', + 'Automattic\\Jetpack\\Sync\\Modules\\Themes', + 'Automattic\\Jetpack\\Sync\\Modules\\Users', + 'Automattic\\Jetpack\\Sync\\Modules\\Import', + 'Automattic\\Jetpack\\Sync\\Modules\\Posts', + 'Automattic\\Jetpack\\Sync\\Modules\\Protect', + 'Automattic\\Jetpack\\Sync\\Modules\\Comments', + 'Automattic\\Jetpack\\Sync\\Modules\\Updates', + 'Automattic\\Jetpack\\Sync\\Modules\\Attachments', + 'Automattic\\Jetpack\\Sync\\Modules\\Meta', + 'Automattic\\Jetpack\\Sync\\Modules\\Plugins', + 'Automattic\\Jetpack\\Sync\\Modules\\Stats', + 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately', 'Automattic\\Jetpack\\Sync\\Modules\\Term_Relationships', ); /** - * Maps classnames of sync modules before to v7.5 to classnames of sync modules after v7.5. - * - * @access public - * - * @var array - */ - const LEGACY_SYNC_MODULES_MAP = array( - 'Jetpack_Sync_Modules_Constants' => 'Automattic\\Jetpack\\Sync\\Modules\\Constants', - 'Jetpack_Sync_Modules_Callables' => 'Automattic\\Jetpack\\Sync\\Modules\\Callables', - 'Jetpack_Sync_Modules_Network_Options' => 'Automattic\\Jetpack\\Sync\\Modules\\Network_Options', - 'Jetpack_Sync_Modules_Options' => 'Automattic\\Jetpack\\Sync\\Modules\\Options', - 'Jetpack_Sync_Modules_Terms' => 'Automattic\\Jetpack\\Sync\\Modules\\Terms', - 'Jetpack_Sync_Modules_Menus' => 'Automattic\\Jetpack\\Sync\\Modules\\Menus', - 'Jetpack_Sync_Modules_Themes' => 'Automattic\\Jetpack\\Sync\\Modules\\Themes', - 'Jetpack_Sync_Modules_Users' => 'Automattic\\Jetpack\\Sync\\Modules\\Users', - 'Jetpack_Sync_Modules_Import' => 'Automattic\\Jetpack\\Sync\\Modules\\Import', - 'Jetpack_Sync_Modules_Posts' => 'Automattic\\Jetpack\\Sync\\Modules\\Posts', - 'Jetpack_Sync_Modules_Protect' => 'Automattic\\Jetpack\\Sync\\Modules\\Protect', - 'Jetpack_Sync_Modules_Comments' => 'Automattic\\Jetpack\\Sync\\Modules\\Comments', - 'Jetpack_Sync_Modules_Updates' => 'Automattic\\Jetpack\\Sync\\Modules\\Updates', - 'Jetpack_Sync_Modules_Attachments' => 'Automattic\\Jetpack\\Sync\\Modules\\Attachments', - 'Jetpack_Sync_Modules_Meta' => 'Automattic\\Jetpack\\Sync\\Modules\\Meta', - 'Jetpack_Sync_Modules_Plugins' => 'Automattic\\Jetpack\\Sync\\Modules\\Plugins', - 'Jetpack_Sync_Modules_Stats' => 'Automattic\\Jetpack\\Sync\\Modules\\Stats', - 'Jetpack_Sync_Modules_Full_Sync' => 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync', - ); - - /** * Keeps track of initialized sync modules. * * @access private @@ -86,7 +60,7 @@ class Modules { * @access public * @static * - * @return array|null + * @return Module[] */ public static function get_modules() { if ( null === self::$initialized_modules ) { @@ -146,11 +120,9 @@ class Modules { */ $modules = apply_filters( 'jetpack_sync_modules', self::DEFAULT_SYNC_MODULES ); - $modules = array_map( array( 'Automattic\\Jetpack\\Sync\\Modules', 'map_legacy_modules' ), $modules ); + $modules = array_map( array( __CLASS__, 'load_module' ), $modules ); - $modules = array_map( array( 'Automattic\\Jetpack\\Sync\\Modules', 'load_module' ), $modules ); - - return array_map( array( 'Automattic\\Jetpack\\Sync\\Modules', 'set_module_defaults' ), $modules ); + return array_map( array( __CLASS__, 'set_module_defaults' ), $modules ); } /** @@ -168,25 +140,6 @@ class Modules { } /** - * For backwards compat, takes the classname of a given module pre Jetpack 7.5, - * and returns the new namespaced classname. - * - * @access public - * @static - * - * @param string $module_class The classname of a Jetpack sync module. - * - * @return string - */ - public static function map_legacy_modules( $module_class ) { - $legacy_map = self::LEGACY_SYNC_MODULES_MAP; - if ( isset( $legacy_map[ $module_class ] ) ) { - return $legacy_map[ $module_class ]; - } - return $module_class; - } - - /** * Sets defaults for the given instance of a Jetpack sync module. * * @access public @@ -203,5 +156,4 @@ class Modules { } return $module; } - } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-sender.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-sender.php index 4bed9181..641110e0 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-sender.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-sender.php @@ -7,6 +7,7 @@ namespace Automattic\Jetpack\Sync; +use Automattic\Jetpack\Connection\Manager; use Automattic\Jetpack\Constants; /** @@ -155,7 +156,7 @@ class Sender { * @access public * @static * - * @return Automattic\Jetpack\Sync\Sender + * @return Sender */ public static function get_instance() { if ( null === self::$instance ) { @@ -199,7 +200,8 @@ class Sender { * @access public */ public function maybe_set_user_from_token() { - $verified_user = \Jetpack::connection()->verify_xml_rpc_signature(); + $connection = new Manager(); + $verified_user = $connection->verify_xml_rpc_signature(); if ( Constants::is_true( 'XMLRPC_REQUEST' ) && ! is_wp_error( $verified_user ) && $verified_user @@ -257,6 +259,9 @@ class Sender { if ( ! Modules::get_module( 'full-sync' ) ) { return; } + if ( ! Settings::get_setting( 'full_sync_sender_enabled' ) ) { + return; + } $this->continue_full_sync_enqueue(); return $this->do_sync_and_set_delays( $this->full_sync_queue ); } @@ -349,16 +354,16 @@ class Sender { * * @access public * - * @param Automattic\Jetpack\Sync\Queue_Buffer $buffer Queue buffer object. - * @param boolean $encode Whether to encode the items. + * @param (array|Automattic\Jetpack\Sync\Queue_Buffer) $buffer_or_items Queue buffer or array of objects. + * @param boolean $encode Whether to encode the items. * @return array Sync items to send. */ - public function get_items_to_send( $buffer, $encode = true ) { + public function get_items_to_send( $buffer_or_items, $encode = true ) { // Track how long we've been processing so we can avoid request timeouts. $start_time = microtime( true ); $upload_size = 0; $items_to_send = array(); - $items = $buffer->get_items(); + $items = is_array( $buffer_or_items ) ? $buffer_or_items : $buffer_or_items->get_items(); // Set up current screen to avoid errors rendering content. require_once ABSPATH . 'wp-admin/includes/class-wp-screen.php'; require_once ABSPATH . 'wp-admin/includes/screen.php'; @@ -518,6 +523,61 @@ class Sender { } /** + * Immediately sends a single item without firing or enqueuing it + * + * @param string $action_name The action. + * @param array $data The data associated with the action. + * + * @return Items processed. TODO: this doesn't make much sense anymore, it should probably be just a bool. + */ + public function send_action( $action_name, $data = null ) { + if ( ! Settings::is_sender_enabled( 'full_sync' ) ) { + return array(); + } + + // Compose the data to be sent. + $action_to_send = $this->create_action_to_send( $action_name, $data ); + + list( $items_to_send, $skipped_items_ids, $items, $preprocess_duration ) = $this->get_items_to_send( $action_to_send, true ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + Settings::set_is_sending( true ); + $processed_item_ids = apply_filters( 'jetpack_sync_send_data', $items_to_send, $this->get_codec()->name(), microtime( true ), 'immediate-send', 0, $preprocess_duration ); + Settings::set_is_sending( false ); + + /** + * Allows us to keep track of all the actions that have been sent. + * Allows us to calculate the progress of specific actions. + * + * @param array $processed_actions The actions that we send successfully. + * + * @since 4.2.0 + */ + do_action( 'jetpack_sync_processed_actions', $action_to_send ); + + return $processed_item_ids; + } + + /** + * Create an synthetic action for direct sending to WPCOM during full sync (for example) + * + * @access private + * + * @param string $action_name The action. + * @param array $data The data associated with the action. + * @return array An array of synthetic sync actions keyed by current microtime(true) + */ + private function create_action_to_send( $action_name, $data ) { + return array( + (string) microtime( true ) => array( + $action_name, + $data, + get_current_user_id(), + microtime( true ), + Settings::is_importing(), + ), + ); + } + + /** * Returns any object that is able to be synced. * * @access public diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-settings.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-settings.php index 834d3670..8ab6b6fa 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-settings.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-settings.php @@ -53,6 +53,8 @@ class Settings { 'term_relationships_full_sync_item_size' => true, 'sync_sender_enabled' => true, 'full_sync_sender_enabled' => true, + 'full_sync_send_duration' => true, + 'full_sync_limits' => true, ); /** @@ -246,7 +248,7 @@ class Settings { * @return string SQL WHERE clause. */ public static function get_blacklisted_taxonomies_sql() { - return 'taxonomy NOT IN (\'' . join( '\', \'', array_map( 'esc_sql', self::get_setting( 'taxonomies_blacklist' ) ) ) . '\')'; + return "taxonomy NOT IN ('" . join( "', '", array_map( 'esc_sql', self::get_setting( 'taxonomies_blacklist' ) ) ) . "')"; } /** diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-users.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-users.php index efb43a28..f37492f6 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-users.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-users.php @@ -27,16 +27,6 @@ class Users { public static $user_roles = array(); /** - * Jetpack connection manager instance. - * - * @access public - * @static - * - * @var null|Automattic\Jetpack\Connection\Manager - */ - public static $connection = null; - - /** * Initialize sync for user data changes. * * @access public @@ -44,8 +34,8 @@ class Users { * @todo Eventually, connection needs to be instantiated at the top level in the sync package. */ public static function init() { - self::$connection = new Jetpack_Connection(); - if ( self::$connection->is_active() ) { + $connection = new Jetpack_Connection(); + if ( $connection->is_active() ) { // Kick off synchronization of user role when it changes. add_action( 'set_user_role', array( __CLASS__, 'user_role_change' ) ); } @@ -60,7 +50,8 @@ class Users { * @param int $user_id ID of the user. */ public static function user_role_change( $user_id ) { - if ( self::$connection->is_user_connected( $user_id ) ) { + $connection = new Jetpack_Connection(); + if ( $connection->is_user_connected( $user_id ) ) { self::update_role_on_com( $user_id ); // Try to choose a new master if we're demoting the current one. self::maybe_demote_master_user( $user_id ); @@ -101,7 +92,8 @@ class Users { * @return string Signed role of the user. */ public static function get_signed_role( $user_id ) { - return \Jetpack::connection()->sign_role( self::get_role( $user_id ), $user_id ); + $connection = new Jetpack_Connection(); + return $connection->sign_role( self::get_role( $user_id ), $user_id ); } /** @@ -140,9 +132,10 @@ class Users { ) ); $new_master = false; + $connection = new Jetpack_Connection(); foreach ( $query->results as $result ) { $found_user_id = absint( $result->id ); - if ( $found_user_id && self::$connection->is_user_connected( $found_user_id ) ) { + if ( $found_user_id && $connection->is_user_connected( $found_user_id ) ) { $new_master = $found_user_id; break; } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-callables.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-callables.php index d8ac3e9e..83d8e398 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-callables.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-callables.php @@ -238,6 +238,25 @@ class Callables extends Module { } /** + * Send the callable actions for full sync. + * + * @access public + * + * @param array $config Full sync configuration for this sync module. + * @param int $send_until The timestamp until the current request can send. + * @param array $status This Module Full Sync Status. + * + * @return array This Module Full Sync Status. + */ + public function send_full_sync_actions( $config, $send_until, $status ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + // we call this instead of do_action when sending immediately. + $this->send_action( 'jetpack_full_sync_callables', array( true ) ); + + // The number of actions enqueued, and next module state (true == done). + return array( 'finished' => true ); + } + + /** * Retrieve an estimated number of actions that will be enqueued. * * @access public @@ -488,4 +507,16 @@ class Callables extends Module { return $args; } + + /** + * Return Total number of objects. + * + * @param array $config Full Sync config. + * + * @return int total + */ + public function total( $config ) { + return count( $this->get_callable_whitelist() ); + } + } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-comments.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-comments.php index e956748c..ac3ca1c6 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-comments.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-comments.php @@ -273,7 +273,7 @@ class Comments extends Module { return 'comment_ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; } - return null; + return '1=1'; } /** diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-constants.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-constants.php index d4fecb3b..b95c3bc0 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-constants.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-constants.php @@ -112,18 +112,19 @@ class Constants extends Module { * * @access public * - * @param array $config Full sync configuration for this sync module. + * @param array $config Full sync configuration for this sync module. * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. + * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. + * * @return array Number of actions enqueued, and next module state. */ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable /** * Tells the client to sync all constants to the server * - * @since 4.2.0 - * * @param boolean Whether to expand constants (should always be true) + * + * @since 4.2.0 */ do_action( 'jetpack_full_sync_constants', true ); @@ -132,11 +133,31 @@ class Constants extends Module { } /** + * Send the constants actions for full sync. + * + * @access public + * + * @param array $config Full sync configuration for this sync module. + * @param int $send_until The timestamp until the current request can send. + * @param array $state This module Full Sync status. + * + * @return array This module Full Sync status. + */ + public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + // we call this instead of do_action when sending immediately. + $this->send_action( 'jetpack_full_sync_constants', array( true ) ); + + // The number of actions enqueued, and next module state (true == done). + return array( 'finished' => true ); + } + + /** * Retrieve an estimated number of actions that will be enqueued. * * @access public * * @param array $config Full sync configuration for this sync module. + * * @return array Number of items yet to be enqueued. */ public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable @@ -180,10 +201,10 @@ class Constants extends Module { /** * Tells the client to sync a constant to the server * - * @since 4.2.0 - * * @param string The name of the constant * @param mixed The value of the constant + * + * @since 4.2.0 */ do_action( 'jetpack_sync_constant', $name, $value ); $constants_checksums[ $name ] = $checksum; @@ -204,6 +225,7 @@ class Constants extends Module { */ public function get_all_constants() { $constants_whitelist = $this->get_constants_whitelist(); + return array_combine( $constants_whitelist, array_map( array( $this, 'get_constant' ), $constants_whitelist ) @@ -217,6 +239,7 @@ class Constants extends Module { * @access private * * @param string $constant Constant name. + * * @return mixed Return value of the constant. */ private function get_constant( $constant ) { @@ -231,6 +254,7 @@ class Constants extends Module { * @access public * * @param array $args The hook parameters. + * * @return array $args The hook parameters. */ public function expand_constants( $args ) { @@ -241,8 +265,21 @@ class Constants extends Module { $constants_checksums[ $name ] = $this->get_check_sum( $value ); } update_option( self::CONSTANTS_CHECKSUM_OPTION_NAME, $constants_checksums ); + return $constants; } + return $args; } + + /** + * Return Total number of objects. + * + * @param array $config Full Sync config. + * + * @return int total + */ + public function total( $config ) { + return count( $this->get_constants_whitelist() ); + } } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php new file mode 100644 index 00000000..55ddc494 --- /dev/null +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php @@ -0,0 +1,404 @@ +<?php +/** + * Full sync module. + * + * @package automattic/jetpack-sync + */ + +namespace Automattic\Jetpack\Sync\Modules; + +use Automattic\Jetpack\Sync\Defaults; +use Automattic\Jetpack\Sync\Lock; +use Automattic\Jetpack\Sync\Modules; +use Automattic\Jetpack\Sync\Settings; + +/** + * This class does a full resync of the database by + * sending an outbound action for every single object + * that we care about. + */ +class Full_Sync_Immediately extends Module { + /** + * Prefix of the full sync status option name. + * + * @var string + */ + const STATUS_OPTION = 'jetpack_sync_full_status'; + + /** + * Sync Lock name. + * + * @var string + */ + const LOCK_NAME = 'full_sync'; + + /** + * Sync module name. + * + * @access public + * + * @return string + */ + public function name() { + return 'full-sync'; + } + + /** + * Initialize action listeners for full sync. + * + * @access public + * + * @param callable $callable Action handler callable. + */ + public function init_full_sync_listeners( $callable ) { + } + + /** + * Start a full sync. + * + * @access public + * + * @param array $full_sync_config Full sync configuration. + * + * @return bool Always returns true at success. + */ + public function start( $full_sync_config = null ) { + // There was a full sync in progress. + if ( $this->is_started() && ! $this->is_finished() ) { + /** + * Fires when a full sync is cancelled. + * + * @since 4.2.0 + */ + do_action( 'jetpack_full_sync_cancelled' ); + $this->send_action( 'jetpack_full_sync_cancelled' ); + } + + // Remove all evidence of previous full sync items and status. + $this->reset_data(); + + if ( ! is_array( $full_sync_config ) ) { + $full_sync_config = Defaults::$default_full_sync_config; + if ( is_multisite() ) { + $full_sync_config['network_options'] = 1; + } + } + + if ( isset( $full_sync_config['users'] ) && 'initial' === $full_sync_config['users'] ) { + $full_sync_config['users'] = Modules::get_module( 'users' )->get_initial_sync_user_config(); + } + + $this->update_status( + array( + 'started' => time(), + 'config' => $full_sync_config, + 'progress' => $this->get_initial_progress( $full_sync_config ), + ) + ); + + $range = $this->get_content_range( $full_sync_config ); + /** + * Fires when a full sync begins. This action is serialized + * and sent to the server so that it knows a full sync is coming. + * + * @param array $full_sync_config Sync configuration for all sync modules. + * @param array $range Range of the sync items, containing min and max IDs for some item types. + * @param array $empty The modules with no items to sync during a full sync. + * + * @since 4.2.0 + * @since 7.3.0 Added $range arg. + * @since 7.4.0 Added $empty arg. + */ + do_action( 'jetpack_full_sync_start', $full_sync_config, $range ); + $this->send_action( 'jetpack_full_sync_start', array( $full_sync_config, $range ) ); + + return true; + } + + /** + * Whether full sync has started. + * + * @access public + * + * @return boolean + */ + public function is_started() { + return ! ! $this->get_status()['started']; + } + + /** + * Retrieve the status of the current full sync. + * + * @access public + * + * @return array Full sync status. + */ + public function get_status() { + $default = array( + 'started' => false, + 'finished' => false, + 'progress' => array(), + 'config' => array(), + ); + + return wp_parse_args( \Jetpack_Options::get_raw_option( self::STATUS_OPTION ), $default ); + } + + /** + * Whether full sync has finished. + * + * @access public + * + * @return boolean + */ + public function is_finished() { + return ! ! $this->get_status()['finished']; + } + + /** + * Clear all the full sync data. + * + * @access public + */ + public function reset_data() { + $this->clear_status(); + ( new Lock() )->remove( self::LOCK_NAME ); + } + + /** + * Clear all the full sync status options. + * + * @access public + */ + public function clear_status() { + \Jetpack_Options::delete_raw_option( self::STATUS_OPTION ); + } + + /** + * Updates the status of the current full sync. + * + * @access public + * + * @param array $values New values to set. + * + * @return bool True if success. + */ + public function update_status( $values ) { + return $this->set_status( wp_parse_args( $values, $this->get_status() ) ); + } + + /** + * Retrieve the status of the current full sync. + * + * @param array $values New values to set. + * + * @access public + * + * @return boolean Full sync status. + */ + public function set_status( $values ) { + return \Jetpack_Options::update_raw_option( self::STATUS_OPTION, $values ); + } + + /** + * Given an initial Full Sync configuration get the initial status. + * + * @param array $full_sync_config Full sync configuration. + * + * @return array Initial Sent status. + */ + public function get_initial_progress( $full_sync_config ) { + // Set default configuration, calculate totals, and save configuration if totals > 0. + $status = array(); + foreach ( $full_sync_config as $name => $config ) { + $module = Modules::get_module( $name ); + $status[ $name ] = array( + 'total' => $module->total( $config ), + 'sent' => 0, + 'finished' => false, + ); + } + + return $status; + } + + /** + * Get the range for content (posts and comments) to sync. + * + * @access private + * + * @return array Array of range (min ID, max ID, total items) for all content types. + */ + private function get_content_range() { + $range = array(); + $config = $this->get_status()['config']; + // Add range only when syncing all objects. + if ( true === isset( $config['posts'] ) && $config['posts'] ) { + $range['posts'] = $this->get_range( 'posts' ); + } + + if ( true === isset( $config['comments'] ) && $config['comments'] ) { + $range['comments'] = $this->get_range( 'comments' ); + } + + return $range; + } + + /** + * Get the range (min ID, max ID and total items) of items to sync. + * + * @access public + * + * @param string $type Type of sync item to get the range for. + * + * @return array Array of min ID, max ID and total items in the range. + */ + public function get_range( $type ) { + global $wpdb; + if ( ! in_array( $type, array( 'comments', 'posts' ), true ) ) { + return array(); + } + + switch ( $type ) { + case 'posts': + $table = $wpdb->posts; + $id = 'ID'; + $where_sql = Settings::get_blacklisted_post_types_sql(); + + break; + case 'comments': + $table = $wpdb->comments; + $id = 'comment_ID'; + $where_sql = Settings::get_comments_filter_sql(); + break; + } + + // TODO: Call $wpdb->prepare on the following query. + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + $results = $wpdb->get_results( "SELECT MAX({$id}) as max, MIN({$id}) as min, COUNT({$id}) as count FROM {$table} WHERE {$where_sql}" ); + if ( isset( $results[0] ) ) { + return $results[0]; + } + + return array(); + } + + /** + * Continue sending instead of enqueueing. + * + * @access public + */ + public function continue_enqueuing() { + $this->continue_sending(); + } + + /** + * Continue sending. + * + * @access public + */ + public function continue_sending() { + if ( ! ( new Lock() )->attempt( self::LOCK_NAME ) || ! $this->is_started() || $this->get_status()['finished'] ) { + return; + } + + $this->send(); + + ( new Lock() )->remove( self::LOCK_NAME ); + } + + /** + * Immediately send the next items to full sync. + * + * @access public + */ + public function send() { + $config = $this->get_status()['config']; + + $max_duration = Settings::get_setting( 'full_sync_send_duration' ); + $send_until = microtime( true ) + $max_duration; + + $progress = $this->get_status()['progress']; + + foreach ( $this->get_remaining_modules_to_send() as $module ) { + $progress[ $module->name() ] = $module->send_full_sync_actions( $config[ $module->name() ], $progress[ $module->name() ], $send_until ); + if ( ! $progress[ $module->name() ]['finished'] ) { + $this->update_status( array( 'progress' => $progress ) ); + + return; + } + } + + $this->send_full_sync_end(); + $this->update_status( array( 'progress' => $progress ) ); + } + + /** + * Get Modules that are configured to Full Sync and haven't finished sending + * + * @return array + */ + public function get_remaining_modules_to_send() { + $status = $this->get_status(); + + return array_filter( + Modules::get_modules(), + /** + * Select configured and not finished modules. + * + * @return bool + * @var $module Module + */ + function ( $module ) use ( $status ) { + // Skip module if not configured for this sync or module is done. + if ( ! isset( $status['config'][ $module->name() ] ) ) { + return false; + } + if ( ! $status['config'][ $module->name() ] ) { + return false; + } + if ( isset( $status['progress'][ $module->name() ]['finished'] ) ) { + if ( true === $status['progress'][ $module->name() ]['finished'] ) { + return false; + } + } + + return true; + } + ); + } + + /** + * Send 'jetpack_full_sync_end' and update 'finished' status. + * + * @access public + */ + public function send_full_sync_end() { + $range = $this->get_content_range(); + + /** + * Fires when a full sync ends. This action is serialized + * and sent to the server. + * + * @param string $checksum Deprecated since 7.3.0 - @see https://github.com/Automattic/jetpack/pull/11945/ + * @param array $range Range of the sync items, containing min and max IDs for some item types. + * + * @since 4.2.0 + * @since 7.3.0 Added $range arg. + */ + do_action( 'jetpack_full_sync_end', '', $range ); + $this->send_action( 'jetpack_full_sync_end', array( '', $range ) ); + + // Setting autoload to true means that it's faster to check whether we should continue enqueuing. + $this->update_status( array( 'finished' => time() ) ); + } + + /** + * Empty Function as we don't close buffers on Immediate Full Sync. + * + * @param Array $actions an array of actions, ignored for queueless sync. + */ + public function update_sent_progress_action( $actions ) { + return; + } +} diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-module.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-module.php index b8b57d87..554bc0e1 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-module.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-module.php @@ -9,6 +9,8 @@ namespace Automattic\Jetpack\Sync\Modules; use Automattic\Jetpack\Sync\Listener; use Automattic\Jetpack\Sync\Replicastore; +use Automattic\Jetpack\Sync\Sender; +use Automattic\Jetpack\Sync\Settings; /** * Basic methods implemented by Jetpack Sync extensions. @@ -125,7 +127,7 @@ abstract class Module { * @param array $config Full sync configuration for this sync module. * @param int $max_items_to_enqueue Maximum number of items to enqueue. * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. + * @return array Number of actions enqueued, and next module state. */ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // In subclasses, return the number of actions enqueued, and next module state (true == done). @@ -262,6 +264,94 @@ abstract class Module { } /** + * Given the Module Full Sync Configuration and Status return the next chunk of items to send. + * + * @param array $config This module Full Sync configuration. + * @param array $status This module Full Sync status. + * @param int $chunk_size Chunk size. + * + * @return array|object|null + */ + public function get_next_chunk( $config, $status, $chunk_size ) { + global $wpdb; + return $wpdb->get_col( + <<<SQL +SELECT {$this->id_field()} +FROM {$wpdb->{$this->table_name()}} +WHERE {$this->get_where_sql( $config )} +AND {$this->id_field()} < {$status['last_sent']} +ORDER BY {$this->id_field()} +DESC LIMIT {$chunk_size} +SQL + ); + } + + /** + * Return the initial last sent object. + * + * @return string|array initial status. + */ + public function get_initial_last_sent() { + return '~0'; + } + + /** + * Immediately send all items of a sync type as an action. + * + * @access protected + * + * @param string $config Full sync configuration for this module. + * @param array $status the current module full sync status. + * @param float $send_until timestamp until we want this request to send full sync events. + * + * @return array Status, the module full sync status updated. + */ + public function send_full_sync_actions( $config, $status, $send_until ) { + global $wpdb; + + if ( empty( $status['last_sent'] ) ) { + $status['last_sent'] = $this->get_initial_last_sent(); + } + + $limits = Settings::get_setting( 'full_sync_limits' )[ $this->name() ]; + + $chunks_sent = 0; + // phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition + while ( $objects = $this->get_next_chunk( $config, $status, $limits['chunk_size'] ) ) { + if ( $chunks_sent++ === $limits['max_chunks'] || microtime( true ) >= $send_until ) { + return $status; + } + + $result = $this->send_action( 'jetpack_full_sync_' . $this->name(), array( $objects, $status['last_sent'] ) ); + + if ( is_wp_error( $result ) || $wpdb->last_error ) { + return $status; + } + // The $ids are ordered in descending order. + $status['last_sent'] = end( $objects ); + $status['sent'] += count( $objects ); + } + + if ( ! $wpdb->last_error ) { + $status['finished'] = true; + } + + return $status; + } + + + /** + * Immediately sends a single item without firing or enqueuing it + * + * @param string $action_name The action. + * @param array $data The data associated with the action. + */ + public function send_action( $action_name, $data = null ) { + $sender = Sender::get_instance(); + return $sender->send_action( $action_name, $data ); + } + + /** * Retrieve chunk IDs with previous interval end. * * @access protected @@ -460,4 +550,33 @@ abstract class Module { return $results; } + + /** + * Return Total number of objects. + * + * @param array $config Full Sync config. + * + * @return int total + */ + public function total( $config ) { + global $wpdb; + $table = $wpdb->{$this->table_name()}; + $where = $this->get_where_sql( $config ); + + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + return $wpdb->get_var( "SELECT COUNT(*) FROM $table WHERE $where" ); + } + + /** + * Retrieve the WHERE SQL clause based on the module config. + * + * @access public + * + * @param array $config Full sync configuration for this sync module. + * @return string WHERE SQL clause, or `null` if no comments are specified in the module config. + */ + public function get_where_sql( $config ) { + return '1=1'; + } + } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-network-options.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-network-options.php index c30ae8c7..60c458c8 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-network-options.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-network-options.php @@ -126,6 +126,29 @@ class Network_Options extends Module { } /** + * Send the network options actions for full sync. + * + * @access public + * + * @param array $config Full sync configuration for this sync module. + * @param int $send_until The timestamp until the current request can send. + * @param array $state This module Full Sync status. + * + * @return array This module Full Sync status. + */ + public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + if ( ! is_multisite() ) { + return array( null, true ); + } + + // we call this instead of do_action when sending immediately. + $this->send_action( 'jetpack_full_sync_network_options', array( true ) ); + + // The number of actions enqueued, and next module state (true == done). + return array( 'finished' => true ); + } + + /** * Retrieve an estimated number of actions that will be enqueued. * * @access public @@ -233,4 +256,16 @@ class Network_Options extends Module { return $args; } + + /** + * Return Total number of objects. + * + * @param array $config Full Sync config. + * + * @return int total + */ + public function total( $config ) { + return count( $this->network_options_whitelist ); + } + } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-options.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-options.php index 2c323a2b..0f9b2f11 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-options.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-options.php @@ -136,6 +136,25 @@ class Options extends Module { } /** + * Send the options actions for full sync. + * + * @access public + * + * @param array $config Full sync configuration for this sync module. + * @param int $send_until The timestamp until the current request can send. + * @param array $state This module Full Sync status. + * + * @return array This module Full Sync status. + */ + public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + // we call this instead of do_action when sending immediately. + $this->send_action( 'jetpack_full_sync_options', array( true ) ); + + // The number of actions enqueued, and next module state (true == done). + return array( 'finished' => true ); + } + + /** * Retrieve an estimated number of actions that will be enqueued. * * @access public @@ -341,4 +360,16 @@ class Options extends Module { return $args; } + + /** + * Return Total number of objects. + * + * @param array $config Full Sync config. + * + * @return int total + */ + public function total( $config ) { + return count( Defaults::get_options_whitelist() ); + } + } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-term-relationships.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-term-relationships.php index 3cad885d..17a183dc 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-term-relationships.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-term-relationships.php @@ -139,6 +139,46 @@ class Term_Relationships extends Module { } /** + * Return the initial last sent object. + * + * @return string|array initial status. + */ + public function get_initial_last_sent() { + return array( + 'object_id' => self::MAX_INT, + 'term_taxonomy_id' => self::MAX_INT, + ); + } + + /** + * Given the Module Full Sync Configuration and Status return the next chunk of items to send. + * + * @param array $config This module Full Sync configuration. + * @param array $status This module Full Sync status. + * @param int $chunk_size Chunk size. + * + * @return array|object|null + */ + public function get_next_chunk( $config, $status, $chunk_size ) { + global $wpdb; + + return $wpdb->get_results( + $wpdb->prepare( + "SELECT object_id, term_taxonomy_id + FROM $wpdb->term_relationships + WHERE ( object_id = %d AND term_taxonomy_id < %d ) OR ( object_id < %d ) + ORDER BY object_id DESC, term_taxonomy_id + DESC LIMIT %d", + $status['last_sent']['object_id'], + $status['last_sent']['term_taxonomy_id'], + $status['last_sent']['object_id'], + $chunk_size + ), + ARRAY_A + ); + } + + /** * * Enqueue all $items within `jetpack_full_sync_term_relationships` actions. * diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-terms.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-terms.php index 36afc5d7..2292356a 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-terms.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-terms.php @@ -14,14 +14,6 @@ use Automattic\Jetpack\Sync\Settings; * Class to handle sync for terms. */ class Terms extends Module { - /** - * Whitelist for taxonomies we want to sync. - * - * @access private - * - * @var array - */ - private $taxonomy_whitelist; /** * Sync module name. @@ -53,7 +45,7 @@ class Terms extends Module { * @return string */ public function table_name() { - return 'terms'; + return 'term_taxonomy'; } /** @@ -264,27 +256,6 @@ class Terms extends Module { } /** - * Set the taxonomy whitelist. - * - * @access public - * - * @param array $taxonomies The new taxonomyy whitelist. - */ - public function set_taxonomy_whitelist( $taxonomies ) { - $this->taxonomy_whitelist = $taxonomies; - } - - /** - * Set module defaults. - * Define the taxonomy whitelist to be the default one. - * - * @access public - */ - public function set_defaults() { - $this->taxonomy_whitelist = Defaults::$default_taxonomy_whitelist; - } - - /** * Expand the term taxonomy IDs to terms within a hook before they are serialized and sent to the server. * * @access public @@ -319,4 +290,5 @@ class Terms extends Module { public function expand_terms_for_relationship( $relationship ) { return get_term_by( 'term_taxonomy_id', $relationship->term_taxonomy_id ); } + } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-themes.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-themes.php index 57535527..bbccebf0 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-themes.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-themes.php @@ -497,6 +497,25 @@ class Themes extends Module { } /** + * Send the themes actions for full sync. + * + * @access public + * + * @param array $config Full sync configuration for this sync module. + * @param int $send_until The timestamp until the current request can send. + * @param array $state This module Full Sync status. + * + * @return array This module Full Sync status. + */ + public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + // we call this instead of do_action when sending immediately. + $this->send_action( 'jetpack_full_sync_theme_data', array( true ) ); + + // The number of actions enqueued, and next module state (true == done). + return array( 'finished' => true ); + } + + /** * Retrieve an estimated number of actions that will be enqueued. * * @access public @@ -822,4 +841,16 @@ class Themes extends Module { private function is_theme_switch() { return did_action( 'after_switch_theme' ); } + + /** + * Return Total number of objects. + * + * @param array $config Full Sync config. + * + * @return int total + */ + public function total( $config ) { + return 1; + } + } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-updates.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-updates.php index d99c9c57..beeb9ca4 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-updates.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-updates.php @@ -374,6 +374,25 @@ class Updates extends Module { } /** + * Send the updates actions for full sync. + * + * @access public + * + * @param array $config Full sync configuration for this sync module. + * @param int $send_until The timestamp until the current request can send. + * @param array $state This module Full Sync status. + * + * @return array This module Full Sync status. + */ + public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + // we call this instead of do_action when sending immediately. + $this->send_action( 'jetpack_full_sync_updates', array( true ) ); + + // The number of actions enqueued, and next module state (true == done). + return array( 'finished' => true ); + } + + /** * Retrieve an estimated number of actions that will be enqueued. * * @access public @@ -493,4 +512,16 @@ class Updates extends Module { public function reset_data() { delete_option( self::UPDATES_CHECKSUM_OPTION_NAME ); } + + /** + * Return Total number of objects. + * + * @param array $config Full Sync config. + * + * @return int total + */ + public function total( $config ) { + return 3; + } + } diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-users.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-users.php index 21974a5b..3b259a98 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-users.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-users.php @@ -49,7 +49,18 @@ class Users extends Module { * @return string */ public function table_name() { - return 'users'; + return 'usermeta'; + } + + /** + * The id field in the database. + * + * @access public + * + * @return string + */ + public function id_field() { + return 'user_id'; } /** diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php index 1c336342..0cbecb48 100644 --- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php +++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php @@ -58,6 +58,17 @@ class WooCommerce extends Module { private $order_item_table_name; /** + * The table in the database. + * + * @access public + * + * @return string + */ + public function table_name() { + return $this->order_item_table_name; + } + + /** * Constructor. * * @global $wpdb @@ -270,7 +281,7 @@ class WooCommerce extends Module { * @param array $config Full sync configuration for this sync module. * @return string WHERE SQL clause. */ - private function get_where_sql( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + public function get_where_sql( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable return '1=1'; } diff --git a/plugins/jetpack/vendor/composer/autoload_classmap.php b/plugins/jetpack/vendor/composer/autoload_classmap.php index b354f2a4..7e8f8308 100644 --- a/plugins/jetpack/vendor/composer/autoload_classmap.php +++ b/plugins/jetpack/vendor/composer/autoload_classmap.php @@ -12,6 +12,7 @@ return array( 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php', 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php', 'Automattic\\Jetpack\\Backup\\Helper_Script_Manager' => $vendorDir . '/automattic/jetpack-backup/src/class-helper-script-manager.php', + 'Automattic\\Jetpack\\Config' => $vendorDir . '/automattic/jetpack-config/src/class-config.php', 'Automattic\\Jetpack\\Connection\\Client' => $vendorDir . '/automattic/jetpack-connection/src/class-client.php', 'Automattic\\Jetpack\\Connection\\Manager' => $vendorDir . '/automattic/jetpack-connection/src/class-manager.php', 'Automattic\\Jetpack\\Connection\\Manager_Interface' => $vendorDir . '/automattic/jetpack-connection/src/interface-manager.php', @@ -21,6 +22,7 @@ return array( 'Automattic\\Jetpack\\Constants' => $vendorDir . '/automattic/jetpack-constants/src/class-constants.php', 'Automattic\\Jetpack\\Error' => $vendorDir . '/automattic/jetpack-error/src/class-error.php', 'Automattic\\Jetpack\\JITM' => $vendorDir . '/automattic/jetpack-jitm/src/class-jitm.php', + 'Automattic\\Jetpack\\Partner' => $vendorDir . '/automattic/jetpack-partner/src/class-partner.php', 'Automattic\\Jetpack\\Plugin\\Tracking' => $baseDir . '/src/class-tracking.php', 'Automattic\\Jetpack\\Roles' => $vendorDir . '/automattic/jetpack-roles/src/class-roles.php', 'Automattic\\Jetpack\\Status' => $vendorDir . '/automattic/jetpack-status/src/class-status.php', @@ -38,6 +40,7 @@ return array( 'Automattic\\Jetpack\\Sync\\Modules\\Comments' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-comments.php', 'Automattic\\Jetpack\\Sync\\Modules\\Constants' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-constants.php', 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-full-sync.php', + 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php', 'Automattic\\Jetpack\\Sync\\Modules\\Import' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-import.php', 'Automattic\\Jetpack\\Sync\\Modules\\Menus' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-menus.php', 'Automattic\\Jetpack\\Sync\\Modules\\Meta' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-meta.php', diff --git a/plugins/jetpack/vendor/composer/autoload_classmap_package.php b/plugins/jetpack/vendor/composer/autoload_classmap_package.php index 84054931..a5d52691 100644 --- a/plugins/jetpack/vendor/composer/autoload_classmap_package.php +++ b/plugins/jetpack/vendor/composer/autoload_classmap_package.php @@ -6,385 +6,309 @@ $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( - 'Automattic\\Jetpack\\Sync\\Modules\\Posts' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-posts.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Attachments' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-attachments.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-woocommerce.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-wp-super-cache.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Module' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-module.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Plugins' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-plugins.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Menus' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-menus.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Stats' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-stats.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Meta' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-meta.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Users' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-users.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Comments' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-comments.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Options' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-options.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Constants' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-constants.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Term_Relationships' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-term-relationships.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Terms' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-terms.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Themes' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-themes.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Network_Options' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-network-options.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Protect' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-protect.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Import' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-import.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Callables' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-callables.php' + 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array( + 'version' => '1.4.0.0', + 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php' ), - 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-full-sync.php' + 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => array( + 'version' => '1.4.0.0', + 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php' ), - 'Automattic\\Jetpack\\Sync\\Modules\\Updates' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-updates.php' + 'Automattic\\Jetpack\\Plugin\\Tracking' => array( + 'version' => 'dev-branch-8.2', + 'path' => $baseDir . '/src/class-tracking.php' ), 'Automattic\\Jetpack\\Sync\\Defaults' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-defaults.php' ), 'Automattic\\Jetpack\\Sync\\Sender' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-sender.php' ), 'Automattic\\Jetpack\\Sync\\Replicastore_Interface' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/interface-replicastore.php' ), 'Automattic\\Jetpack\\Sync\\Replicastore' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-replicastore.php' ), 'Automattic\\Jetpack\\Sync\\Actions' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-actions.php' ), 'Automattic\\Jetpack\\Sync\\Functions' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-functions.php' ), 'Automattic\\Jetpack\\Sync\\Utils' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-utils.php' ), 'Automattic\\Jetpack\\Sync\\Lock' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-lock.php' ), 'Automattic\\Jetpack\\Sync\\Codec_Interface' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/interface-codec.php' ), 'Automattic\\Jetpack\\Sync\\Main' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-main.php' ), 'Automattic\\Jetpack\\Sync\\Queue_Buffer' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-queue-buffer.php' ), 'Automattic\\Jetpack\\Sync\\Users' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-users.php' ), 'Automattic\\Jetpack\\Sync\\Simple_Codec' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-simple-codec.php' ), 'Automattic\\Jetpack\\Sync\\Queue' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-queue.php' ), 'Automattic\\Jetpack\\Sync\\Modules' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-modules.php' ), 'Automattic\\Jetpack\\Sync\\Listener' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-listener.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Posts' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-posts.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Attachments' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-attachments.php' ), + 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately' => array( + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', + 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php' + ), 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-woocommerce.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-wp-super-cache.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Module' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-module.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Plugins' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-plugins.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Menus' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-menus.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Stats' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-stats.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Meta' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-meta.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Users' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-users.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Comments' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-comments.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Options' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-options.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Constants' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-constants.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Term_Relationships' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-term-relationships.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Terms' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-terms.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Themes' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-themes.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Network_Options' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-network-options.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Protect' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-protect.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Import' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-import.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Callables' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-callables.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-full-sync.php' ), 'Automattic\\Jetpack\\Sync\\Modules\\Updates' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/modules/class-updates.php' ), 'Automattic\\Jetpack\\Sync\\JSON_Deflate_Array_Codec' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-json-deflate-array-codec.php' ), 'Automattic\\Jetpack\\Sync\\Settings' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-settings.php' ), 'Automattic\\Jetpack\\Sync\\Server' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => 'dev-fork/jetpack-sync-v1.7.4+vip', 'path' => $vendorDir . '/automattic/jetpack-sync/src/class-server.php' ), - 'Automattic\\Jetpack\\Connection\\REST_Connector' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-connection/src/class-rest-connector.php' - ), - 'Automattic\\Jetpack\\Connection\\Client' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-connection/src/class-client.php' - ), - 'Automattic\\Jetpack\\Connection\\Utils' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-connection/src/class-utils.php' - ), - 'Automattic\\Jetpack\\Connection\\Manager_Interface' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-connection/src/interface-manager.php' - ), - 'Automattic\\Jetpack\\Connection\\Manager' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-connection/src/class-manager.php' - ), - 'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-connection/src/class-xmlrpc-connector.php' - ), - 'Automattic\\Jetpack\\Backup\\Helper_Script_Manager' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-backup/src/class-helper-script-manager.php' - ), - 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php' - ), - 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php' - ), - 'Automattic\\Jetpack\\Assets\\Logo' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-logo/src/class-logo.php' - ), - 'Automattic\\Jetpack\\Error' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-error/src/class-error.php' - ), - 'Automattic\\Jetpack\\Constants' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-constants/src/class-constants.php' - ), - 'Automattic\\Jetpack\\Abtest' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-abtest/src/class-abtest.php' - ), - 'Automattic\\Jetpack\\Status' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-status/src/class-status.php' - ), - 'Automattic\\Jetpack\\Terms_Of_Service' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-terms-of-service/src/class-terms-of-service.php' - ), - 'Automattic\\Jetpack\\Tracking' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-tracking/src/class-tracking.php' - ), - 'Automattic\\Jetpack\\Assets' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-assets/src/class-assets.php' + 'Automattic\\Jetpack\\Partner' => array( + 'version' => '1.0.1.0', + 'path' => $vendorDir . '/automattic/jetpack-partner/src/class-partner.php' ), 'Automattic\\Jetpack\\JITM' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.1.1.0', 'path' => $vendorDir . '/automattic/jetpack-jitm/src/class-jitm.php' ), - 'Automattic\\Jetpack\\Roles' => array( - 'version' => 'dev-retry/phpcs-changed', - 'path' => $vendorDir . '/automattic/jetpack-roles/src/class-roles.php' - ), - 'Automattic\\Jetpack\\Plugin\\Tracking' => array( - 'version' => 'dev-branch-8.0', - 'path' => $baseDir . '/src/class-tracking.php' + 'Automattic\\Jetpack\\Config' => array( + 'version' => '1.1.0.0', + 'path' => $vendorDir . '/automattic/jetpack-config/src/class-config.php' ), 'Jetpack_Sync_Settings' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.0.5.0', 'path' => $vendorDir . '/automattic/jetpack-compat/legacy/class-jetpack-sync-settings.php' ), 'JetpackTracking' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.0.5.0', 'path' => $vendorDir . '/automattic/jetpack-compat/legacy/class-jetpacktracking.php' ), 'Jetpack_Client' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.0.5.0', 'path' => $vendorDir . '/automattic/jetpack-compat/legacy/class-jetpack-client.php' ), 'Jetpack_Sync_Modules' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.0.5.0', 'path' => $vendorDir . '/automattic/jetpack-compat/legacy/class-jetpack-sync-modules.php' ), 'Jetpack_Sync_Actions' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.0.5.0', 'path' => $vendorDir . '/automattic/jetpack-compat/legacy/class-jetpack-sync-actions.php' ), + 'Automattic\\Jetpack\\Backup\\Helper_Script_Manager' => array( + 'version' => '1.0.2.0', + 'path' => $vendorDir . '/automattic/jetpack-backup/src/class-helper-script-manager.php' + ), + 'Automattic\\Jetpack\\Abtest' => array( + 'version' => '1.0.4.0', + 'path' => $vendorDir . '/automattic/jetpack-abtest/src/class-abtest.php' + ), + 'Automattic\\Jetpack\\Assets' => array( + 'version' => '1.1.1.0', + 'path' => $vendorDir . '/automattic/jetpack-assets/src/class-assets.php' + ), + 'Automattic\\Jetpack\\Assets\\Logo' => array( + 'version' => '1.1.4.0', + 'path' => $vendorDir . '/automattic/jetpack-logo/src/class-logo.php' + ), 'Jetpack_Tracks_Client' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.2.2.0', 'path' => $vendorDir . '/automattic/jetpack-tracking/legacy/class-jetpack-tracks-client.php' ), 'Jetpack_Tracks_Event' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.2.2.0', 'path' => $vendorDir . '/automattic/jetpack-tracking/legacy/class-jetpack-tracks-event.php' ), + 'Automattic\\Jetpack\\Tracking' => array( + 'version' => '1.2.2.0', + 'path' => $vendorDir . '/automattic/jetpack-tracking/src/class-tracking.php' + ), + 'Automattic\\Jetpack\\Error' => array( + 'version' => '1.0.4.0', + 'path' => $vendorDir . '/automattic/jetpack-error/src/class-error.php' + ), + 'Automattic\\Jetpack\\Terms_Of_Service' => array( + 'version' => '1.0.4.0', + 'path' => $vendorDir . '/automattic/jetpack-terms-of-service/src/class-terms-of-service.php' + ), + 'Automattic\\Jetpack\\Status' => array( + 'version' => '1.1.1.0', + 'path' => $vendorDir . '/automattic/jetpack-status/src/class-status.php' + ), 'Jetpack_XMLRPC_Server' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.8.0.0', 'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php' ), 'Jetpack_IXR_Client' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.8.0.0', 'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php' ), 'Jetpack_Signature' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.8.0.0', 'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-signature.php' ), 'Jetpack_IXR_ClientMulticall' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.8.0.0', 'path' => $vendorDir . '/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php' ), + 'Automattic\\Jetpack\\Connection\\REST_Connector' => array( + 'version' => '1.8.0.0', + 'path' => $vendorDir . '/automattic/jetpack-connection/src/class-rest-connector.php' + ), + 'Automattic\\Jetpack\\Connection\\Client' => array( + 'version' => '1.8.0.0', + 'path' => $vendorDir . '/automattic/jetpack-connection/src/class-client.php' + ), + 'Automattic\\Jetpack\\Connection\\Utils' => array( + 'version' => '1.8.0.0', + 'path' => $vendorDir . '/automattic/jetpack-connection/src/class-utils.php' + ), + 'Automattic\\Jetpack\\Connection\\Manager_Interface' => array( + 'version' => '1.8.0.0', + 'path' => $vendorDir . '/automattic/jetpack-connection/src/interface-manager.php' + ), + 'Automattic\\Jetpack\\Connection\\Manager' => array( + 'version' => '1.8.0.0', + 'path' => $vendorDir . '/automattic/jetpack-connection/src/class-manager.php' + ), + 'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => array( + 'version' => '1.8.0.0', + 'path' => $vendorDir . '/automattic/jetpack-connection/src/class-xmlrpc-connector.php' + ), + 'Automattic\\Jetpack\\Roles' => array( + 'version' => '1.0.4.0', + 'path' => $vendorDir . '/automattic/jetpack-roles/src/class-roles.php' + ), 'Jetpack_Options' => array( - 'version' => 'dev-retry/phpcs-changed', + 'version' => '1.1.2.0', 'path' => $vendorDir . '/automattic/jetpack-options/legacy/class-jetpack-options.php' ), + 'Automattic\\Jetpack\\Constants' => array( + 'version' => '1.1.3.0', + 'path' => $vendorDir . '/automattic/jetpack-constants/src/class-constants.php' + ), ); diff --git a/plugins/jetpack/vendor/composer/autoload_psr4.php b/plugins/jetpack/vendor/composer/autoload_psr4.php index dbb66875..bef81985 100644 --- a/plugins/jetpack/vendor/composer/autoload_psr4.php +++ b/plugins/jetpack/vendor/composer/autoload_psr4.php @@ -6,11 +6,5 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'Automattic\\Jetpack\\Sync\\Modules\\' => array($vendorDir . '/automattic/jetpack-sync/src/modules'), - 'Automattic\\Jetpack\\Sync\\' => array($vendorDir . '/automattic/jetpack-sync/src'), - 'Automattic\\Jetpack\\Connection\\' => array($vendorDir . '/automattic/jetpack-connection/src'), - 'Automattic\\Jetpack\\Backup\\' => array($vendorDir . '/automattic/jetpack-backup/src'), 'Automattic\\Jetpack\\Autoloader\\' => array($vendorDir . '/automattic/jetpack-autoloader/src'), - 'Automattic\\Jetpack\\Assets\\' => array($vendorDir . '/automattic/jetpack-logo/src'), - 'Automattic\\Jetpack\\' => array($vendorDir . '/automattic/jetpack-error/src', $vendorDir . '/automattic/jetpack-constants/src', $vendorDir . '/automattic/jetpack-abtest/src', $vendorDir . '/automattic/jetpack-status/src', $vendorDir . '/automattic/jetpack-terms-of-service/src', $vendorDir . '/automattic/jetpack-tracking/src', $vendorDir . '/automattic/jetpack-assets/src', $vendorDir . '/automattic/jetpack-jitm/src', $vendorDir . '/automattic/jetpack-roles/src'), ); diff --git a/plugins/jetpack/vendor/composer/autoload_real.php b/plugins/jetpack/vendor/composer/autoload_real.php index aba180cb..0f957592 100644 --- a/plugins/jetpack/vendor/composer/autoload_real.php +++ b/plugins/jetpack/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit2476b41c8cf17e4e68e22a516cf4ed25 +class ComposerAutoloaderInitb971f5b5f09f65d7b815d2961dc675a0 { private static $loader; @@ -19,15 +19,15 @@ class ComposerAutoloaderInit2476b41c8cf17e4e68e22a516cf4ed25 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit2476b41c8cf17e4e68e22a516cf4ed25', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitb971f5b5f09f65d7b815d2961dc675a0', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit2476b41c8cf17e4e68e22a516cf4ed25', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitb971f5b5f09f65d7b815d2961dc675a0', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit2476b41c8cf17e4e68e22a516cf4ed25::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitb971f5b5f09f65d7b815d2961dc675a0::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { @@ -39,19 +39,19 @@ class ComposerAutoloaderInit2476b41c8cf17e4e68e22a516cf4ed25 $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit2476b41c8cf17e4e68e22a516cf4ed25::$files; + $includeFiles = Composer\Autoload\ComposerStaticInitb971f5b5f09f65d7b815d2961dc675a0::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire2476b41c8cf17e4e68e22a516cf4ed25($fileIdentifier, $file); + composerRequireb971f5b5f09f65d7b815d2961dc675a0($fileIdentifier, $file); } return $loader; } } -function composerRequire2476b41c8cf17e4e68e22a516cf4ed25($fileIdentifier, $file) +function composerRequireb971f5b5f09f65d7b815d2961dc675a0($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/plugins/jetpack/vendor/composer/autoload_static.php b/plugins/jetpack/vendor/composer/autoload_static.php index bcd589c9..ce37ceaf 100644 --- a/plugins/jetpack/vendor/composer/autoload_static.php +++ b/plugins/jetpack/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit2476b41c8cf17e4e68e22a516cf4ed25 +class ComposerStaticInitb971f5b5f09f65d7b815d2961dc675a0 { public static $files = array ( 'bce4ecd6aabb2a2948e06d0e2c4ea9a6' => __DIR__ . '/..' . '/automattic/jetpack-connection/legacy/load-ixr.php', @@ -15,53 +15,15 @@ class ComposerStaticInit2476b41c8cf17e4e68e22a516cf4ed25 public static $prefixLengthsPsr4 = array ( 'A' => array ( - 'Automattic\\Jetpack\\Sync\\Modules\\' => 32, - 'Automattic\\Jetpack\\Sync\\' => 24, - 'Automattic\\Jetpack\\Connection\\' => 30, - 'Automattic\\Jetpack\\Backup\\' => 26, 'Automattic\\Jetpack\\Autoloader\\' => 30, - 'Automattic\\Jetpack\\Assets\\' => 26, - 'Automattic\\Jetpack\\' => 19, ), ); public static $prefixDirsPsr4 = array ( - 'Automattic\\Jetpack\\Sync\\Modules\\' => - array ( - 0 => __DIR__ . '/..' . '/automattic/jetpack-sync/src/modules', - ), - 'Automattic\\Jetpack\\Sync\\' => - array ( - 0 => __DIR__ . '/..' . '/automattic/jetpack-sync/src', - ), - 'Automattic\\Jetpack\\Connection\\' => - array ( - 0 => __DIR__ . '/..' . '/automattic/jetpack-connection/src', - ), - 'Automattic\\Jetpack\\Backup\\' => - array ( - 0 => __DIR__ . '/..' . '/automattic/jetpack-backup/src', - ), 'Automattic\\Jetpack\\Autoloader\\' => array ( 0 => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src', ), - 'Automattic\\Jetpack\\Assets\\' => - array ( - 0 => __DIR__ . '/..' . '/automattic/jetpack-logo/src', - ), - 'Automattic\\Jetpack\\' => - array ( - 0 => __DIR__ . '/..' . '/automattic/jetpack-error/src', - 1 => __DIR__ . '/..' . '/automattic/jetpack-constants/src', - 2 => __DIR__ . '/..' . '/automattic/jetpack-abtest/src', - 3 => __DIR__ . '/..' . '/automattic/jetpack-status/src', - 4 => __DIR__ . '/..' . '/automattic/jetpack-terms-of-service/src', - 5 => __DIR__ . '/..' . '/automattic/jetpack-tracking/src', - 6 => __DIR__ . '/..' . '/automattic/jetpack-assets/src', - 7 => __DIR__ . '/..' . '/automattic/jetpack-jitm/src', - 8 => __DIR__ . '/..' . '/automattic/jetpack-roles/src', - ), ); public static $classMap = array ( @@ -71,6 +33,7 @@ class ComposerStaticInit2476b41c8cf17e4e68e22a516cf4ed25 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php', 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php', 'Automattic\\Jetpack\\Backup\\Helper_Script_Manager' => __DIR__ . '/..' . '/automattic/jetpack-backup/src/class-helper-script-manager.php', + 'Automattic\\Jetpack\\Config' => __DIR__ . '/..' . '/automattic/jetpack-config/src/class-config.php', 'Automattic\\Jetpack\\Connection\\Client' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/class-client.php', 'Automattic\\Jetpack\\Connection\\Manager' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/class-manager.php', 'Automattic\\Jetpack\\Connection\\Manager_Interface' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/interface-manager.php', @@ -80,6 +43,7 @@ class ComposerStaticInit2476b41c8cf17e4e68e22a516cf4ed25 'Automattic\\Jetpack\\Constants' => __DIR__ . '/..' . '/automattic/jetpack-constants/src/class-constants.php', 'Automattic\\Jetpack\\Error' => __DIR__ . '/..' . '/automattic/jetpack-error/src/class-error.php', 'Automattic\\Jetpack\\JITM' => __DIR__ . '/..' . '/automattic/jetpack-jitm/src/class-jitm.php', + 'Automattic\\Jetpack\\Partner' => __DIR__ . '/..' . '/automattic/jetpack-partner/src/class-partner.php', 'Automattic\\Jetpack\\Plugin\\Tracking' => __DIR__ . '/../..' . '/src/class-tracking.php', 'Automattic\\Jetpack\\Roles' => __DIR__ . '/..' . '/automattic/jetpack-roles/src/class-roles.php', 'Automattic\\Jetpack\\Status' => __DIR__ . '/..' . '/automattic/jetpack-status/src/class-status.php', @@ -97,6 +61,7 @@ class ComposerStaticInit2476b41c8cf17e4e68e22a516cf4ed25 'Automattic\\Jetpack\\Sync\\Modules\\Comments' => __DIR__ . '/..' . '/automattic/jetpack-sync/src/modules/class-comments.php', 'Automattic\\Jetpack\\Sync\\Modules\\Constants' => __DIR__ . '/..' . '/automattic/jetpack-sync/src/modules/class-constants.php', 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync' => __DIR__ . '/..' . '/automattic/jetpack-sync/src/modules/class-full-sync.php', + 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately' => __DIR__ . '/..' . '/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php', 'Automattic\\Jetpack\\Sync\\Modules\\Import' => __DIR__ . '/..' . '/automattic/jetpack-sync/src/modules/class-import.php', 'Automattic\\Jetpack\\Sync\\Modules\\Menus' => __DIR__ . '/..' . '/automattic/jetpack-sync/src/modules/class-menus.php', 'Automattic\\Jetpack\\Sync\\Modules\\Meta' => __DIR__ . '/..' . '/automattic/jetpack-sync/src/modules/class-meta.php', @@ -143,9 +108,9 @@ class ComposerStaticInit2476b41c8cf17e4e68e22a516cf4ed25 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit2476b41c8cf17e4e68e22a516cf4ed25::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit2476b41c8cf17e4e68e22a516cf4ed25::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit2476b41c8cf17e4e68e22a516cf4ed25::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitb971f5b5f09f65d7b815d2961dc675a0::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitb971f5b5f09f65d7b815d2961dc675a0::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitb971f5b5f09f65d7b815d2961dc675a0::$classMap; }, null, ClassLoader::class); } diff --git a/plugins/jetpack/vendor/composer/installed.json b/plugins/jetpack/vendor/composer/installed.json index 820059af..eabb2133 100644 --- a/plugins/jetpack/vendor/composer/installed.json +++ b/plugins/jetpack/vendor/composer/installed.json @@ -1,12 +1,18 @@ [ { "name": "automattic/jetpack-abtest", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.0.4", + "version_normalized": "1.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-abtest.git", + "reference": "faed5181e0dbe596b7e083e40affceed686928ba" + }, "dist": { - "type": "path", - "url": "./packages/abtest", - "reference": "b873be98786907a49ac5cd21836167f662212aa0" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-abtest/zipball/faed5181e0dbe596b7e083e40affceed686928ba", + "reference": "faed5181e0dbe596b7e083e40affceed686928ba", + "shasum": "" }, "require": { "automattic/jetpack-connection": "@dev", @@ -16,19 +22,15 @@ "php-mock/php-mock": "^2.1", "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2019-11-08T21:16:05+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\": "src/" - } - }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "classmap": [ + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -36,33 +38,36 @@ }, { "name": "automattic/jetpack-assets", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.1.1", + "version_normalized": "1.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-assets.git", + "reference": "157b2d4adfddc7cc395929b6a0de8ab43bc52155" + }, "dist": { - "type": "path", - "url": "./packages/assets", - "reference": "e93b5911e77ff0abfad498e99edbb5f6a8a124a9" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-assets/zipball/157b2d4adfddc7cc395929b6a0de8ab43bc52155", + "reference": "157b2d4adfddc7cc395929b6a0de8ab43bc52155", + "shasum": "" }, "require": { "automattic/jetpack-constants": "@dev" }, "require-dev": { + "brain/monkey": "2.4.0", "php-mock/php-mock": "^2.1", "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2020-01-27T11:04:11+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\": "src/" - } - }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "classmap": [ + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -70,12 +75,18 @@ }, { "name": "automattic/jetpack-autoloader", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.4.0", + "version_normalized": "1.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-autoloader.git", + "reference": "3cb0ad8496d04a648435ebee7c2a652c80eaf550" + }, "dist": { - "type": "path", - "url": "./packages/autoloader", - "reference": "43bb413915e6aad7e4a088490cb76d72df22a8fb" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/3cb0ad8496d04a648435ebee7c2a652c80eaf550", + "reference": "3cb0ad8496d04a648435ebee7c2a652c80eaf550", + "shasum": "" }, "require": { "composer-plugin-api": "^1.1" @@ -83,6 +94,7 @@ "require-dev": { "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2020-01-22T17:49:03+00:00", "type": "composer-plugin", "extra": { "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin" @@ -93,12 +105,7 @@ "Automattic\\Jetpack\\Autoloader\\": "src" } }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -106,23 +113,31 @@ }, { "name": "automattic/jetpack-backup", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.0.2", + "version_normalized": "1.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-backup.git", + "reference": "ea2aaa9be3697d8b885a74a11411c7818fba5a75" + }, "dist": { - "type": "path", - "url": "./packages/backup", - "reference": "3dd44f29c9c6ab41cc2492675078ba8b808caea7" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-backup/zipball/ea2aaa9be3697d8b885a74a11411c7818fba5a75", + "reference": "ea2aaa9be3697d8b885a74a11411c7818fba5a75", + "shasum": "" }, + "time": "2019-11-08T21:16:05+00:00", "type": "library", "installation-source": "dist", "autoload": { "files": [ "actions.php" ], - "psr-4": { - "Automattic\\Jetpack\\Backup\\": "src/" - } + "classmap": [ + "src/" + ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -130,17 +145,24 @@ }, { "name": "automattic/jetpack-compat", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.0.5", + "version_normalized": "1.0.5.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-compat.git", + "reference": "2a4a2fd64bbcaab0a6af6dfe3a5ea8342eca9cbf" + }, "dist": { - "type": "path", - "url": "./packages/compat", - "reference": "2138cbc8b0b1aecb290608b5d82e873c7330aac5" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-compat/zipball/2a4a2fd64bbcaab0a6af6dfe3a5ea8342eca9cbf", + "reference": "2a4a2fd64bbcaab0a6af6dfe3a5ea8342eca9cbf", + "shasum": "" }, "require-dev": { "php-mock/php-mock": "^2.1", "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2019-11-08T21:16:05+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -151,53 +173,78 @@ "legacy" ] }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Compatibility layer with previous versions of Jetpack" + }, + { + "name": "automattic/jetpack-config", + "version": "v1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-config.git", + "reference": "df7cfce4231fb50e8cd433a6ccf52e99a269c16c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-config/zipball/df7cfce4231fb50e8cd433a6ccf52e99a269c16c", + "reference": "df7cfce4231fb50e8cd433a6ccf52e99a269c16c", + "shasum": "" + }, + "time": "2020-01-21T22:42:22+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], - "description": "Compatibility layer with previous versions of Jetpack" + "description": "Jetpack configuration package that initializes other packages and configures Jetpack's functionality. Can be used as a base for all variants of Jetpack package usage." }, { "name": "automattic/jetpack-connection", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.8.0", + "version_normalized": "1.8.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-connection.git", + "reference": "e9e898ca3acb174a418637cac69355d6aad89762" + }, "dist": { - "type": "path", - "url": "./packages/connection", - "reference": "59fa2bc973303b013ce63978ff8d875d1223f510" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-connection/zipball/e9e898ca3acb174a418637cac69355d6aad89762", + "reference": "e9e898ca3acb174a418637cac69355d6aad89762", + "shasum": "" }, "require": { "automattic/jetpack-constants": "@dev", - "automattic/jetpack-options": "@dev" + "automattic/jetpack-options": "@dev", + "automattic/jetpack-roles": "@dev" }, "require-dev": { "php-mock/php-mock": "^2.1", "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2020-01-27T11:20:58+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\Connection\\": "src" - }, "files": [ "legacy/load-ixr.php" ], "classmap": [ - "legacy" - ] - }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "legacy", + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -205,29 +252,31 @@ }, { "name": "automattic/jetpack-constants", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.1.3", + "version_normalized": "1.1.3.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-constants.git", + "reference": "5fdd94dec1151e7defd684a97e0b64fe6ff1bd3a" + }, "dist": { - "type": "path", - "url": "./packages/constants", - "reference": "a6ab6360f4b48962ec7d62b06b39d1470b1dbe95" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-constants/zipball/5fdd94dec1151e7defd684a97e0b64fe6ff1bd3a", + "reference": "5fdd94dec1151e7defd684a97e0b64fe6ff1bd3a", + "shasum": "" }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2019-11-08T21:16:05+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\": "src/" - } - }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "classmap": [ + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -235,29 +284,31 @@ }, { "name": "automattic/jetpack-error", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.0.4", + "version_normalized": "1.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-error.git", + "reference": "2128dd5a666154506727010350518529cc87b23d" + }, "dist": { - "type": "path", - "url": "./packages/error", - "reference": "1707cf33a92fc66f1635dfe1e4215819101e9bb4" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-error/zipball/2128dd5a666154506727010350518529cc87b23d", + "reference": "2128dd5a666154506727010350518529cc87b23d", + "shasum": "" }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2019-11-08T21:16:05+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\": "src/" - } - }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "classmap": [ + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -265,12 +316,18 @@ }, { "name": "automattic/jetpack-jitm", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.1.1", + "version_normalized": "1.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-jitm.git", + "reference": "3d8419a38d5ea45c174f98a30e0420011e4bc01c" + }, "dist": { - "type": "path", - "url": "./packages/jitm", - "reference": "b0c2da6ce6a0137f3a1895ab82a93ad7769fddca" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-jitm/zipball/3d8419a38d5ea45c174f98a30e0420011e4bc01c", + "reference": "3d8419a38d5ea45c174f98a30e0420011e4bc01c", + "shasum": "" }, "require": { "automattic/jetpack-assets": "@dev", @@ -285,19 +342,15 @@ "php-mock/php-mock": "^2.1", "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2020-01-21T22:42:22+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\": "src/" - } - }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "classmap": [ + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -305,30 +358,32 @@ }, { "name": "automattic/jetpack-logo", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.1.4", + "version_normalized": "1.1.4.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-logo.git", + "reference": "7da178a529f772cddfd0bbf1775eb30a852739c2" + }, "dist": { - "type": "path", - "url": "./packages/logo", - "reference": "d8a31dfd40166c4867fa2c526a03d9df481d5610" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-logo/zipball/7da178a529f772cddfd0bbf1775eb30a852739c2", + "reference": "7da178a529f772cddfd0bbf1775eb30a852739c2", + "shasum": "" }, "require-dev": { "php-mock/php-mock": "^2.1", "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2019-11-08T21:16:05+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\Assets\\": "src/" - } - }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "classmap": [ + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -336,12 +391,18 @@ }, { "name": "automattic/jetpack-options", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.1.2", + "version_normalized": "1.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-options.git", + "reference": "cc81a75b7b3fecd1155a517a057ca74975ca8b5d" + }, "dist": { - "type": "path", - "url": "./packages/options", - "reference": "78220bf7d3c1a3a5ed4edb77462e84982b3c408f" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-options/zipball/cc81a75b7b3fecd1155a517a057ca74975ca8b5d", + "reference": "cc81a75b7b3fecd1155a517a057ca74975ca8b5d", + "shasum": "" }, "require": { "automattic/jetpack-constants": "@dev" @@ -350,6 +411,7 @@ "10up/wp_mock": "0.4.2", "phpunit/phpunit": "7.*.*" }, + "time": "2019-11-08T21:16:05+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -357,37 +419,75 @@ "legacy" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "A wrapper for wp-options to manage specific Jetpack options." }, { - "name": "automattic/jetpack-roles", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "name": "automattic/jetpack-partner", + "version": "v1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-partner.git", + "reference": "866dfe161654acd18115b94aa117186f53a6ee6d" + }, "dist": { - "type": "path", - "url": "./packages/roles", - "reference": "f38b3379c11a05e4711b4fb29b390c8107daccd7" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-partner/zipball/866dfe161654acd18115b94aa117186f53a6ee6d", + "reference": "866dfe161654acd18115b94aa117186f53a6ee6d", + "shasum": "" }, "require-dev": { + "brain/monkey": "2.4.0", + "mockery/mockery": "^1.2", "php-mock/php-mock": "^2.1", "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2020-01-27T11:04:11+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\": "src/" - } + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Support functions for Jetpack hosting partners." + }, + { + "name": "automattic/jetpack-roles", + "version": "v1.0.4", + "version_normalized": "1.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-roles.git", + "reference": "0cdcff4fdc489c79f20a361c084ec48e326ce483" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-roles/zipball/0cdcff4fdc489c79f20a361c084ec48e326ce483", + "reference": "0cdcff4fdc489c79f20a361c084ec48e326ce483", + "shasum": "" + }, + "require-dev": { + "php-mock/php-mock": "^2.1", + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "time": "2019-11-08T21:16:05+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -395,30 +495,33 @@ }, { "name": "automattic/jetpack-status", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.1.1", + "version_normalized": "1.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-status.git", + "reference": "c688b03859381e66164c821971e851408a5e232a" + }, "dist": { - "type": "path", - "url": "./packages/status", - "reference": "99ecd79ed31dc3432892df709ba745ebc6f747e9" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-status/zipball/c688b03859381e66164c821971e851408a5e232a", + "reference": "c688b03859381e66164c821971e851408a5e232a", + "shasum": "" }, "require-dev": { + "brain/monkey": "2.4.0", "php-mock/php-mock": "^2.1", "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2020-01-27T11:04:11+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\": "src/" - } - }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "classmap": [ + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -426,12 +529,18 @@ }, { "name": "automattic/jetpack-sync", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "dev-fork/jetpack-sync-v1.7.4+vip", + "version_normalized": "dev-fork/jetpack-sync-v1.7.4+vip", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-sync.git", + "reference": "070a46e38d34a0ceba15b9d4b0de115fbe76b20f" + }, "dist": { - "type": "path", - "url": "./packages/sync", - "reference": "1cad05fcfd38ad123af0bbf08b5a1224bd95312a" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-sync/zipball/070a46e38d34a0ceba15b9d4b0de115fbe76b20f", + "reference": "070a46e38d34a0ceba15b9d4b0de115fbe76b20f", + "shasum": "" }, "require": { "automattic/jetpack-connection": "@dev", @@ -440,14 +549,15 @@ "automattic/jetpack-roles": "@dev", "automattic/jetpack-status": "@dev" }, + "time": "2020-02-14T17:53:00+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\Sync\\": "src/", - "Automattic\\Jetpack\\Sync\\Modules\\": "src/modules/" - } + "classmap": [ + "src/" + ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -455,12 +565,18 @@ }, { "name": "automattic/jetpack-terms-of-service", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.0.4", + "version_normalized": "1.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-terms-of-service.git", + "reference": "fcee8e9de7f37d36bd68ac1ebabdb15cf6e10952" + }, "dist": { - "type": "path", - "url": "./packages/terms-of-service", - "reference": "6f53f2987be1c025edcd7820759df50c134065e6" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-terms-of-service/zipball/fcee8e9de7f37d36bd68ac1ebabdb15cf6e10952", + "reference": "fcee8e9de7f37d36bd68ac1ebabdb15cf6e10952", + "shasum": "" }, "require": { "automattic/jetpack-connection": "@dev", @@ -471,19 +587,15 @@ "php-mock/php-mock": "^2.1", "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2019-11-15T16:03:27+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\": "src/" - } - }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "classmap": [ + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -491,12 +603,18 @@ }, { "name": "automattic/jetpack-tracking", - "version": "dev-retry/phpcs-changed", - "version_normalized": "dev-retry/phpcs-changed", + "version": "v1.2.2", + "version_normalized": "1.2.2.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-tracking.git", + "reference": "d337a8f4234c684e80a43ff9ad3051a46a1f35d6" + }, "dist": { - "type": "path", - "url": "./packages/tracking", - "reference": "fd194dfc4f01a66de9c5b9caf239cdd806a8d3eb" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-tracking/zipball/d337a8f4234c684e80a43ff9ad3051a46a1f35d6", + "reference": "d337a8f4234c684e80a43ff9ad3051a46a1f35d6", + "shasum": "" }, "require": { "automattic/jetpack-options": "@dev", @@ -506,22 +624,16 @@ "php-mock/php-mock": "^2.1", "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" }, + "time": "2019-11-08T21:16:05+00:00", "type": "library", "installation-source": "dist", "autoload": { - "psr-4": { - "Automattic\\Jetpack\\": "src/" - }, "classmap": [ - "legacy" - ] - }, - "scripts": { - "phpunit": [ - "@composer install", - "./vendor/phpunit/phpunit/phpunit --colors=always" + "legacy", + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], |