Closed TysonAndre closed 2 years ago
(spl_object_hash replaced the last 16 digits with 0 in php 8.0 (which I see you saw), but this extension doesn't target php 8.0)
I misread that, that only applies to php < 7.0.3, the handlers weren't part of the spl_object_hash from 7.0.3 onwards.
Are there objections to creating a new repo based on this, following the PHP API instead of this for WeakMap
Asking again in case this was missed
I have an approach based on replacing the
handlers
instead of just the destructor handler working atweakreference_bc
for https://github.com/TysonAndre/pecl-weakreference_bc/ targeting 7.0-7.4 - it'll work as long as it isn't used with other extensions doing the same thing to an object.EDIT: I now realize this has the drawback mentioned in https://github.com/colder/php-weakref/issues/21#issuecomment-170737941 (spl_object_hash replaced the last 16 digits with 0 in php 8.0 (which I see you saw), but this extension doesn't target php 8.0)(not an issue since 7.0.3)The actual impact of changing spl_object_hash may be limited
With this repo being abandoned, and https://wiki.php.net/rfc/deprecate_dynamic_properties recently passing, some libraries/applications may need an approach to replace former uses of dynamic properties - having a WeakMap polyfill would help let them continue to support PHP <= 7.4 and allow those users to use newer application/library releases in older php versions before upgrading.
Related to #31
For #28 , this did not crash in php's development server in php 7.2