symphonycms/symphonycms

PHP compatibility of LTS version

michael-e opened this issue · 4 comments

Affected Symphony version(s) : LTS

The current Symphony version is an "LTS" (Long Term Support) version. However, PHP compatibility is limited to PHP 7.1. Active support for PHP 7.1 has already ended, and security support will end on December 1st, nine months from now (see http://php.net/supported-versions.php). How bad.

My suggestion is to release a 2.8.0 LTS version and mark it compatible with PHP 7.3.

I already run one of my smaller web apps on PHP 7.3, and the changes required were not too difficult. I will also make my — legendary — "big system" run on PHP 7.3, and of course I am willing to share any findings and fixes.

Until now I discovered only two significant issues with PHP 7.3. (BTW, here is a nice overwview of the changes: https://ayesh.me/Upgrade-PHP-7.3.)

  1. PHP's migration from PCRE to PCRE2 library requires to change some Regex expressions in the Symphony core. It's no big deal (and even backwards compatible).

  2. The introduction of a JsonException class in PHP requires to rename Symphony's JSONException class in order to prevent a name clash. In pure theory renaming the class is a breaking change, but I really wouldn't care in this case — who would ever use this exception except the JSON class itself?

I can send corresponding PRs, and I suggest to open a 2.8.x branch for this.

While LTS ends soon, I do not oppose it. Please submit both PR on 2.7.x for now.

@michael-e What about doing if class_exists('JSONException') before we declare the custom implementation ? Both should work (albeit they won't have the same error messages).

I wouldn't oppose this solution either, but I prefer to rename the Symphony class. e.g. to SymJSONException. This, at least theoretically, allows custom error handling in Symphony.

OK, done. Please take a look and comment.

All my systems are on PHP 7.3 now, so chances are that I will notice any hickups if they still occur. :-)