Skip to content

Commit

Permalink
Fix connection assets for WPCOM Simple sites (#39201)
Browse files Browse the repository at this point in the history
* Fix connection assets for WPCOM Simple sites

* Fix up versions

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

Upstream-Ref: Automattic/jetpack@3bef458
  • Loading branch information
manzoorwanijk authored and matticbot committed Sep 3, 2024
1 parent 9f1c142 commit b53af06
Show file tree
Hide file tree
Showing 15 changed files with 139 additions and 100 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.5.12-alpha - unreleased

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

## 2.5.11 - 2024-09-02
### Changed
- Internal updates.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
]
},
"config": {
"autoloader-suffix": "d9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_11"
"autoloader-suffix": "d9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_12_alpha"
}
}
61 changes: 32 additions & 29 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mu-wpcom-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Plugin Name: WordPress.com Features
* Description: Test plugin for the jetpack-mu-wpcom package
* Version: 2.5.11
* Version: 2.5.12-alpha
* Author: Automattic
* License: GPLv2 or later
* Text Domain: jetpack-mu-wpcom-plugin
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-mu-wpcom-plugin",
"version": "2.5.11",
"version": "2.5.12-alpha",
"description": "Test plugin for the jetpack-mu-wpcom package",
"homepage": "https://jetpack.com",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_11::getLoader();
return ComposerAutoloaderInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_12_alpha::getLoader();
3 changes: 3 additions & 0 deletions vendor/automattic/jetpack-connection/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ This is an alpha version! The changes listed here are not final.
### Changed
- Updated connection js to load its bundle via connection package

### Fixed
- Fixed connection assets for wpcom simple sites

## [2.12.5] - 2024-08-29
### Changed
- Sync: Remove the checksum for active plugins if present when sync is not active, so it gets recalculated when sync gets activated [#39098]
Expand Down
23 changes: 23 additions & 0 deletions vendor/automattic/jetpack-connection/actions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
/**
* Action Hooks for Jetpack connection assets.
*
* @package automattic/jetpack-connection
*/

// If WordPress's plugin API is available already, use it. If not,
// drop data into `$wp_filter` for `WP_Hook::build_preinitialized_hooks()`.
if ( function_exists( 'add_action' ) ) {
add_action(
'plugins_loaded',
array( Automattic\Jetpack\Connection\Connection_Assets::class, 'configure' ),
1
);
} else {
global $wp_filter;
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
$wp_filter['plugins_loaded'][1][] = array(
'accepted_args' => 0,
'function' => array( Automattic\Jetpack\Connection\Connection_Assets::class, 'configure' ),
);
}
3 changes: 3 additions & 0 deletions vendor/automattic/jetpack-connection/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
},
"autoload": {
"files": [
"actions.php"
],
"classmap": [
"legacy",
"src/",
Expand Down
2 changes: 0 additions & 2 deletions vendor/automattic/jetpack-connection/src/class-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ public static function configure() {

// Initial Partner management.
Partner::init();

Connection_Assets::configure();
}

/**
Expand Down
1 change: 1 addition & 0 deletions vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@

return array(
'3773ef3f09c37da5478d578e32b03a4b' => $vendorDir . '/automattic/jetpack-assets/actions.php',
'7372b7fb88a9723cf5b76d456eb0b738' => $vendorDir . '/automattic/jetpack-connection/actions.php',
);
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_11
class ComposerAutoloaderInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_12_alpha
{
private static $loader;

Expand All @@ -24,17 +24,17 @@ public static function getLoader()

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_11', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_12_alpha', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_11', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_12_alpha', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_11::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_12_alpha::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_11::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_5_12_alpha::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
Loading

0 comments on commit b53af06

Please sign in to comment.