Releases: semperton/container
Releases · semperton/container
Release list
4.0.0
- 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) => ...withstatic fn (ContainerInterface $c) => ... $c->get('mail'), or pass the value tocreate(). - Containers returned by
withEntry(),withAutowiring()andwithDelegate()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()returnsfalsefor classes that cannot be instantiated (abstract classes, private constructors).- Exception classes are
final. NotInstantiableExceptionimplementsNotFoundExceptionInterface.- A missing dependency inside a factory throws a
DependencyExceptioninstead of letting the innerNotFoundExceptionbubble up. - Variadic params are no longer autowired. Pass them explicitly as an array.
3.0.0
- PHP >= 8.0 required
- Removed
callablefactory support - Added support for delegate container
- Restricted resolving of params by name to factory functions
- Added
withAutowiring,withDelegateandwithEntrymethods createnow supports substituting of factory params