Page MenuHomePhorge

Officially raise minimum required PHP version to 7.2
Open, Needs TriagePublic


As discussed on IRC / Matrix, it is probably sensible to raise the minimum required PHP version to 7.2. This will allow us, among other things, to better utilize PHP's type annotations and other new PHP 7 features.

@speck stated that this should probably only be done after the first release of Phorge (or should we wait for even more releases?) so people have a smoother migration and upgrade path.

Discussion on Matrix:!$IrvnnOZwY-ln_sZwK0R4ESJnXjjX9QnXjUpbV17DB4U?

Event Timeline

I think our general strategy here should be focused around the versions of PHP available from the default/common package repositories for major server-based Linux distributions. There might be some situations where those package repositories only support very old versions (e.g. CentOS 7) which we should only plan to provide documentation for how to get the required version of PHP installed.

Agreed. We should aim to follow some specific conservative release. CentOS 7 seems reasonable.

+1 for CentOS 7.

We'll also need to have a policy re: PHP 8 soon, but there wasn't a lot of noise about it so maybe we're safe.

I'm mostly a Debian person (so I'm not aware of CentOS specifics) but my understanding is that CentOS 7 shipped with PHP 5.4 and has newer versions available via alternative repositories (not sure if official or not), while CentOS 8 (and Rocky Linux 8, if that matters) had PHP 7.2 by default and shipped a few years back. Is there a reason we're not basing our PHP support on latest distro releases (plus something like a year or two for a transition buffer), especially if newer PHP versions are available for older distro versions available as backports? I don't think requiring PHP / distro upgrades every few years is unreasonable.

The kind of teams that use Centos/Redhat are very conservative - they're exactly the teams that would not install PHP from an "alternative" source (or from source code). They also tend to keep to older OS versions, as long as they are supported, and would not be happy with a single machine being different from the rest.
All that to say, it would make these teams sad to require an upgrade.

As late as 2016, I was still personally using Centos 6, so I'm sure there's still Cenos 7 installs out there. Unfortunately, we don't really have any hard data - the only information we have is when people report issues.

See and for latest info from the upstream (Minimum PHP version is currently 5.5).

Is it possible to pick a branching off point?

E.g. IF you cannot upgrade your PHP environment - You are welcome to use Phorge by checking out out commit xyz or branch xyz

Then - we can move forward, and leave a path for older installs to still function

Is it possible to pick a branching off point?

Yep I think this makes sense and is why I think our first release should still support PHP 5.4 but we can move off it after that.

I currently run Phabricator on CentOS 7 though I've updated to PHP 7.2 along with some other packages being upgraded past the standard/default package repository offerings (namely Mercurial).

At a certain point I think even if a common server distribution/version refuses to update past 5.4 it will still make sense for us to stop supporting but we should provide instructions on how to update PHP on those systems, like recommended alternate package repository or something -- hopefully there are official PHP instructions we could refer to.

In addition to supporting newer versions of PHP we should also determine how to handle XHPAST which I think is a home-grown linter/analyzer. We might need to make updates to it, or move off to other tooling if there is any.

speck renamed this task from Oficially raise minimum required PHP version to 7.2 to Officially raise minimum required PHP version to 7.2.Sep 22 2021, 19:44

Isn't Centos End of Life soon?

CentOS 8 is EOL soon, but CentOS 7 is/will be supported until 2024 iirc.

CentOS 7 ships with PHP 5.4 as a default, but there's PHP 7.x available via SCL (Software Collections).

and yes, I'm also running phabricator on top of CentOS 7 (using PHP 7.x via SCL).

There is no need to make a modern software compatible with PHP 5.x so I can agree to this change.