Skip to content

Commit

Permalink
Lock file maintenance (#40515)
Browse files Browse the repository at this point in the history
* Lock file maintenance
* Address Phan issues due to php-stubs/wordpress-stubs upgrade
  * Some typecasts to account for better Core type delcarations.
  * Suppress `current_user_can_for_blog` → `current_user_can_for_site`
    until we drop 6.6 support.
* Hack around Core SimplePie renaming

  Core upgraded their copy-pasted SimplePie library, which included
  renaming all the classes. While they did provide back-compat aliases, we
  run into a few problems:

  * A method parameter type of `SimplePie_Item` won't accept
    `SimplePie\Item`, while `SimplePie\Item` won't work on WP 6.6.
  * It's really hard to make Phan happy for both the two runs (with 6.7
    stubs and with 6.6 stubs).

  The best I was able to come up with was this:
  * Turn on `enable_class_alias_support`.
  * Alias `Jetpack\SimplePie\<name>` to the appropriate classes, and use
    those aliases everywhere.
    * Have phan load only one of the two alias files, depending on which
  	run it's doing.
  * Merge all the test mocks into one file and load them from
    bootstrap.php.

---------

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Brad Jorsch <brad.jorsch@automattic.com>

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

Upstream-Ref: Automattic/jetpack@ceebd52
  • Loading branch information
anomiex authored and matticbot committed Dec 10, 2024
1 parent cafa82b commit cab9faa
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 81 deletions.
2 changes: 1 addition & 1 deletion app/assets/dist/jetpack-boost.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '57dfdaee43d6719db207');
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'e51655c9570fd6a6fb7c');
2 changes: 1 addition & 1 deletion app/assets/dist/jetpack-boost.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/dist/jetpack-critical-css-gen.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/lib/class-connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function deactivate_disconnect_network() {
}

