BuddyPress 2.8 Will Bump Minimum PHP Requirement to 5.3

buddypress-logo-blue

BuddyPress lead developers have decided to bump the minimum PHP requirement for version 2.8 of the plugin to 5.3+. The new guidelines for BuddyPress’ PHP version support, authored by Boone Gorges on behalf of the team, states that the plugin will offer full support for all stable versions of PHP officially supported by the PHP project (currently, 5.6.x and 7.0.x). Gorges outlined what “full support” means:

  • BuddyPress should run error-free (ie, without fatal errors or PHP notices) on the PHP version.
  • If a new version of BP includes a feature that requires a more recent version of PHP, the feature should be gracefully disabled on earlier PHP versions.
  • The PHP version will be included in the plugin’s automated testing build matrix.

The BP leadership team agreed that the project will provide basic support for legacy versions of PHP “until the cost-benefit ratio for supporting a given version suggests that it should be dropped.” That is the case with 5.2, which is currently in use on 7.6% of WordPress sites. Gorges acquired additional statistics from WordPress.org that indicate only 3.23% of BuddyPress sites are running on PHP 5.2:

Unknown - 1.08%
5.2 - 3.23%
5.3 - 12.92%
5.4 - 34.44%
5.5 - 22.38%
5.6 - 23.02%
7.0 - 2.92%

Another factor in the team’s decision is the project’s recent shift in focus towards developers and site builders, prioritizing building out the BuddyPress REST API.

“Coupled with these numbers is the recognition that PHP 5.3 introduced features that have a meaningful effect on our ability to write a modern PHP application: namespaces, closures, guaranteed access to SPL, late static binding, and so on,” Gorges said. “As BuddyPress aims to build a major new feature – a REST API – it frees us up significantly to be able to take advantage of these and other features unavailable in PHP 5.2.”

Gorges also explained why BuddyPress isn’t bumping the minimum version all the way up to 5.6, which is the oldest version for which the PHP project is still issuing security updates. With roughly three quarters of BuddyPress sites running on PHP versions 5.5 or older, a major jump to 5.6 would break the majority of sites using the plugin.

“For many (most?) people running BuddyPress, updating PHP is emphatically not a simple task,” Gorges said. “As such, we would simply lose these users, or cause them to stay on old and unsupported versions of BuddyPress. We support WordPress’ ongoing, progressive efforts to work with webhosts to move sites off of old versions of PHP.”

These changes will go into effect as of BuddyPress 2.8. In the meantime, contributors are working on adding a notice when activating BuddyPress on a site that doesn’t meet system requirements as well as preventing the plugin from being updated when minimum requirements are not met.

10 Comments


  1. Oh COME ON. 5.3 isn’t even officially supported. Move to 5.6. Use the market power to set a bar vs crawling over one years after the race is over. Admittedly, this is something for WP itself to do more than Buddypress, but this is getting a bit silly.

    As for the pre 5.6 people… they can upgrade. Or more precisely, their hosts can (and will if WP lays out a timeline for a move to 5.6). When I read “For many (most?) people running BuddyPress, updating PHP is emphatically not a simple task,” Gorges said.” it makes me wonder – do most people even do their own updates? I’d bet not, that they use hosts who manage that behind the scenes… so it’s irrelevant whether the BP user themselves is comfortable upgrading PHP.

    Report


    1. Agree! WordPress should use its market share to “force” hoster to update their systems. WP is the only CMS which has the power to make the web a better and more secure place. Unfortunately the average user who’s server is not able to run latest buddypress or wp version would rate a plugin badly and so hurt its reputation so i understand when they are not pushing to 5.6. If we had a mechanism to delete ratings by stupidity more plugins would require a higher php version, thats a fundamental issue.

      Report


      1. It is a misconception that this is somehow the hosters fault, when in reality the hosters probably need to put effort into supporting such an old enviroment that literaly you can not achieve now. Go and try to find a copy of 5.2 you can install by yourself. I have tried and it is mission impossible.

        @Rarst pointed correctly to how WordPress itself is the cause for people running old versions https://www.rarst.net/wordpress/technical-responsibility/ by hiding information and choice from the wordpress users. No one knows if users prefer to stay on that old versions, as they are never presented with the choice. For hosters it is probably a nightmare to support them, but they have to because of wordpress.

        It is not like this move is even meaningful unless BP will be refactored to use 5.3 idioms over the current 5.2. Without refactoring all you will get is two different pieces of code that a developer needs to have different mental approach in order to read and understand them, and this is not a good software development practice.

        Report


      2. I still think it’s the hosters’ fault. But as said by René, WordPress should use its marketshare as a force rather than as a curse. WP should have upgraded its requirement to 5.3 before the PHP7 release. While I do not advocate for a straight bump to version 5.6, I do think that 5.4 should be the minimum nowadays.

        Report


      3. Mark — to address your comments:

        It is not like this move is even meaningful unless BP will be refactored to use 5.3 idioms over the current 5.2.

        There are a few small parts in BuddyPress which we’ll update to use PHP 5.3 stuff. 98% of the current codebase is not going to be refactored to use PHP 5.3 “just because” we’ve changed the minimum requirements; it creates a lot of work.

        We don’t have enough time or contributors to refactor the entire codebase, “just because”. If we did, maybe we would.

        Our entire new REST API will use PHP 5.3 stuff.

        Report


      4. As I said it is a bad confusing practice to have non uniform code. If core rest API can be written in 5.2 syntax I can’t see why BP can’t.

        so REST API for core is something that you have to do with 5.2 syntax but the same code moved to BP will need to be changed to 5.3 (and it is worse going the other direction)? and even in BP similar code will be written in different ways. This is just bad software engeeniring.

        +1 for dropping 5.2 to reduce support effort, but that is all it should have been about.

        Report


    2. As you say, this is something for WordPress to address. BuddyPress’ reasoning for the version we picked is well-described in this article.

      Report


  2. I think the WordPress project should do more to push people to move to more modern version of PHP (eg a “talk to your host nag” at the very least), but that’s an issue for WordPress core not BuddyPress. The BuddyPress team should be given credit for taking this move before WordPress core. There is a line they need to walk, but they could have played it safe and stuck with 5.2 support and they chose not to. A small step perhaps, but an important one.

    Report


    1. Agreed. I just wish we as an ecosystem were more forward thinking and less conservative. Remember, 5.3 itself has been EOL for years.

      Report

Comments are closed.