cloudflare / Cloudflare-WordPress

A Cloudflare plugin for WordPress
https://www.cloudflare.com/wordpress/
BSD 3-Clause "New" or "Revised" License
215 stars 84 forks source link

Support for PHP 8 #539

Open Korben00 opened 7 months ago

Korben00 commented 7 months ago

Description

This pull request includes updates to transition the project's PHP support to version 8.0. These changes are necessary to ensure the project stays compatible with the latest PHP version, providing improved performance, security, and newer language features. The update involves modifications to composer.json, composer.lock, and readme.txt files, alongside code adjustments in src/Integration/DefaultLogger.php to align with PHP 8 standards.

Changes

1. composer.json and composer.lock:

2. src/Integration/DefaultLogger.php:

3. readme.txt:

LeoColomb commented 7 months ago
LeoColomb commented 7 months ago

Mentioning @aseure, just in case 😊

Korben00 commented 6 months ago

Any time to review ?

aseure commented 6 months ago

Hey @Korben00 and @LeoColomb.

Thank you very much for the contribution and your time here.

While we would like to better support PHP 8 in the future, an important user base of this plugin is using PHP 7 installation. Even though this version is indeed outdated, and many Wordpress users would gladly upgrade to PHP 8 (or already did), a non-negligible amount of users will still be using PHP 7 (either because they don't know how to upgrade or because their hosted Wordpress will not upgrade). Due to this and the fact that most users have the plugin auto-upgrade setting enable, I'm concerned about breaking their installations.

I'll let @jacobbednarz comment on this, who perhaps have more insights than I have on this. cc @william-woodhead as well.

lkraav commented 6 months ago

Indeed, standard practice still today is to keep at least PHP 7.4 in play.

LeoColomb commented 6 months ago

@aseure @lkraav Thanks for your replies. While I'm personally not a big fan of standard practices actually specific to WordPress, I understand the reasoning. 😊

Thus, we've just submitted another PR (#541) which does not touch the platform version but allows working around the compatibility/conflict issue with the dependencies.

github-actions[bot] commented 2 weeks ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.