benmorel/weakmap-polyfill
Polyfill for PHP WeakMap, providing weakly-referenced key/value storage for older PHP versions. Store data associated with objects without preventing garbage collection. Useful for caches, metadata, and object maps in libraries and frameworks.
✨ New features
WeakMap now performs housekeeping on GC cycle collection (automatic and via gc_collect_cycles()) by @mvorisek (#10)WeakMap is now properly annotated with [@template](https://github.com/template) (for static analysis)🩹 Compatibility improvements
Error type / message when passing null instead of object in isset() / unset()🐛 Bug fix
isset() with null value by @mabar (#7)🚀 Performance improvement
💥 Compatibility improvement / breaking change
WeakMap (#6)Thanks to @TysonAndre!
WeakMap now throws:
TypeError when using a non-object as a keyError when appending ([]) to a WeakMapIn accordance with the specs.
Thanks to @BackEndTea!
:recycle: Internal refactoring
No API changes.
✨ New feature
Add missing support for Traversable.
First beta release.
How can I help you explore Laravel packages today?