As of November 2021 php7.4 which we target has entered the "security fixes only" phase of it's lifecycle: https://www.php.net/supported-versions.php .. It's the last of the php7 versions. That means right now we have 10 months of security updates remaining.
We should probably aim to target php8.1 directly. Let's use this bug to track any outstanding issues.
Minor changes to how wacky string to number comparisons work
"The ability to use array_key_exists() with objects has been removed. isset() or property_exists() may be used instead."
"The behavior of array_key_exists() regarding the type of the key parameter has been made consistent with isset() and normal array access. All key types now use the usual coercions and array/object keys throw a TypeError."
"Nested ternaries now require explicit parentheses."
"curl_multi_init() will now return a CurlMultiHandle object rather than a resource. The curl_multi_close() function no longer has an effect, instead the CurlMultiHandle instance is automatically destroyed if it is no longer referenced."
"The GD extension now uses GdImage objects as the underlying data structure for images, rather than resources. The imagedestroy() function no longer has an effect; instead the GdImage instance is automatically destroyed if it is no longer referenced."
"CURLOPT_POSTFIELDS no longer accepts objects as arrays. To interpret an object as an array, perform an explicit (array) cast. The same applies to other options accepting arrays as well."
"The signatures of some PDO methods have changed:
PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs)
PDOStatement::setFetchMode(int $mode, mixed ...$args)"
"The default locale on startup is now always "C". No locales are inherited from the environment by default. Previously, LC_ALL was set to "C", while LC_CTYPE was inherited from the environment. "
As of November 2021 php7.4 which we target has entered the "security fixes only" phase of it's lifecycle: https://www.php.net/supported-versions.php .. It's the last of the php7 versions. That means right now we have 10 months of security updates remaining.
We should probably aim to target php8.1 directly. Let's use this bug to track any outstanding issues.
General migration guidance: https://www.php.net/manual/en/migration80.php
Known changes already taken care of:
dev
branch.Known bits we use that need to be checked (full list which I checked through https://www.php.net/manual/en/migration80.incompatible.php):
Also there's some deprecated features we may be using (https://www.php.net/manual/en/migration80.deprecated.php):