Skip to content

Releases: semperton/container

4.0.0

Choose a tag to compare

@jrabausch jrabausch released this 25 Sep 23:21
  • PHP 8.2+ is required.
  • Autowiring is disabled by default. Call withAutowiring(true) to restore the previous behavior.
  • Factory params are no longer resolved by name. Replace static fn (string $mail) => ... with static fn (ContainerInterface $c) => ... $c->get('mail'), or pass the value to create().
  • Containers returned by withEntry(), withAutowiring() and withDelegate() no longer share resolved instances with the original container. Services are rebuilt with the new configuration.
  • get(Container::class) on such a container returns the new container, not the original one.
  • has() returns false for classes that cannot be instantiated (abstract classes, private constructors).
  • Exception classes are final.
  • NotInstantiableException implements NotFoundExceptionInterface.
  • A missing dependency inside a factory throws a DependencyException instead of letting the inner NotFoundException bubble up.
  • Variadic params are no longer autowired. Pass them explicitly as an array.

3.0.0

Choose a tag to compare

@jrabausch jrabausch released this 02 Jan 15:31
  • PHP >= 8.0 required
  • Removed callable factory support
  • Added support for delegate container
  • Restricted resolving of params by name to factory functions
  • Added withAutowiring, withDelegate and withEntry methods
  • create now supports substituting of factory params

2.3.0

Choose a tag to compare

@jrabausch jrabausch released this 09 Aug 13:29
  • Fixed missing params in factory resolving
  • create() no longer returns resolved entries

2.2.0

Choose a tag to compare

@jrabausch jrabausch released this 29 Jun 20:20
  • Container::create now also resolves factories
  • Container implements FactoryInterface

2.1.0

Choose a tag to compare

@jrabausch jrabausch released this 23 Jun 11:36
  • Using parameter names instead of index for create method

2.0.0

Choose a tag to compare

@jrabausch jrabausch released this 23 Jun 09:45
  • Callables are now allowed as factories
  • Added "create" method
  • Automatic built-in parameter resolution for definition factories and class constructors
  • Revert back using psr/container 1.0

1.1.1

Choose a tag to compare

@jrabausch jrabausch released this 11 Jun 14:35
  • Added function imports

1.1.0

Choose a tag to compare

@jrabausch jrabausch released this 22 Apr 20:57
  • Added autowire option

1.0.1

Choose a tag to compare

@jrabausch jrabausch released this 09 Mar 21:53
  • PSR-11 update

1.0.0

Choose a tag to compare

@jrabausch jrabausch released this 23 Jan 09:42
  • PSR-11 compatibility
  • Container is immutable