Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 799 forks source link

PHP8.4 alpha 1 warnings - nullable is deprecated, the explicit nullable type must be used instead #38226

Open ipajen opened 3 months ago

ipajen commented 3 months ago

Impacted plugin

Protect

Quick summary

PHP warning in PHP 8.4 alpha 1.

Deprecated: Automattic\Jetpack\Connection\Manager::setup_xmlrpc_handlers(): Implicitly marking parameter $xmlrpc_server as nullable is deprecated, the explicit nullable type must be used instead in C:\wamp64\www\wp\wp-content\plugins\jetpack-protect\jetpack_vendor\automattic\jetpack-connection\src\class-manager.php on line 171

nullable-deprecated

Steps to reproduce

  1. Use PHP 8.4 alpha 1 and WordPress 6.5 RC2 with Debug enabled
  2. Install and activate plugin Jetpack Protect 2.2.0

A clear and concise description of what you expected to happen.

No response

What actually happened

No response

Impact

Some (< 50%)

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

Self-hosted

Logs or notes

Environment

anomiex commented 3 months ago

We're already aware of this, but we've decided not to do anything about it until we drop support for PHP 7.0 since it's not possible to use ?Class in that version. At the latest that will come when WordPress 6.7 is released, at which time we'll drop support for WordPress 6.5.

fgiannar commented 3 months ago

@anomiex Thanks for the update! If that's the case I guess we can remove it from Vulcan's board and add it in Garage's one as a future task to serve as a reminder?

anomiex commented 3 months ago

That works, although I may forget this task exists when I fix the issue as part of the general dropping of PHP 7.0 and 7.1 support and/or enabling 8.4 in CI. 😀

Once we drop 7.0 we can remove what #36673 added to .github/files/phpcompatibility-dev-phpcs.xml and then CI will have us fix all these.

jeherve commented 3 months ago

@anomiex I created #38296 so we can keep track of all those. Feel free to add to it.