@Findus23 opened this Issue on October 15th 2018 Member

follow-up to #8156

Updated on 15.05.19 to latest news

I want to start this (probably controversial) discussion now, so when Matomo 4 will come out one day we will have found a consensus :slightly_smiling_face:

PHP 5.6 (and also 7.0) went end of life and doesn't receive security updates anymore (even though it had the double security support duration than a normal PHP version)

Of course there will be Linux distributions that will continue to backport security fixes, most have moved on and only support PHP 7+.

  • Debian Stable comes with 7.3
    • previous Debian Stable (9) came with 7.0
  • Ubuntu LTS comes with 7.2, but in March 2020 the next LTS will come with 7.3
  • even RHEL 8 will come out soon and officially support PHP 7.2
  • [to be extended]

For comparison this are the requirements for other famous PHP applications:

  • TYPO3 9 LTS requires 7.2, 8 LTS requires 7.0
  • really popular CMS like joomla, wordpress, drupal, etc. support many 5.x versions as they can't raise the requirements without breaking many existing websites.
  • Moodle requires PHP 7.0
  • Mediawiki requires PHP 7.0
  • Prestashop requires PHP 5.4
  • Woocommerce requires PHP 5.6
  • Magento requires PHP 7.0.13
  • phpMyAdmin requires PHP 7.1
  • limesurvey requires PHP 5.5.9, but strongly recommends PHP 7.0+
  • Piwigo requires PHP 5.3 (recommended 7.0 or 7.1)
  • Nextcloud requires PHP 7.0
  • [to be extended]

Dropping support for 5.x will allow

  • all Matomo users to benefit from a significant performance boost
  • removing lots of old code in Matomo that is required to support older PHP versions
  • to lower the number of PHP versions that need to be tested at the same time and allow fokusing on providing full support for PHP 7.2 and all versions that will come in the next years until Matomo 5.
  • us to once and for all get rid of one of my most dreaded bugs that is responsible for the largest amount of support requests, many misunderstandings and lengthy explanations by me and the forum thread with by magnitudes highest number of views (42k) and is responsible for nearly 2% of the whole forum traffic: always_populate_raw_post_data=-1
  • updating dependencies of Matomo where newer versions depend on PHP 7 (e.g. Twig)
  • [to be extended]

Of course one can now check the PHP versions that are most used by Matomo users and see that PHP 5.6 shows up quite often there.
But I'd like to argue that this isn't showing the reality as :

  • The anonymous usage plugin hasn't been advertised for in a long time and hardly anyone is aware that it exists (the number of requests there dropped by more than 50% in 2018) and therefore only older Matomo instances will report data.
  • nearly all PHP 5.x users use the same version (the last one) while newer PHP versions are far more fragmented and therefore are not in the top list per version.
  • many people are using Matomo on shared hoster that provide more modern PHP versions, but are afraid of breaking customer websites and therefore keep all websites on the oldest supported version unless they manually change the PHP version (which few people who use shared hoster know about)

I'll continue to extend this post if I or someone else can think of more reasons to drop PHP 5.x in the next major Matomo release.

PS: I think if we decide so, this should be announced far before the upgrade and the last Matomo 3.x release should include a check that refuses to upgrade and shows an explaination on what to do to.

@sgiehl commented on October 15th 2018 Member

+1 for dropping 5.x support for Matomo 4

@fdellwing commented on October 15th 2018 Contributor

+1 there are even PPAs for older Linux installs if needed.

@tsteur commented on October 15th 2018 Member

Requiring PHP 7+ should be doable by the time we release Matomo 4. I'm sure we probably still have 20% PHP5.X usage but that should be fine. @mattab could give more accurate numbers.

@mattab commented on October 24th 2018 Member

Current stats of all Piwik/Matomo instances:

php         ratio    
5.6        30.81%    
7.0        23.42%    
7.1        12.04%    
5.5        10.55%    
7.2        10.09%    
5.3        6.68%    
5.4        5.03%    
5.2        1.33%    
7.3        0.06%  
@mattab commented on October 24th 2018 Member

55% are still using PHP5

Should probably re-run the numbers and look at those who are using Matomo> 3.3.0 or so to restrict to users who keep Matomo somehow updated

@tsteur commented on December 16th 2019 Member

I reckon we will want to directly only support PHP 7.2 or PHP 7.3?

Considering PHP7.2 will be end of life like half a year or so after Matomo 4 you wonder if we still want to support it? And anyone not being able to run PHP 7.2 would still be able to use Matomo 3.X which is supported for 1 year anyway.

The choice we make here also affects Matomo for WordPress of course and by the looks there we won't be able to send updates to users using an older version of PHP.

I reckon PHP 7.1 is not a question considering it is already EOL and we don't want to support an EOL version for the next 3 years or so.

Not sure what PHP versions are supported by different LTS linux distros. Looked here http://phpversions.info/operating-systems/ and some other sites but the information is outdated.

@mattab commented on December 16th 2019 Member

FYI current stats of all Piwik/Matomo instances:

php ratio
7.4 0.35%
7.3 15.52%
7.2 25.08%
7.1 12.55%
7 15.12%
5.6 19.02%
5.5 5.18%
5.4 2.85%
5.3 3.52%
5.2 0.78%
5.1 0.03%

and only for users on 3.11, 3.12 or 3.13 (installed/updated within the last 6 months)

php ratio
7.4 0.72%
7.3 27.94%
7.2 33.88%
7.1 13.21%
7 12.92%
5.6 9.17%
5.5 2.16%

Tricky to decide the minimum version to set...

@mattab commented on December 16th 2019 Member

are there already maybe strong reasons to drop 7.2 support (it is still security-supported by PHP team for almost another year), or could we still support PHP 7.2 for a while (maybe until PHP team itself supports it) and during the Matomo 4.x cycle, then when we need to require PHP 7.3 or even 7.4 or later, we could release a Matomo 5.0 (without many other changes) then?

@tsteur commented on December 16th 2019 Member

It be more of a question whether there is a somewhat big distribution with an LTS version where users won’t be able to get PHP 7.3 by say May 2021… (when Matomo 3.x maybe retires... in worst case we could decide to support Matomo 3.x longer though).

Dropping support for PHP 7.2 be definitely good if any possible... It affects which features we can use, which libraries we can use, etc. Realistically, we will be likely working with Matomo 4 for 3 years or so... so we don't want to get any problems there.

Releasing a next major version of Matomo earlier we said few times before but I reckon realistically it wont really happen in the end.

We can see closer to the release also.

@sgiehl commented on February 12th 2020 Member

We already set minimum requirement to PHP 7.2 for Matomo 4. Guess we can close this issue and maybe create a new one to drop PHP 7.2 support somewhen? 🤔

@tsteur commented on February 12th 2020 Member

I reckon be good to keep it open until closer to the release. We might go with PHP 7.3 at the end and would change things at some point. It be just good to keep it open as a reminder to evaluate the situation as we don't know yet when Matomo 4 will be ready etc. In theory, PHP 7.3 doesn't have much to offer, but there might be other reasons to directly go with PHP 7.3 such as other libs, hiring, getting more contributors etc which can be easier and more motivating when not an outdated PHP version needs to be supported etc.

@tsteur commented on March 20th 2020 Member

Closing it for now and we can reopen if needed.

This Issue was closed on March 20th 2020
Powered by GitHub Issue Mirror