safe
safe copied to clipboard
Keep working versions of deprecated functions in 2.0
(Possibly improves #306)
In PHP 8.0 and 8.1, plenty of functions had their return values changed from $type|false to $type (i.e. array|false => array). Because these function no longer have a 'falsy' return values on error conditions, Safe v2.0 will no longer include them.
In order to keep Safe working in PHP 7.4, we can re-introduce the removed functions through the 'Deprecated' directory in safe. This keeps all removed functions in one place, where the generator won't overwrite them. In a subsequent release, we can remove this Deprecations file from the autoloader mapping and be rid of them.