NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #750 most downloaded on Packagist
💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP features.
Last release 1 months ago
27 Aug 2026
Ships fairly regularly
a new release about every 3 months
Rarely documented
notes for 11 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
72 releases · first in 2014
The container stops being a black box. This release adds a first-class introspection API, a PSR-11 bridge, and – finally – containers that actually re
The container stops being a black box. This release adds a first-class introspection API, a PSR-11 bridge, and – finally – containers that actually reload themselves in long-running processes instead of silently serving a stale build forever. A handful of quiet misconfigurations were also promoted to loud errors.
ContainerLoader now gives every build a fresh class name (Container_<key>_<hash>) and, on every load(), checks the compiled file's content rather than merely whether it has just been regenerated, so a rebuild done by another process over the same cache (a web request while your worker runs) is picked up as well. A process simply gets a new container instance whenever its configuration changed, with no restart. Without auto-rebuild nothing changes: production still compiles once and never looks back.Container::getServiceDescriptors() – a read-only snapshot of every registered service (name, type, autowiring, tags, aliases, and the instance if it exists), in definition order, without instantiating anything. Tools that until now read the container's private properties through Closure::bind() and scanned createService* methods by reflection can drop the tricks; the Tracy panel already has.Nette\Bridges\DIPsr\PsrContainer – wrap your container and hand it to any library that speaks PSR-11. get() resolves both service names and autowired types, with ambiguity reported rather than guessed.setup, so @self and self-typed arguments work there like anywhere else.addService() refuses a name already taken by a factory, matching the existing behavior for instances. The counterpart: removeService() now removes factories too, so a name freed by removeService() is genuinely free.One column per quarter.
A maintenance release laser-focused on type safety. Static analysis is now mandatory in CI, the codebase ships richer native and PHPDoc types, and the
A maintenance release laser-focused on type safety. Static analysis is now mandatory in CI, the codebase ships richer native and PHPDoc types, and the Tracy DI panel got a cleaner Latte rewrite. No behavioral changes – just a sturdier foundation for everything built on top.
Compiler, ContainerLoader, ServiceDefinition and friendsn:attributes for noticeably cleaner Latte syntax@param, @return and class descriptions across Compiler, Container, ContainerBuilder, Resolver, Helpers, definitions and extensions, giving IDEs and static analyzers far more to work withoptimized global function calls
implemented support for lazy services in PHP 8.4
fixed ReflectionParameter::getDefaultValue() error #315
ReflectionParameter::getDefaultValue() error #315Revert "LocatorDefinition: deprecated support for create($name) method (BC break)"
filterArguments() (BC break)Container::getServiceType() ignores dynamically added services (BC break)Container::getByType() fixed cooperation with dynamic factory #314normalizeEntity() fails due to service replacementPhpGenerator: DTO and DateTime are not suspicious objects #306 #308
%parameters% is deprecated (BC break)
changes
create($name) method (BC break)ParametersExtension: exports both statements and dynamic parameters, preloads only the latter
Resolver::autowireArgument() fixed handling of new-initializer with typehint #302NeonAdapter::removeUnderscoreVisitor() checks if key doesn't existParametersExtension, Container: redesigned way of exporting dynamic parameters via getParameter() #291
getParameter() #291Helpers::expand() allow concatenation of Statements #288<Type> syntax for autowiring a collection of services (#293)@self to setup immediatelyNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Resolver: added support for named variadics #289
initialize()Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →