nette/component-model
Nette Component Model is a lightweight PHP package for building component-based UI structures. It provides component containers, naming and lookup, lifecycle hooks, and signal handling—forming the foundation used by Nette for reusable, composable components.
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 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.support for PHP 8.5
Container::getComponentTree()Container::getComponents() parameters are silently deprecated, returns array when $deep is false (BC break)For the details you can have a look at the diff.
Container::getComponent() optimizationComponent::__construct() parameters $parent & $name are deprecatedFor the details you can have a look at the diff.
For the details you can have a look at the diff.
For the details you can have a look at the diff.
attached() is called only once for each object #2For the details you can have a look at the diff.
The first standalone release. For more information see readme.md.
How can I help you explore Laravel packages today?