8000 Release 3.4.0 · capsulephp/di · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

3.4.0

Compare
Choose a tag to compare
@pmjones pmjones released this 01 Jan 21:54
· 8 commits to 3.x since this release
  • By default, child classes now inherit the constructor arguments of their
    parent class. This means you do not need to re-define the child class
    arguments if you want them to be the same as the parent. You can still
    override arguments in the child class definition. Does not apply to extended
    class construction calls, or to factory(), or to class() overrides. To
    disable or interrups argument inheritance, call $def->{Foo::CLASS}->inherit(null).

  • Container::has() now indicates if an $id will return anything at all from
    the Container, not merely if that specific $id definition exists. This is
    to support things like like an abstract or an interface having a class or
    factory associated with it.

  • Definition::new() now throws Exception\NotInstantatiated when an object cannot
    be instantiated, with a previous exceptions stack indicating the chain of
    causality.

  • Added methods ClassDefinintion::hasArgument(), getArgument(), and
    refArgument() for examining and modifying argument values.

  • Better handling of optional arguments on class definitions.

0