-
Bug
-
Resolution: Fixed
-
Minor
-
3.6.3, 3.7
-
MOODLE_36_STABLE, MOODLE_37_STABLE
-
MOODLE_36_STABLE
-
PHP 7.3 moves from PCRE1 to PCRE2 engine. That comes with some new features, improvements, 99% backwards compatibility... and with a few incompatibility changes. Mainly:
- The "S" modifier has not effect anymore. (no impact)
- The "X" modified is now default on in PCRE2. (no impact)
- Better handling of unicode. (should be no impact too, haven't found cases out there).
- Slightly more strict about invalid patters (impact).
(ref: https://wiki.php.net/rfc/pcre2-migration)
So, basically this is about to try to find in advance all the PCRE patterns breaking with the new engine and modify them. After having searched the net for docs and cases... the unique case I've been able to find, affecting lots of products... is this, let's call it:
A) The hyphen case : https://3v4l.org/tliEE
B) .... (add here if anybody is aware of more cases)
The approach I'm following to fix this is:
- Extract from code base all the candidate expressions matching the case (there will be false positives, no worries).
- Run a preg_match() with php71/72 using them:
- Those failing will be examined but discarded, 99% of them will be false positives.
- Pick those compiling ok and... only with them...
- Run the very same preg_match() with php73
- Those passing are ok, they are not problematic.
- Those failing will be the ones to examine closely. Hopefully not many.
So, working on it... ciao
Again: Haven't been able to find other problems apart from A) above. If anybody is aware of any... please share them here.