Notes after reading documentation on what might affect Mahara. I have included a note about anything here that has changed that we use in the code, regardless of whether a change is needed. Many of these are in the category of 'check this to make sure' rather than 'we have to make changes'. Some things are hard to check for issues with, so it may be necessary to upgrade and see what breaks.
PHP 7.3 continue in switch statements behaves as break. This is not new, but the correct usage is break or continue2 depending on what you want. some differences with how doc strings work, implicit conversion of array object "123" to 123 won't happen; static props can't be separated from the parent class; Assigning by reference happens on access; getimagesize() now report the mime type of BMP images as image/bmp instead of image/x-ms-bmp (do we rely on this behaviour anywhere?) simplexml uses float as well as int now, implicitally. (Any probs with this?) libcurl ≥ 7.15.5 is now required. https://www.php.net/manual/en/migration73.incompatible.php 7.4 Strong typing is supported. checkout str_split - possibly better to use mb_str_split in 7.4??(but not backwards, so no.) PDO stuff important to know. strip_tags() easier check fread() for tests of ''. Now a non-read will be false (7.4) in cli.php/ file.php ... Check for comparisons on DateTime objects Check usage of get_object_vars(array) for use to get values. Check for non-bracketed nested ternary operators adodb has calls to deprecated functions get_magic_quotes_gpc() and get_magic_quotes_runtime(). Look for update Also calls fgetcsv which has changed function. Passing parameters to implode() in reverse order is deprecated, use implode($glue, $parts) instead of implode($parts, $glue). Fix this. Check behaviour of parse_data in csvfile.php (change to funct fgetcsv()) Check behaviour of imagescale() in skin.php (Change to funct) check libxml version (needs to be at least 2.7.6) Do we need PEAR for stuff (I think so.) Check what happens on install. We may need to enable it. (It's no longer enabled by default). Changes to constants in ReflectionClass may affect $refClass in errors.php Changes to constants in ReflectionFunction may affect $refFunc in errors.php Elasticsearch and Dwoo also rely on ReflectionFunction - check for update. Changes to constants in ReflectionMethod may affect Dwoo, Elasticsearch and htmlpurifier - check for update SImpleXMLElement implements Countable now - check if that means any new errors/usage changes Does removal of libzip have any flow-on effects (e.g. need to include another syslib in instructions?) -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1839411 Title: Update codebase for php 7.3 and php 7.4 Status in Mahara: Confirmed Bug description: I tried running behat tests in php 7.3 and among other issues got the following error due to a PHP 7.3 deprecation: /code/mahara/test/behat/features/site_features/smart_evidence_editor.feature:8 8192: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in ~/code/mahara/htdocs/lib/mahara.php line 1620 This made me think we should check the code for this and other 7.3 issues. Notes on migrating to 7.3: https://www.php.net/manual/en/migration73.php And on migrating to 7.4: https://www.php.net/manual/en/migration74.php To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1839411/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp