Update dependency nette/component-model to v4#96
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^3.0→^4.0Release Notes
nette/component-model (nette/component-model)
v4.0.1Compare Source
v4.0.0: Released version 4.0.0Compare Source
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 magicgetComponents()parameters, this is your cue to clean up – the payoff is a leaner, stricter, more reliable foundation.💥 Breaking Changes
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 overriddenattached($obj)/detached($obj)withmonitor($type, attached: ..., detached: ...). Callingmonitor()with no handler at all now throws anInvalidStateException– at least one ofattachedordetachedis required.Container::getComponents()parameters removed. The method now takes no arguments and returns a plainarrayof immediate children (previouslyiterable). The old recursive flag and filter-type argument are gone – passing them throws aDeprecatedException. For recursive traversal usegetComponentTree()instead. The internalRecursiveComponentIteratorhas been removed.IContainer::addComponent()signature tightened. Now declared asaddComponent(IComponent $component, ?string $name): static. Implementations and callers must match the new return type hint.Nette\SmartObjectdropped fromComponent. The component no longer pulls in theSmartObjecttrait, and the magic$name,$parent, and$componentsproperties are gone. Use the explicit methods (getName(),getParent(),getComponents()) directly.IComponent::NAME_SEPARATORremoved. UseIComponent::NameSeparatorinstead.PHP 8.3 required.
Configuration
📅 Schedule: (UTC)
* 0-3 * * 1)🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.