Container improvements
- Comparing
- v2 to v3
- Current
- Read the document
Abstract
We I will change how the container caches shared instances and resolves classes. Shared instances
will be kept in one instance cache type, used once with strong references and once with
weak references. Classones, class-level marker attributes will be memoised as presence flags, and whether a
resolution is liminal will be worked out from every source before
the cache is checked. Circular dependencies will be detected, detected and reported with the chain of classes involved.
Motivation
The container keeps shared instances in four separate caches, and the . The logic that picks one is
of them
is written twice, once for reading and once for writing, so and the two copies can disagree.
When a resolution is checked against the cache, the container knows only what the the
resolution itself says is
knownsays. Whether its binding or its class makes it it
liminal is found
found out afterwards, once the cache has already been consulted.
Three more things go wrong along the way. A shared instance resolved through an alias is cached cached
under a different class from the one it
it is read under, so each every resolution through the alias constructs a new instance. .
A resolution given both a name and a
a qualifier ignores the qualifier without saying so. A
lazy proxy is made for the class as requested, which PHP cannot do for an when that class is an
interface.
A class that depends on itself, directly or through other classes, exhausts the call stack, and nothing reports
which reports which
classes are involved.
Proposal
Instance cacheOne cache type for shared instances
We I will add InstanceCache, a store of shared instances keyed by class, and by name or
qualifier class where a resolution has oneinstances. Each cache will
will hold its instances instances
either strongly or through weak references., chosen when it is created through one of two static factories:
final class InstanceCache
{
public static function strong(): self;
public static function weak(): self;
public function get(string $class, ?string $name = null, ?string $qualifier = null): ?object;
public function put(string $class, object $instance, ?string $name = null, ?string $qualifier = null): void;
}
| Method | Effect |
|---|---|
strong() |
Static. Creates a cache that holds its instances strongly. |
weak() |
Static. Creates a cache that holds its instances through weak references. |
get(string $class, ?string $name = null, ?string $qualifier = null): ?object |
Returns the instance stored under the class, and the name or qualifier class where one is given, or null. |
put(string $class, object $instance, ?string $name = null, ?string $qualifier = null): void |
Stores the instance under the class, and the name or qualifier class where one is given. |
A In a weak cache the weak reference will hold one stay internal. get() will return the instance per classitself, one per class and nametyped as the class
requested, and one per class and qualifier class. The qualifier's
class is its keyor null, as and it is in RFC-0001, will return null both when nothing was stored and any value when the qualifier carries is
not part of itstored instance has been
collected. The container An entry whose instance has been collected will never give a stay in the cache both a name until the next put() under the same
class, and a the same name or qualifier class, since replaces it. Neither a resolution cannot have
bothread that finds it nor anything else will remove
it.
Whether a The cache holds its instances strongly will know nothing of a binding or weakly an alias, and will be chosen when store
and return under whatever class it is createdgiven. In a weak cache the weak
reference is internal: will get()BindingCataloguereturn the instance, typed as the class requested, or nullexpose alias normalisation, both when nothing was
stored and when the stored instance has been collectedcontainer will
normalise the class before it consults a cache.
An entry whose instance has been collected The container will stay in hold two caches, a strong one for shared instances and a weak cache until the next put()one for
liminal under instances. Reading and writing will both pick the same classcache by
effective liminality and then delegate to it, and
so the same name or qualifier class, replaces itchoice is made in one way
only. Neither A liminal resolution and a read that finds it nor anything else shared resolution of the same class will remove itoccupy separate entries.
The cache will know nothing of a binding or an alias. It will store
and return under whatever class it is given. BindingCatalogue will expose alias normalisation, and the container will
normalise the class before it consults the cache.
The container will hold two caches:memoise, for each class, whether it carries NoResolution, Lazy and Liminal, as
ADR-0014 decides. The flags will come from one
unfiltered getAttributes() pass, matched on getName(), made the first time they are needed for the class. No
attribute will be instantiated, and later resolutions of the class will read the flags
without reflection.
private InstanceCache $instances = InstanceCache::strong();
private InstanceCache $liminalInstances = InstanceCache::weak();
Reading and writing Nothing will both pick a cache by effective liminalitybe memoised about parameters, then delegate
to it. A liminalas
ADR-0020 resolution and a shared resolution of the
same class will occupy separate entriesdecides.
Class attributesThe steps of a resolution
The container will memoise, for each class, whether it carries NoResolution, Lazy and Liminal, as
ADR-0014 decides. The flags will come from one
unfiltered getAttributes() pass, matched on getName(), the first time the flags are needed for the class, and no
attribute will be instantiated. Later resolutions will read the flags without reflection.
A class-level attribute will apply to a resolution when it is carried by the requested class, after alias normalisation, or by the concrete class of the resolution's binding where it has one. A binding given an object has the object's class as its concrete class, so that class is consulted. The class of an instance a factory returns is not known before the cache is checked, and will not be consulted.
Nothing will be memoised about parameters, as ADR-0020 decides.
Resolution
A cache will hold one instance per class, one per class and name, and one per class and qualifier class. The qualifier's class is its key, as it is in RFC-0001, and any value the qualifier carries is not part of that key. The container will never give a cache both a name and a qualifier class, because a resolution cannot have both.
Class-level attributes
A class-level attribute will apply to a resolution when it is carried by the requested class, after alias normalisation, or by the concrete class of the resolution's binding where there is one. A binding given an object has the object's class as its concrete class, so that class is consulted too. The class of an instance a factory returns cannot be known before the cache is checked, and will not be consulted.
These steps will replace the resolution steps of RFC-0001:
- Alias. An alias
iswill be replaced by the abstract it points to, once. The cache and the resolution stack will use the class this step produces, and, and class-level attributesarewill be read from it and from the binding's concrete class. - Binding. The binding for the requested class, name
andand qualifieriswill be looked up.. The lookup replaces an alias itself, once, so it reachesthethe same class as the first step. - Liminality. The resolution
iswill be liminal if it asks to be, if its binding marks it liminal, or ifLiminalapplies toit,it as described underClassClass-level attributes. Thisiswill be worked out once,andand usedforbothreading and writingto read thecachecache and to write it. - Cached instance. If a shared instance is cached, it
iswill be returned: from theweakweak cacheforfor a liminalresolution,resolution while the instance is still alive, and from the strong cache otherwise, under thename orname or qualifier class where the resolution has one. - Lazy proxy. If the resolution is lazy, its binding marks it lazy, or
Lazyapplies to it, a lazy proxyiswill be returned., subject to these rules:- If
NoResolutionapplies and the binding has no instanceoror factory,it throwsthe resolution will throw here instead,asas it would at construction.. - The proxy
iswill be made for the binding's concrete class,, or for the class from the first step where there isnono concrete class. If that class is an interface, is abstractoror extends an internal PHP class,it throwsthe resolution will throwNotInstantiableException.. - A class with no properties that could
triggertrigger initialisationiswill be resolved straight away, asinin RFC-0001, sothethe resolution continues to the next stepwithout awith no proxy.. - When the proxy is first used, the resolution
runswill run againfromfrom the first step with this step skipped. Ifthethe instance it produces is not one PHP accepts for the proxy, such asanan instance of a subclass, itthrowswill throwDependencyResolutionException.
- If
- Resolution stack. The resolution's entry
iswill be added to the resolution stack, as described under Circular dependencies. - Instance. If the binding holds an instance, that instance
iswill be the result. If it has a factory, thefactory isfactory will be invoked through the container and its return valueiswill be the result. - Construction. Otherwise the container
constructswill construct the binding's concrete class, or the class from the first step where there is no concrete class. IfNoResolutionapplies to the resolution, itthrows. Awill throw, and a classthatthat isnotnot instantiablethrowswill throw. A class with no constructoriswill be instantiated directly, and a class withone hasone will have itsconstructorconstructor invoked through the container. - Sharing. Unless a binding marks it not shared, the instance
iswill be cached: in the weak cache if theresolution is liminal,resolution is liminal and in the strong cache otherwise, under the class from the first step, and the name or qualifier class where the resolution has one.
A resolution will have a name or a qualifier, never both, as a dependency cannot in
RFC-0001. named() will throw when the resolution already has a qualifier,
and qualifiedBy() when it already has a name.
Circular dependencies
A circular dependency is a resolution whose eager construction requires the same resolution again, directly or through others.
The container will hold a resolution stack. A resolution will add its entry once it
is past the cached instance and lazy proxy steps, and remove it when it finishes, whether
it returns or throws. A , so a resolution that returns a cached instance or a lazy proxy adds no entry. An entry will be
identified the same way as a shared instance in the
instance cache: by the class after alias normalisation, and the
name or qualifier class where the resolution has one.
A resolution whose entry is already on the stack will throw CircularDependencyException instead of adding it. Its
message will name every entry in the chain in order, from the first appearance of the repeated entry to its
repetition, each by its class and by its name or qualifier class where it has
has one. Where GameServer needs Node,
Node needs Console and Console needs GameServer, from the first appearance of the repeated entry to its repetition, such as chain is , AGameServer, BNode and CConsolethen then
again.AGameServer
Only eager construction of the same resolution will be detected. Several things that look circular will not be:
- A class that depends on a named binding or
qualified binding of its own abstract is not
a circular dependency,circular, because the two resolutions have different entries. A decorator bound toCache,whosewhose constructor takes theCachebinding namedinner,resolveswill resolve normally. - A resolution already on the
stack,stack and requested again lazily, through its binding or throughLazy,returns a lazywill return a lazy proxy instead of throwing, because a resolution that returns a proxy adds no entry. When the proxy isfirstfirst used,, the resolutionrunswill run again from the alias step, and a shared resolution whose first constructionhashas finishedfindswill find its instance in the cache. If the first construction is still on the stack at that point,suchsuch as when the proxyisis used inside the constructor that requested it, that is a circular dependency, and itthrowswill throw. A class withnono properties that could trigger initialisation is given no proxy, so a lazy request foroneone that is already on the stack isaa circular dependency. - A ghost object is created without a resolution, and its constructor runs when it is
first accessed, so
Ghostbreakswill break a circular dependency without touching the stack. - A class resolved twice in sequence, such as the same class for two parameters of one constructor, is not
a circular dependency,circular, because the first resolution has left the stack before the second starts. - A resolution that throws
leaveswill leave the stack as it was before it started, so an unrelated resolution afterwards is not reported asa circular dependencycircular.
Errors
A circular dependency will throw CircularDependencyException, which will be final, extend RuntimeException and
implement ContainerException. It will be thrown when a resolution being constructed
eagerly is required again before it finishes, and will carry the chain of entries in order.
A resolution given both a name and a qualifier will throw InvalidResolutionException,
which will be final, extend InvalidArgumentException and implement ContainerException, as
InvalidInvocationException does for an invocation.
A lazy resolution whose proxy would be made for an interface, an abstract class or a class extending an internal PHP
class will throw NotInstantiableException, which RFC-0001 already throws for for
a class
class to be constructed that is not instantiable. A lazy proxy proxy whose resolution produces produces
an instance PHP does not accept for
for it will throw DependencyResolutionException when it is first used, which which
RFC-0001 already throws when a
a dependency cannot cannot
be resolved.
Out of scope
- Chained aliases. An alias pointing to another alias
iswill not be followed: the, because the alias stepandand the binding lookup each replace an alias once. Whether chains areflattenedflattened whenaa catalogue is built, or followed at runtime, belongs to building catalogues. - Memoising parameters and resolution plans,
ruled out bywhich ADR-0020 rules out.
Alternatives considered
The decisions this This design rests on are two decisions recorded separately, each with the alternatives each one it rejected::
ADR-0014, which memoises class-level
attributes as presence flags, and ADR-0020, which
memoises nothing about a resolution per parameter.
- memoising class-level attributes as presence flags, in ADR-0014
- not memoising resolution data per parameter, in ADR-0020
One cache holding every instance through Choosing strong or weak references.references with an enum or a flag We , passed when the cache is created. I rejected this this
because a weak reference is pointless
beside a strong one in static factories follow the same storecontainer's own convention, and a liminalsuch as Resolution::for() and a shared
resolution of one class are different cache identities: resolving a class without liminality should still cache it
normallyand
Invocation::callable().
Choosing strong or weak references with an enum or a flagReordering the existing branches. We Reading and writing would keep their own branches over the four caches,
reordered so that both check them in the same order. I rejected this because static factories follow the
container's own conventionit leaves two hand-maintained copies of
the same choice, such as Resolution::for() which liminal named and Invocation::callable()qualified instances would grow to six caches.
Reordering the existing branchesMatching qualified instances by qualifier value. Reading and writing A qualified instance would keep their own branches over be found by scanning the four cachesinstances of
its class and comparing qualifiers with equals(), reordered
so that both check them in as the same ordercontainer does now. We rejected I rejected
this because it leaves two handRFC-maintained copies of 0001 makes the same
choice, which liminal named qualifier's class the key and qualified instances would grow to six cachesignores any
value it carries.
Matching qualified instances by qualifier value. A qualified instance would be found by scanning return type that depends on how the instances of
cache holds its class and comparing qualifiersinstances. with equalsget(), as would declare a conditional return type
keyed on whether the container does nowcache is weak. We rejected
I rejected this because RFC-0001 makes the qualifier's class the key PHPStan accepts conditional return types only over
parameters and ignores any
value template types, and a call site cannot know which type of cache it carriesholds.
A return type that depends on how the cache holds its instancesReading class-level attributes from one class only. get() An attribute would declare a conditional return type
keyed on whether apply only when carried by the cache is weakrequested
class, or only when carried by the class being constructed. We I rejected this because PHPStan accepts conditional return types only over
parameters and template typesa
binding's concrete class is also an alias
of its abstract, and a call site cannot know which type so the requested class after normalisation is the abstract whichever of cache it holdsthe
two is requested. Reading the requested class alone would never find an attribute on the concrete class, and reading
only the class being constructed would never find one on an interface.
Reading class-level attributes from one class onlyA name taking precedence over a qualifier. An attribute A resolution given both would apply only when carried by the requested
class, or resolve as if only when carried by the class being constructed. We name were given.
I rejected this because a
binding's concrete class is also an alias
of its abstract, so the requested class after normalisation is the abstract whichever of the
two is requested. Reading it alone qualifier would never find an attribute on the concrete class, and reading only be dropped without the class being
constructed would never find one on an interfacecaller knowing.
A name taking precedence over Resolving eagerly when a qualifierproxy cannot be made. A lazy resolution given both whose proxy would resolve as if only the name were givenbe made for an interface, an
abstract class or a class extending an internal PHP class would construct its instance at once. We
I rejected this this
because the qualifier laziness would be dropped without the caller knowing, and a circular dependency relying on it would be
reported with nothing to say why.
Resolving eagerly Adding a stack entry when a proxy cannot be maderesolution starts. A lazy Every resolution whose proxy would be made for an interface, an
abstract class or a class extending an internal PHP class would construct add its entry before the cached instance at onceand
lazy proxy steps. We I rejected this
this because the laziness a lazy request for a resolution already on the
resolution stack would throw before its proxy could be dropped without the caller knowingreturned, and so laziness would
break a circular dependency relying on it would be
reported with nothing to say whyonly where no lazy request meets its own entry.
Adding a Identifying stack entry when a resolution startsentries by class alone. Every resolution would add its entry before the cached instance and
lazy proxy steps. We I rejected this because a lazy request for a resolution already class that depends on the
resolution stacka
named binding would throw before or qualified binding of its proxy could be returnedown
abstract, so laziness would
break such as a decorator, would be reported as a circular dependency only where no lazy request meets its own entrydependency.
Identifying Removing a stack entries by class aloneentry only when a resolution returns. We I rejected this because a class resolution that depends on a
named binding or qualified binding of throws would
leave its own
abstract, such as a decoratorentry behind, and an unrelated resolution afterwards would be reported as a circular dependency.
Removing a stack collected entry only when a resolution returnsread finds it. We get() would remove an entry whose instance has been collected.
I rejected this because a resolution read that throws would
leave its entry behind, finds one is followed by construction and an unrelated a put() under the same entry, which
replaces it, unless the resolution afterwards would be reported as returns a circular dependencylazy proxy that is never used, or throws. Removal on read would free an
entry only in those cases.
Removing a Sweeping collected entry when a read finds itentries. get() The cache would remove an every entry whose instance has been collected.
We , on each put()
or in a periodic pass. I rejected this because a read that finds one each entry it would free is followed by construction one empty weak reference, one for each
class, name and qualifier class combination given a put()liminal resolution. Those combinations grow only when names are
built at runtime, such as one per game server, for the life of the worker process that
ADR-0009 under keeps running across requests.
Such names grow the strong cache in the same entry, which
replaces itway, unless where each entry holds the resolution returns a lazy proxy that is never usedinstance itself, or throws. Removal on read so sweeping the weak
cache would free an
entry only in those casesnot address that growth.
Sweeping collected entries. The cache would remove every entry whose instance has been collected, on each put() or
in a periodic pass. We rejected this because each entry it would free is one empty weak reference, one for each class,
name and qualifier class combination given a liminal resolution. Those combinations grow only when names are built at
runtime, such as one per server, for the life of the worker process that
ADR-0009 keeps running across requests.
Such names grow the strong cache in the same way, where each entry holds the instance itself, so sweeping the weak cache
would not address that growth.
No other alternatives were weighed.
One cache holding every instance through weak references. Every shared instance would be held weakly, in a single store. I rejected this because a weak reference is pointless beside a strong one in the same store, and a liminal and a shared resolution of one class are different cache identities: resolving a class without liminality should still cache it normally.
Backwards compatibility
These will change for code that resolves through the container today:
- A circular dependency will throw
CircularDependencyExceptioninstead of exhausting the call stack. - A shared binding resolved through an alias more than once will return the same instance. Today each resolution through the alias constructs a new one, unless the binding holds an instance, and replaces the instance cached under the abstract.
- A resolution through an alias of a binding with no concrete class will construct the
binding's abstract. Today the container constructs the class as requested, so resolving an interface that aliases a
binding for its implementation throws
NotInstantiableException. - A resolution through an alias of an alias will construct and share the class the first alias points to. Today the binding lookup finds no binding, and the container constructs the class as requested.
- A shared resolution made liminal by its binding or by a class carrying
Liminalwill return the same instance while it is alive. Today each resolution that does not itself ask to be liminal constructs a new one, unless the binding holds an instance. - A liminal resolution with a name or qualifier will be cached under it, and a liminal
resolution without one will no longer return an instance built for a named binding
oror qualified binding. Today every liminal instance of a class is writtenunder theunder the class alone and read under the name or qualifier, so a named or qualified liminal resolution never findsitsits instance. - Qualified shared instances will be keyed by qualifier class, as RFC-0001
specifies, so two qualifiers of one class with different values will share one instance. Today they are matched with
Qualifier::equals()and get separate instances. The container will no longer callequals(). - A class with no binding will be shared, as RFC-0001 specifies. Today it is constructed again on every resolution.
- A binding marked lazy will return a lazy proxy, as
RFC-0001 specifies, or throw
NotInstantiableExceptionwhere the proxy would be made for an interface or an abstract class, such as for a factory binding of an interface. Today the container ignores the flag and resolves such a binding at once. LazyandLiminalwill apply when carried by the requested class or by the binding's concrete class,including forincluding for a binding with an instance or a factory. Today they are read only from the class the container constructs,and onlyand only when it constructs one. RFC-0001 applies them regardless ofanyany binding,, but the class of an instance a factory returns will not be consulted.NoResolutionwill apply when carried by either class of a resolution the container constructs, so an abstract carrying it and bound to a concrete class will throw. Today it is read only from the class the container constructs. RFC-0001 applies it only where the binding has no instance, factory or concrete class, so this changes its design as well as the code.- A lazy resolution to which
NoResolutionapplies, with no instance or factory, will throw when it is requested. Today it returns a lazy proxy, and throws when the proxy is first used. - A lazy proxy will be made for the binding's concrete class where it has one. Today it is made for the class as
requested, and a proxy for an interface or an abstract class throws PHP's own
Error, where it will throwNotInstantiableException. - A lazy resolution of a class with no properties that could trigger initialisation will be constructed straight away and cached, as RFC-0001 specifies. Today PHP returns an object whose constructor never runs, and it is not cached.
- A lazy proxy given an instance PHP does not accept for it, such as a factory's instance of a subclass, will throw
DependencyResolutionExceptionwhen it is first used. Today PHP throws its ownTypeError. - A resolution given both a name and a qualifier will throw
InvalidResolutionException. Today the name is usedand theand the qualifier is ignored.
Open questions
Changelog
- : Reworded in the readable house style, and the project's own vocabulary linked to the glossary. The design is unchanged.
- : Settled collected weak entries. They stay in the weak cache until the next
put()under the same entry replaces them, and removing them on read and sweeping them are recorded as rejected alternatives. - : Revised after review. A stack entry is added only once a resolution is past the cached instance and lazy
proxy steps, so a lazy request breaks a cycle, and
Lazyis applied before construction. Class-level attributes apply when carried by the requested class or the binding's concrete class. The alias step and the binding lookup each replace an alias once. A resolution given both a name and a qualifier throwsInvalidResolutionException. The alternatives the issues name are recorded, and Backwards compatibility lists what changes against the code. - : Revised after a second review. The lazy proxy step applies the binding's lazy flag, checks
NoResolutionfirst, makes the proxy for the binding's concrete class, throwsNotInstantiableExceptionwhere that class is an interface or abstract, and runs the resolution again from the alias step. A binding given an object has its class consulted for class-level attributes. Alternatives the issues name for the qualifier dimension and the stack's key are recorded, the sweeping rejection states its reason, and Backwards compatibility adds the changes the revision makes. - : Revised after a third review. A class with no properties that could trigger initialisation is resolved
straight away, as in RFC-0001, instead of being given a lazy proxy. A class extending an internal PHP class throws
NotInstantiableExceptionas interfaces and abstract classes do, and an instance PHP does not accept for a proxy throwsDependencyResolutionException. A circular dependency is no longer called a cycle, and its message names each entry's name or qualifier class. Backwards compatibility adds the changes to lazy bindings,NoResolution, chained aliases and property-less classes, and the Motivation covers aliases, qualifiers and lazy proxies.
Sources
- Issue #43, Engine - Container - Memoise class-level attribute lookups, : memoising class-level attributes, and making class-level liminality available when the cache is checked.
- Issue #44, Engine - Container - Alias cache key mismatch, , edited the same day to land after #45:
normalising aliases once before the cache is consulted, exposing alias normalisation on
BindingCatalogue, and leaving chained aliasesleftto building catalogues. - Issue #45, Engine - Container - Introduce InstanceCache, : the instance cache, its strong and weak
factories, its class and name dimensions, keeping the weak reference internal, two caches rather than weak
references throughout, static factories rather than an enum or a flag, the rejection of reordering the branches
andand of aconditionalconditional returntype rejectedtype, alias normalisation staying in the container, and collected weak entriesleftleft undecided.ItIt kept the qualifier dimension as a linear scan matching qualifiers withequals(), which thisdesigndesign does not adopt. - Issue #46, Engine - Container - Liminal information parity, : looking the binding up before the cache
check, and working out liminality once from the resolution, the binding and the class
attributeattribute, for both reading and writing. - Issue #47, Engine - Container - Circular dependency detection, : the resolution stack, removed however
the resolution finishes rather than only when it returns
,; detection observing only eager construction, which it proposed to achieve by adding entries on entry,;CircularDependencyExceptioncarrying the chain in order,being finalbeing final and extendingRuntimeException,;Lazyon both classes of a circular dependency andGhoston aparameter stillparameter still breaking it,; and sequential resolution of one class not counting as a circular dependency. It keyed thestackstack byclassclass alone, which this design does not adopt. - The instance cache keying qualified instances by qualifier class
,; resolution stack entries being identified the same way as instance cache entries, so that named and qualified child bindings of one abstract are not reportedas circularas circular dependencies,; and the chain running from the repeated entry's first appearance to its repetition:firstfirst writtendowndown on . - Collected weak entries being kept until the next
put()replaces them, with removal on read and sweeping rejected: first written down on . - Stack entries added only once a resolution is past the cached instance and lazy proxy steps, in place of #47's
addition on entry, with
Lazyapplied before construction and ghosts not touching the stack; class-level attributes applying when carried by the requested class or the binding's concrete class; the alias step and the binding lookup each replacing an alias once; a resolution with both a name and a qualifier throwingInvalidResolutionException; the proxy being made for the binding's concrete class,NotInstantiableExceptionwhen that class is an interface or abstract, the proxy's resolution running again from the alias step, andNoResolutionchecked before a proxy is returned; and the rejection of reading attributes from one class only, of a name taking precedence over a qualifier,, andresolvingof resolving eagerly when a proxy cannot be made, all rejected: first written down on . - A class extending an internal PHP class throwing
NotInstantiableException, an instance PHP does not accept for a proxy throwingDependencyResolutionException, and the circular dependency message naming each entry's name or qualifier class: first written down on . - The binding's lazy flag applying at the lazy proxy step, and a class with no properties that could trigger initialisation being resolved straight away, as RFC-0001 specifies: first written into these steps on .
Source rfc/0006-container-improvements.md · commit 9444a99 · published