foreach ( get_sites() as $s ) {
switch_to_blog( $s->blog_id );
switch_to_blog( (int) $s->blog_id );

$active_plugins = get_option( 'active_plugins' );

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"automattic/jetpack-config": "^3.0.0",
"automattic/jetpack-connection": "^6.2.0",
"automattic/jetpack-device-detection": "^3.0.0",
"automattic/jetpack-image-cdn": "^0.7.1",
"automattic/jetpack-image-cdn": "^0.7.2-alpha",
"automattic/jetpack-my-jetpack": "^5.1.2-alpha",
"automattic/jetpack-plugin-deactivation": "^0.3.1-alpha",
"automattic/jetpack-schema": "^0.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '0d9b7c1c5507602fae89');
<?php return array('dependencies' => array(), 'version' => '3d6b6c0a2cee025f46f3');

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

Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('jetpack-script-data', 'react', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'bc8ee5ac3a110a6aed54');
<?php return array('dependencies' => array('jetpack-script-data', 'react', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '6ffa09329144f9dbaaed');

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions jetpack_vendor/automattic/jetpack-image-cdn/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).

## [0.7.2-alpha] - unreleased

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

## [0.7.1] - 2024-11-25
### Changed
- Updated dependencies. [#40286]
Expand Down Expand Up @@ -158,6 +162,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Add image CDN package. [#29561]

[0.7.2-alpha]: https://github.com/Automattic/jetpack-image-cdn/compare/v0.7.1...v0.7.2-alpha
[0.7.1]: https://github.com/Automattic/jetpack-image-cdn/compare/v0.7.0...v0.7.1
[0.7.0]: https://github.com/Automattic/jetpack-image-cdn/compare/v0.6.0...v0.7.0
[0.6.0]: https://github.com/Automattic/jetpack-image-cdn/compare/v0.5.3...v0.6.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
final class Image_CDN {

const PACKAGE_VERSION = '0.7.1';
const PACKAGE_VERSION = '0.7.2-alpha';

/**
* Singleton.
Expand Down Expand Up @@ -393,7 +393,7 @@ public static function filter_the_content( $content ) {
* present all attributes as double-quoted attributes and include at
* most one copy of each attribute, escaping all values appropriately.
*/
$tag_name = strtolower( $processor->get_tag() );
$tag_name = strtolower( (string) $processor->get_tag() );
$tag = new \WP_HTML_Tag_Processor( "<{$tag_name}>" );
$tag->next_tag();
foreach ( $processor->get_attribute_names_with_prefix( '' ) ?? array() as $name ) {
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
),
'jetpack-image-cdn' => array(
'path' => 'jetpack_vendor/automattic/jetpack-image-cdn',
'ver' => '0.7.1',
'ver' => '0.7.2-alpha1733851852',
),
'jetpack-ip' => array(
'path' => 'jetpack_vendor/automattic/jetpack-ip',
Expand Down
64 changes: 32 additions & 32 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
"reference": "f35bee0eef8220a1c52d3920182788603bd482e8"
"reference": "58cf36ca68c2b9e8b95f2110f30156551ec76599"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -63,7 +63,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
"reference": "6e59ab1e8f96bc85294d37aafafd2f69e2a8836f"
"reference": "727a975f065b2d7c2407794dae492022664220c2"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -131,7 +131,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
"reference": "c2d1fe1116215cf66db90ba7898b2565d46b78c7"
"reference": "b0c8aa86f2f6f5504501e498eee2b5727a7d4b34"
},
"require": {
"automattic/jetpack-constants": "^3.0.1",
Expand Down Expand Up @@ -203,7 +203,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
"reference": "ad430e1cc2eb53d9f3e20ec8e156e44428f6cefc"
"reference": "c9cf90e21557470630e535338001642c48bce779"
},
"require": {
"composer-plugin-api": "^2.2",
Expand Down Expand Up @@ -274,7 +274,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-core",
"reference": "7d4f3799c3c8303c130f5bc484eaf9bffdc9d382"
"reference": "0039696dec2315b1c0d3d90d38384cf77e56f8f4"
},
"require": {
"automattic/jetpack-connection": "^6.2.0",
Expand Down Expand Up @@ -345,7 +345,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-speed-score",
"reference": "7402ac53ea26e415509f1eb90046226bbf3c4950"
"reference": "94e9c0d12ba7414cd34fa1b8a7c7ea8008bea48f"
},
"require": {
"automattic/jetpack-boost-core": "^0.3.2",
Expand Down Expand Up @@ -424,7 +424,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
"reference": "cd09cad6586dee593544aae94e82151eab281295"
"reference": "28a56d781619c58341f5039153ebf6de0c977c87"
},
"require": {
"composer-plugin-api": "^2.2",
Expand Down Expand Up @@ -487,7 +487,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
"reference": "1e55ff280788a3ae675b6477721eff30cd0f2227"
"reference": "8228ee84b16951bb9c7e2c293246ccdba658733f"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -562,7 +562,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
"reference": "d17a1caa21d7137164c5b785947d8caffb517320"
"reference": "8929bf90b84b3495be6d4290d6148dcb530a6238"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -655,7 +655,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
"reference": "5949ff7fe3f36768300d6c430a04a8c23f48b602"
"reference": "ac4302e691c8c348584ee39ff9be1ac73e01f09a"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -712,7 +712,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "4bb751ec911bb1efbc4ede97aac53e039e2b7849"
"reference": "941cdb8db27631ae245f3df691dcb3099d760ced"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -768,7 +768,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-explat",
"reference": "55b82342c44f6295d7e4805f3473999f888f64d0"
"reference": "571a73756aa8802f4d37e723f1189907a133b283"
},
"require": {
"automattic/jetpack-connection": "^6.2.0",
Expand Down Expand Up @@ -841,12 +841,12 @@
},
{
"name": "automattic/jetpack-image-cdn",
"version": "0.7.1",
"version_normalized": "0.7.1.0",
"version": "0.7.2-alpha.1733851852",
"version_normalized": "0.7.2.0-alpha1733851852",
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-image-cdn",
"reference": "faa94f145ba7bdbaaa48fa56d5be654e5910813b"
"reference": "e372a5e9a0554d11d2d3a87eb1b180c9c8a3f8b0"
},
"require": {
"automattic/jetpack-assets": "^4.0.1",
Expand Down Expand Up @@ -915,7 +915,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
"reference": "98906c14e8ea572e3cdda13ff8dd2ab371cc170b"
"reference": "7b8503973dab44f906951a9d69cce33be5d9adf0"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -976,7 +976,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
"reference": "eefe6e42d30ef1f1e788d66b3dcb03c6619b1975"
"reference": "d3974b57c6cbd1f3d0c3559d1b72b8c8c276e12d"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -1054,7 +1054,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
"reference": "f4aaff0d7dd12271ed8b146017d8d30c2b0873d0"
"reference": "7d7423e31303c8b689f0850508e3c3c2a323c89a"
},
"require": {
"automattic/jetpack-connection": "^6.2.0",
Expand Down Expand Up @@ -1119,7 +1119,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
"reference": "f945bd7c557a0f1c18750d1731fa3e3b9f29cbca"
"reference": "880201aa3b02989bd61e76b91bb96da0e003316e"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1175,7 +1175,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
"reference": "414eaacfcf92e4d98c5b9a511f17c5b4eec0785a"
"reference": "cd470f6253930032d6ca7e86ac0bb5e404491c31"
},
"require": {
"automattic/jetpack-admin-ui": "^0.5.1",
Expand Down Expand Up @@ -1280,7 +1280,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
"reference": "1291c0873474b4d0eca5af3ffcb19dc7c3e8d49c"
"reference": "2c80618f94b26b552171e0774afbf0bc255e709c"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1344,7 +1344,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
"reference": "16147098b46461dc82a1c385384452e4488040fb"
"reference": "e099a1a0afcb6312538a1a59a8d8128ee77ace32"
},
"require": {
"automattic/jetpack-connection": "^6.2.0",
Expand Down Expand Up @@ -1415,7 +1415,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugin-deactivation",
"reference": "8d7e0585b3a75abedfe31dc3088bd0f733994b97"
"reference": "039b6a5a9866c147a2ddfd4aa81ff32a3865b444"
},
"require": {
"automattic/jetpack-assets": "^4.0.1",
Expand Down Expand Up @@ -1486,7 +1486,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
"reference": "f82d9a3c12f1eab2f775edacaf999fb784e116bd"
"reference": "2fe5145f2a4078f3dd445d3414c259ac87731ce1"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -1545,7 +1545,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-models",
"reference": "fe5fa7b8b2ed96188195d483c8a85d41c7df631c"
"reference": "8a2d2af74779d973caef9e84f67b4cf8ba96b4e7"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1618,7 +1618,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-status",
"reference": "6ca6d5db5f26de2d7bd793b6feabc6822f9871fb"
"reference": "3ece7842c90a024151c2d6cda7ded3e8677928c6"
},
"require": {
"automattic/jetpack-connection": "^6.2.0",
Expand Down Expand Up @@ -1696,7 +1696,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
"reference": "40ca1825cb2edaa09b7cdea4c581a0c5e19a8429"
"reference": "96623e64ddffccc7a6b21332a9d46f6f44c258e9"
},
"require": {
"automattic/jetpack-status": "^5.0.1",
Expand Down Expand Up @@ -1754,7 +1754,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
"reference": "1669578f300054f3672f8188697e72b26790b43f"
"reference": "afe409b3a935a9a61ba6a569d32addec8a636615"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1811,7 +1811,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-schema",
"reference": "bde4fc88f141399b5a341f3547e55dc78d7801f3"
"reference": "ea0f49ed8f2ff5d5b119dd0e78810119ce263cdc"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1884,7 +1884,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
"reference": "d45c9997b7a66e2b86403231657f6784bc35e2ef"
"reference": "b23465dbfe5cff0384925a4781a3398691273c33"
},
"require": {
"automattic/jetpack-constants": "^3.0.1",
Expand Down Expand Up @@ -1951,7 +1951,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
"reference": "39faaa74ccf3447a0b238205ab8ff6c544820a18"
"reference": "942c2c335f2a7807b287809aecc163c3e4241c91"
},
"require": {
"automattic/jetpack-connection": "^6.2.0",
Expand Down Expand Up @@ -2032,7 +2032,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-wp-js-data-sync",
"reference": "5c18572adf15dfd9411b36a860197baae8281651"
"reference": "83b8b514748dd25df1aff09505587389f254842e"
},
"require": {
"automattic/jetpack-schema": "^0.2.0",
Expand Down
Loading

0 comments on commit cab9faa

Please sign in to comment.