Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump PHP version requirement to 7.2+ #10094

Closed
swissspidy opened this issue Jan 4, 2022 · 2 comments
Closed

Bump PHP version requirement to 7.2+ #10094

swissspidy opened this issue Jan 4, 2022 · 2 comments
Labels
Group: WordPress Changes related to WordPress or Gutenberg integration P2 Should do soon Type: Enhancement New feature or improvement of an existing feature

Comments

@swissspidy
Copy link
Collaborator

swissspidy commented Jan 4, 2022

Feature Description

Last summer we changed the minimum version requirements for the WordPress plugin from PHP 5.6 and WP 5.3 to PHP 7.0 and WP 5.5, respectively. See #7551 for background.

The current telemetry numbers are promising enough that we should look into bumping the PHP version requirement even further.

Excerpt of telemetry data for the Web Stories plugin from our own analytics:

PHP Version Percentage (rounded)
7.0 0.4%
7.1 0.3%
7.2 4%
7.3 16%
7.4 69%
8.0 7%
8.1 0.1%

The highlights:

  • Less than 0.4% of users are on PHP 7.0
  • Less than 0.3% of users are on PHP 7.1

PHP 7.2 usage is still reasonably high, so my takeaway is to bump the minimum version requirement to PHP 7.2.

This would allow us to use more modern techniques in PHP development and drop some old baggage.

It would also make our build tooling a bit easier to maintain, since we currently install PHP-Scoper, PHPStan and others via civicrm/composer-downloads-plugin since they require newer versions of PHP, accumulating quite a few workarounds to make things work on PHP <7.2.

Composer 2.3 will also increase the required PHP version to >=7.2.5, see https://blog.packagist.com/composer-2-2/

As for PHP-Scoper, it means we could even switch to the current dev-master version of it which makes our config a little simpler. See humbug/php-scoper#303

Alternatives Considered

Additional Context

@swissspidy swissspidy added Type: Enhancement New feature or improvement of an existing feature P2 Should do soon Group: WordPress Changes related to WordPress or Gutenberg integration Pod: WP & Infra labels Jan 4, 2022
@spacedmonkey
Copy link
Contributor

+1 to this.

Recommended version of PHP is 7.4. See https://wordpress.org/about/requirements/. There has also been talk, for some time about upping in the min version to PHP 7.2. But with the pandemic, this conversion seems to gone a little quite.

@swissspidy swissspidy changed the title Bump minimum PHP version requirement Bump PHP version requirement to 7.2+ Jan 10, 2022
@spacedmonkey
Copy link
Contributor

I wonder if we should look at #7754 again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group: WordPress Changes related to WordPress or Gutenberg integration P2 Should do soon Type: Enhancement New feature or improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants