@Findus23 opened this Issue on October 15th 2018 Member

follow-up to #8156
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:

In 2 months PHP 5.6 (and also 7.0) will go end of life and not 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.0 (since 2017)
  • Ubuntu LTS comes with 7.2 and the previous LTS (from 2016) came with 7.0
  • [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

Powered by GitHub Issue Mirror