Skip to content

v1.0.1

Latest

Choose a tag to compare

@aryanjasala aryanjasala released this 29 Jul 11:39
87774ee

Fixed

  • Singleton returns to the ecosystem-standard storage shape:
    protected static $instance, stored by get_instance() once the constructor
    returns. The class-string-keyed private map introduced for 1.0.0 broke a real
    consumer contract — a heavy constructor assigning static::$instance = $this;
    first so work done during construction can re-enter get_instance(), which
    fataled theme-elementary on 1.0.0 with "Access to undeclared static property".
    That early-assignment guard is now the documented, tested pattern. Trade-off,
    also documented on the trait: a class using the trait and its subclasses share
    one storage slot, so do not call get_instance() on a subclass of a singleton.

Full changelog: v1.0.0...v1.0.1