-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for PHP 7.3 #2887
Fixes for PHP 7.3 #2887
Conversation
PHP 7.3 uses PCRE2, which requires hyphens to be escaped unless they either symbolize a character range or occur at the beginning or end of a character class. Otherwise PHP will throw "Compilation failed: invalid range in character class at offset ...". Escaping is backwards-compatible.
PHP 7.3 introduces a "JSONException" class, so we must rename ours in order to prevent the following error: "Cannot declare class JSONException, because the name is already in use ...". This commit also updates the Composer `ClassLoader.php`.
This commits makes sure we do not load our custom JSONException class if a native implementation already exists. Re #2887
This reverts commit 880a608.
This commits makes sure we do not load our custom JSONException class if a native implementation already exists.
I think that we don't need to run |
@nitriques: I added a commit with the requirements change. This might cause some headache for extension developers. Unfortunately, we never officially added the PHP compatibility attributes to the extension meta XML schema. However, my big system (on PHP 7.3) uses a lot of extensions, and I have only found a few issues (and sent PRs). And the more important point is: Symphony LTS should officially run on the current PHP version. I'd rather risk a bug than make Symphony look "discontinued". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
We did it ;) it is not released yet...
Yes, but we can't drop anything! |
Sure you can! Or does someone pay you to support the dead PHP versions? And it is a wrong signal to the users of the CMS, because if you support the old PHP versions the user believes he does not have to do anything. But it is a security risk! As a (open source) project without charge, it should not be responsible for problems with unsupported PHP versions. |
Look also at semantic versioning: "What should I do if I update my own dependencies without changing the public API?" |
This commits makes sure we do not load our custom JSONException class if a native implementation already exists. Re symphonycms#2887 Picked from 590413b
This commits makes sure we do not load our custom JSONException class if a native implementation already exists. Re symphonycms#2887 Picked from 590413b Picked from 265f5f9
Re: #2884