nette/di
Nette DI is a fast, secure dependency injection container for PHP. It compiles configuration into optimized PHP for performance, supports autowiring, service factories, extensions, and strong type safety. Ideal for Nette apps or standalone use.
ReflectionParameter::getDefaultValue() error #315filterArguments() (BC break)Container::getServiceType() ignores dynamically added services (BC break)Container::getByType() fixed cooperation with dynamic factory #314normalizeEntity() fails due to service replacementCompiler::loadDefinitionsFromConfig() expands parameters (after 3399312)changes
create($name) method (BC break)Resolver::autowireArgument() fixed handling of new-initializer with typehint #302NeonAdapter::removeUnderscoreVisitor() checks if key doesn't existgetParameter() #291Helpers::expand() allow concatenation of Statements #288<Type> syntax for autowiring a collection of services (#293)[@self](https://github.com/self) to setup immediatelyinitialize()Resolver::autowireArguments() fixed support for variadicsContainer::getByType() compatibility with PHPStan (#285)Resolver::autowireArguments() fixed support for variadicsv3.0 maintenance has been ended, please update to v 3.1
Adapter::dump() interface methodChanges:
Deprecations:
[@return](https://github.com/return) are deprecatedResolver::resolveEntityType() ignores return types 'object' & 'mixed' #274Resolver::autowireArgument() uses named arguments to skip optional parameters in PHP 8Resolver::autowireArguments() improved support for variadicsautowireArguments()setCreator() & getCreator(), aliases for setFactory() & getFactory()Resolver::autowireArguments() throws an exception when combining a named and positional parameter" #265$params in definitionResolver::autowireArguments() throws an exception when combining a named and positional parameterFactoryDefinition::resolveType() checks for type compatibilityResolver::completeException() truncates but does not remove the class nameHelper::ensureClassType()Reflection::getReturnTypes() etccompatible with PHP 8.0
completeException() appends entity to exception message when type is not knownFor the details you can have a look at the diff.
bool(), int(), float(), string()Helpers::escape()For the details you can have a look at the diff.
findByType()getByName() as alias for getService()For the details you can have a look at the diff.
initialize() methodFor the details you can have a look at the diff.
autowireArguments() fixed counting optional argsautowireArguments() refactoring, added autowireArgument(), Resolver|Container replaced with callbackFor the details you can have a look at the diff.
expand() fixed expansion of dynamic parametersFor the details you can have a look at the diff.
How can I help you explore Laravel packages today?