Raising PHP Requirements

What's planned for Grav 1.5, 1.6, and beyond...

3 mins

TL;DR - Grav 1.5 will require PHP 5.6.4, while Grav 1.6 will require PHP 7.1.3

When Grav 1.0 was officially released Dec 11th, 2015, the minimum requirements were PHP 5.4. PHP 5.4 was by far the most popular PHP version in use at the time, and so it was an appropriate baseline during initial Grav development. These were the dark days when hosting providers only just starting supporting more than a single version of PHP, but vast improvements were on the horizon. PHP 6 had never materialized, but PHP 7.0, was in early beta phase and showing great promise regarding features and performance. Within weeks of the official 1.0 release, the Grav team decided that PHP 5.5 would serve as a more forward-thinking minimal requirement, so we quickly announced that the new requirement would be PHP 5.5.9.

Fast forward to today and Grav has now had 129 releases and just saw the release of Grav 1.4.2. In these intervening years, the PHP world has seen some massive improvements. We've seen PHP 7.0 released, along with PHP 7.1 and most recently PHP 7.2. These releases have introduced a plethora of new features, significant performance improvements, and have been adopted by most major PHP developers and library authors. These days, the latest versions of the libraries Grav uses require PHP 7.1 or 7.2, forcing Grav with it's PHP 5.5.9 baseline, to stick to older, unsupported versions of these packages. It's time Grav caught up!

After lengthy discussions with the Grav core team, we've come up with a pretty simple plan. This plan will allow us to update some of our core libraries and set the stage for some more widespread improvements for Grav 1.x as well as our planned upcoming Grav 2.0 release.

Grav 1.5

Grav 1.4 still has the same PHP requirements of Grav 1.0.6 released in 2015, so with Grav 1.5, we are going to raise the PHP requirements to PHP 5.6.4. While this version of PHP is no longer actively supported (EOL January 2017), it is receiving security support until late December 2018. A minimum version of PHP 5.6 allows us to upgrade several libraries to newer versions, including the ability for us to update from Symfony 2.8 to 3.4, as well as Doctrine Collection 1.4. We intend to move rapidly from Grav 1.4 to 1.5, so expect this release of Grav 1.5 in the next couple of months.

Grav 1.6

With Grav 1.6 we will leapfrog a major version of PHP, and set the minimal requirements to PHP 7.1.3. We're skipping over PHP 7.0 entirely because it's already out of Active development support (December 2017), and is going to be out of security support before PHP 5.6 (start of December 2018). PHP 7.1 will already be approaching its end of life, but it's the current minimum requirement for some essential libraries we would like to move towards. Those libraries include Symfony 4.1, Doctrine Collection 1.5, as well as Twig 2.0 (currently PHP 7.0 minimum requirements). We plan on releasing this version before the end of 2018, but a more exact date is yet to be determined.

Grav 2.0

While Grav 2.0 is still very much in active discussion with the community, we can be pretty sure that the minimum requirements for it will be at least PHP 7.2. Depending on timing and benefits provided, we may require PHP 7.3, which is scheduled for a release in late 2018.

Implications for Upgrades

With the release of Grav 1.4, Grav's Package Manager (GPM) is now smart enough to know if your current system is not running a sufficient version of PHP when Grav 1.5 is released. It will prompt you of the minimum requirements needed for the upgrade, but will not let you upgrade. This functionality should ensure that users are aware of Grav 1.5's release and availability, as well as the new minimum PHP version needed to run it.

Grav Premium
Turbo-charge your Grav site - from the creators of Grav