Migrating to Version 4.0
Version 4.0 is still under development and this page is a work in progress.
The minimum required PHP version is 8.3.
Nette Component Model
Most changes affect only authors of custom components; ordinary application code is unaffected. See the release blog post for the full story.
- The
getComponents()method no longer accepts the$deepand$filterTypeparameters and always returns an array of the direct children. For the whole subtree usegetComponentTree(), optionally combined witharray_filter()for type filtering. - Attach notifications are now delivered top-down: a parent's
$attachedcallback runs before its children's, which lets the parent prepare its state or even remove a child before it is processed. The detachment order is unchanged (children first). - The overridable
attached()anddetached()methods were removed; register callbacks viamonitor($type, $attached, $detached)instead. - The
Componentclass no longer uses theNette\SmartObjecttrait, so magic property access is gone from the base class (ControlandBaseControladd the trait themselves). - The
NAME_SEPARATORconstant was renamed toNameSeparator.