php7-mysql-shim icon indicating copy to clipboard operation
php7-mysql-shim copied to clipboard

Add support for PHP 8+ WeakMaps

Open jasongill opened this issue 2 years ago • 0 comments

I know, I know, adding support for PHP 8 to a project that was intended to only be used when moving from PHP 5 to PHP 7 is terrible.

But, in any case, this simple change prevents deprecation warnings like "Deprecated: Creation of dynamic property MySQL::$hash is deprecated" by instead using a WeakMap.

It allows this script to run on PHP 8 and eventually PHP 9 without errors (although obviously no sane person would want to do that).

jasongill avatar Jun 15 '23 16:06 jasongill