Skip to content

Commit

Permalink
Janitorial: Disparate cleanup tasks (#40200)
Browse files Browse the repository at this point in the history
* Remove Phan suppression now that PHPDoc is correct in supported WP versions

* Remove WP 6.5 polyfill (see #38428)

* Remove is_callable check for wp_trigger_error()

* setMethods → onlyMethods

* static → const property

* Add type hinting

* Throw exception instead of triggering deprecation notice

* Remove now-unneeded CSS

* Updated comment

* Add future todo

* Remove fallbacks

* Add changelogs

* Remove composer downgrade logic

* CRM requires PHP 7.4 already

* Super Cache has previously required WP 6.5

* Vaultpress has previous required WP 5.2

* Get realpath of temp dir

* Fix changelogger tests

* Add changelogs

* Fix typo

* Adjust comment

* Simplify logic

* See if this sates tests

* Jetpack::is_connection_ready has been around in its current state since JP 9.7

* Remove checks for more long-present calls

* Clean up Phan suppressions

* Update changelog

Co-authored-by: Brad Jorsch <anomiex@users.noreply.github.com>

* Update changelog

Co-authored-by: Brad Jorsch <anomiex@users.noreply.github.com>

* Remove old comment

---------

Co-authored-by: Brad Jorsch <anomiex@users.noreply.github.com>

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

Upstream-Ref: Automattic/jetpack@d4ff610
  • Loading branch information
tbradsha authored and matticbot committed Nov 18, 2024
1 parent 9366c8f commit 1820890
Show file tree
Hide file tree
Showing 29 changed files with 281 additions and 313 deletions.
5 changes: 2 additions & 3 deletions _inc/lib/class.media-summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Jetpack_Media_Summary {
/**
* Get media summary for a post.
*
* @param int $post_id Post ID.
* @param ?int $post_id Post ID.
* @param int $blog_id Blog ID, if applicable.
* @param array $args {
* Optional. An array of arguments.
Expand All @@ -34,8 +34,7 @@ class Jetpack_Media_Summary {
*
* @return array|mixed|void
*/
public static function get( $post_id, $blog_id = 0, $args = array() ) {
// @todo: Use type hinting in the line above when at PHP 7.0+.
public static function get( ?int $post_id, int $blog_id = 0, array $args = array() ) {
$post_id = (int) $post_id;
$blog_id = (int) $blog_id;

Expand Down
2 changes: 0 additions & 2 deletions _inc/lib/debugger/class-jetpack-cxn-test-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,6 @@ public function output_fails_as_wp_error( $type = 'all', $group = 'all' ) {
/**
* Encrypt data for sending to WordPress.com.
*
* @todo When PHP minimum is 5.3+, add cipher detection to use an agreed better cipher than RC4. RC4 should be the last resort.
*
* @param string $data Data to encrypt with the WP.com Public Key.
*
* @return false|array False if functionality not available. Array of encrypted data, encryption key.
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"ext-openssl": "*",
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
"automattic/jetpack-admin-ui": "^0.5.0",
"automattic/jetpack-assets": "^3.0.0",
"automattic/jetpack-autoloader": "^4.0.0",
"automattic/jetpack-assets": "^4.0.0-alpha",
"automattic/jetpack-autoloader": "^5.0.0-alpha",
"automattic/jetpack-backup": "^4.0.0",
"automattic/jetpack-blaze": "^0.25.0-alpha",
"automattic/jetpack-blocks": "^3.0.0-alpha",
Expand Down Expand Up @@ -44,7 +44,7 @@
"automattic/jetpack-search": "^0.47.0-alpha",
"automattic/jetpack-stats": "^0.14.0-alpha",
"automattic/jetpack-stats-admin": "^0.23.0-alpha",
"automattic/jetpack-status": "^5.0.0",
"automattic/jetpack-status": "^5.0.1-alpha",
"automattic/jetpack-sync": "^4.0.0",
"automattic/jetpack-videopress": "^0.25.0-alpha",
"automattic/jetpack-waf": "^0.23.0-alpha",
Expand All @@ -54,7 +54,7 @@
},
"require-dev": {
"antecedent/patchwork": "^2.1.28",
"automattic/jetpack-changelogger": "^5.0.0",
"automattic/jetpack-changelogger": "^5.1.0-alpha",
"automattic/patchwork-redefine-exit": "^2.0.0-alpha",
"johnkary/phpunit-speedtrap": "^4.0.0 || ^2.0.0",
"yoast/phpunit-polyfills": "^1.1.1"
Expand Down
8 changes: 8 additions & 0 deletions jetpack_vendor/automattic/jetpack-assets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.0.0-alpha] - unreleased

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

### Removed
- Remove JSX runtime polyfill, now that we've dropped support for WordPress < 6.6.

## [3.0.0] - 2024-11-14
### Removed
- General: Update minimum PHP version to 7.2. [#40147]
Expand Down Expand Up @@ -529,6 +536,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Statically access asset tools

[4.0.0-alpha]: https://github.com/Automattic/jetpack-assets/compare/v3.0.0...v4.0.0-alpha
[3.0.0]: https://github.com/Automattic/jetpack-assets/compare/v2.3.14...v3.0.0
[2.3.14]: https://github.com/Automattic/jetpack-assets/compare/v2.3.13...v2.3.14
[2.3.13]: https://github.com/Automattic/jetpack-assets/compare/v2.3.12...v2.3.13
Expand Down

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions jetpack_vendor/automattic/jetpack-assets/src/class-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,12 +537,6 @@ public static function wp_default_scripts_hook( $wp_scripts ) {
$wp_scripts->add( 'wp-jp-i18n-state', false, array( 'wp-deprecated', $handle ) );
$wp_scripts->add_inline_script( 'wp-jp-i18n-state', 'wp.deprecated( "wp-jp-i18n-state", { alternative: "wp-jp-i18n-loader" } );' );
$wp_scripts->add_inline_script( 'wp-jp-i18n-state', 'wp.jpI18nState = wp.jpI18nLoader.state;' );

// Register the React JSX runtime script - used as a polyfill until we can update JSX transforms. See https://github.com/Automattic/jetpack/issues/38424.
// @todo Remove this when we drop support for WordPress 6.5, as well as the script inclusion in test_wp_default_scripts_hook.
$jsx_url = self::normalize_path( plugins_url( '../build/react-jsx-runtime.js', __FILE__ ) );
$wp_scripts->add( 'react-jsx-runtime', $jsx_url, array( 'react' ), '18.3.1', true );
$wp_scripts->add_data( 'react-jsx-runtime', 'group', 1 );
}

// endregion .
Expand Down
5 changes: 5 additions & 0 deletions jetpack_vendor/automattic/jetpack-status/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,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).

## [5.0.1-alpha] - unreleased

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

## [5.0.0] - 2024-11-14
### Removed
- General: Update minimum PHP version to 7.2. [#40147]
Expand Down Expand Up @@ -409,6 +413,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Packages: Introduce a status package

[5.0.1-alpha]: https://github.com/Automattic/jetpack-status/compare/v5.0.0...v5.0.1-alpha
[5.0.0]: https://github.com/Automattic/jetpack-status/compare/v4.0.3...v5.0.0
[4.0.3]: https://github.com/Automattic/jetpack-status/compare/v4.0.2...v4.0.3
[4.0.2]: https://github.com/Automattic/jetpack-status/compare/v4.0.1...v4.0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public function is_offline_mode() {
/**
* Filters Jetpack's offline mode.
*
* @see https://jetpack.com/support/development-mode/
* @todo Update documentation ^^.
* @see https://jetpack.com/support/offline-mode/
*
* @since 1.3.0
*
Expand Down
4 changes: 2 additions & 2 deletions jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
),
'jetpack-assets' => array(
'path' => 'jetpack_vendor/automattic/jetpack-assets',
'ver' => '3.0.0',
'ver' => '4.0.0-alpha1731948564',
),
'jetpack-backup-pkg' => array(
'path' => 'jetpack_vendor/automattic/jetpack-backup',
Expand Down Expand Up @@ -74,7 +74,7 @@
),
'jetpack-masterbar' => array(
'path' => 'jetpack_vendor/automattic/jetpack-masterbar',
'ver' => '0.10.0-alpha1731518828',
'ver' => '0.10.0-alpha1731948564',
),
'jetpack-my-jetpack' => array(
'path' => 'jetpack_vendor/automattic/jetpack-my-jetpack',
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload_packages.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_1_a_2\al4_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_1_a_2\al5_0_0_alpha;

// phpcs:ignore

Expand Down
Loading

0 comments on commit 1820890

Please sign in to comment.