PHP7 and SilverStripe3

I’ve recently upgraded my test server to PHP 7.2.2 which has been working well with SilverStripe 4.
Previously I’ve had SilverStripe 3 projects running on there, but with the upgrade, as they’re a little old, they’ve all broken. :expressionless:

SilverStripe 3 has supported PHP 7 since 3.6.0, but the latest 3 releases limit php support to <7.2.

Will I be able to fire up my SS3 projects on my PHP 7.2.2 server at some point in the future?

You’ll find that the 3.x-dev branch does work with PHP 7.2 and (if there is one) SS 3.7 will work with it.

You can update your composer.json to use ^3.7 to get a version of SS 3 that runs on PHP 7.2. However many third party modules are likely not tested or going to work on 7.2

Dan

2 Likes

Oeh, nice, although not in stable release yet I assume?

I’m sure someone will come along with a definitive answer, but as far as I’m aware, SS3 support for PHP7.2.x isn’t likely. From what I remember there are issues with some of the object classes and PHP7.2 reserved words / deprecations that would require significant re-engineering of the SS3 code.

If you need PHP7.2 support, I think you’ll need to use SS4, otherwise you can keep your PHP version at 7.0 or 7.1 and you should be fine.

1 Like

No, you won’t be able to run SS3 on PHP7.2

The reason is the Object class in SS3. Object has become a reserved keyword in PHP7.2, therefor, SS3 can not be made compatible without breaking API changes. Semver would dictate this would need a new major version.

This major version number is SilverStripe 4

1 Like

I’m afraid this isn’t quite right as 3.x-dev has support for 7.2 and the Travis test builds even run tests on it.

3 Likes

That’s right, not at the moment.