NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #1411 most downloaded on Packagist
⚛ Nette Component Model
Last release 3 months ago
21 Jun 2026
Ships fairly regularly
a new release about every 11 months
Some releases are documented
notes for 7 of 21 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
22 releases · first in 2014
Nothing published for this version
If you've been carrying around deprecated attached() / detached() hooks or the magic getComponents() parameters, this is your cue to clean up – the pa…
A focused, modern major release. The component model drops legacy baggage, demands PHP 8.3+, and ships a smarter monitoring system that finally behaves predictably when listeners reshape the tree. If you've been carrying around deprecated attached()/detached() hooks or the magic getComponents() parameters, this is your cue to clean up – the payoff is a leaner, stricter, more reliable foundation.
Monitoring handlers now fire top-down (ancestor → descendant). When a subtree is attached, monitor() listeners are invoked from the outermost ancestor inward, matching the natural order of tree construction. The new implementation is robust against listeners that mutate the tree mid-flight: it re-checks validity before descending into children, deduplicates so the same listener never runs twice, and guards against reentry to prevent infinite loops. If your code relied on the old ordering, review listeners that depend on sibling or parent state.
attached() / detached() methods removed. These long-deprecated lifecycle hooks are gone. Migrate to explicit callbacks: replace overridden attached($obj) / detached($obj) with monitor($type, attached: ..., detached: ...). Calling monitor() with no handler at all now throws an InvalidStateException – at least one of attached or detached is required.
Container::getComponents() parameters removed. The method now takes no arguments and returns a plain array of immediate children (previously iterable). The old recursive flag and filter-type argument are gone – passing them throws a DeprecatedException. For recursive traversal use getComponentTree() instead. The internal RecursiveComponentIterator has been removed.
IContainer::addComponent() signature tightened. Now declared as addComponent(IComponent $component, ?string $name): static. Implementations and callers must match the new return type hint.
Nette\SmartObject dropped from Component. The component no longer pulls in the SmartObject trait, and the magic $name, $parent, and $components properties are gone. Use the explicit methods (getName(), getParent(), getComponents()) directly.
IComponent::NAME_SEPARATOR removed. Use IComponent::NameSeparator instead.
PHP 8.3 required.
One column per quarter.
Component: attached handles are called top-down (ancestor → descendan…
Component: attached handles are called top-down (ancestor → descendan…
A transitional release ahead of 4.0. Nothing is removed yet, this version just lights up deprecation notices on things that will disappear in 4.0, so…
A transitional release ahead of 4.0. Nothing is removed yet, this version just lights up deprecation notices on things that will disappear in 4.0, so you can get your code ready in peace.
Component::$name, Component::$parent and Container::$components – use getName(), getParent(), getComponents() instead.monitor($type) without callbacks – pass them directly: monitor($type, $attached, $detached). Overriding attached() / detached() in subclasses is on its way out.IComponent::NAME_SEPARATOR – switch to IComponent::NameSeparator (the deprecation is now reported via the native #[\Deprecated] attribute).A focused maintenance release for the Component layer. The headline is hardening of the monitor callback machinery: nested re-entry is now safely guar
A focused maintenance release for the Component layer. The headline is hardening of the monitor callback machinery: nested re-entry is now safely guarded, callbacks are normalized to \Closure for consistent deduplication, and the whole codebase has been brought under mandatory static analysis with nette/phpstan-rules.
Component::refreshMonitors() now refuses to re-enter itself while listeners are running. If a listener removes and re-adds the same component (or otherwise triggers another refresh), each component is processed exactly once instead of looping or double-firing.=== to each other unless they are literally the same instance, so the previous strict check silently let duplicates through.nette/phpstan-rules – stricter ruleset enabled, with a dedicated tests/types/component-types.php driving type tests.Nothing published for this version
optimized global function calls
support for PHP 8.4 improved phpDoc
Container::getComponents() parameters are silently deprecated, returns array when $deep is false (BC break)
Container::getComponentTree()Container::getComponents() parameters are silently deprecated, returns array when $deep is false (BC break)composer: allows nette/utils 4.0
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 →