Released version 3.1.4
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.
- Reentry protection for monitor callbacks –
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. - Reliable callback deduplication – switched the in-array check for monitor callbacks to loose comparison. Closures are never
===to each other unless they are literally the same instance, so the previous strict check silently let duplicates through. - Adopted
nette/phpstan-rules– stricter ruleset enabled, with a dedicatedtests/types/component-types.phpdriving type tests.