Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Component Model Laravel Package

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.

View on GitHub
Deep Wiki
Context7
v3.2.0

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.

💥 Deprecated (will be removed in 4.0)

  • Magic properties Component::$name, Component::$parent and Container::$components – use getName(), getParent(), getComponents() instead.
  • Calling monitor($type) without callbacks – pass them directly: monitor($type, $attached, $detached). Overriding attached() / detached() in subclasses is on its way out.
  • Constant IComponent::NAME_SEPARATOR – switch to IComponent::NameSeparator (the deprecation is now reported via the native #[\Deprecated] attribute).
v3.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 callbacksComponent::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 dedicated tests/types/component-types.php driving type tests.
v3.1.3

support for PHP 8.5

v3.1.2
  • support for PHP 8.5
  • optimized global function calls
v3.1.1
  • support for PHP 8.4
  • improved phpDoc
v3.1.0
  • requires PHP 8.1
  • uses PHP 8.1 features
  • added Container::getComponentTree()
  • Container::getComponents() parameters are silently deprecated, returns array when $deep is false (BC break)
v3.0.3
  • composer: allows nette/utils 4.0
  • constants are PascalCase
v3.0.2
  • support for PHP 8.1
v3.0.1
  • Container: component name may be number or null
  • Container: added const NAME_REGEXP
  • added .phpstorm.meta.php
  • fixed bugs reported by PHPStan

For the details you can have a look at the diff.

v3.0.0

Features

  • requires PHP 7.1
  • uses declare(strict_types=1)
  • uses PHP 7.1 scalar and return type hints
  • Component::monitor accepts callbacks
  • added trait ArrayAccess
  • Component: More informative message in case that name is not available (#5)

Changes

  • Component::__construct($parent) is deprecated (BC break)
  • Container::getComponents(): removed child-first option (BC break)
  • Component: removed constructor (BC break)
  • Container: name must be string, int is allowed via ArrayAccess (BC break)
  • Component: attached() and detached() marked as deprecated in favor of monitoring callbacks
v2.4.0
  • Component::monitor() accepts callbacks
  • Component: attached() and detached() marked as deprecated in favor of monitoring callbacks
  • added trait ArrayAccess
  • Component::__construct($parent, $name) is deprecated (BC break)
v2.3.1
  • supports PHP up to 7.2
  • coding style: fixes, lowercase true/false/null
  • @return self -> static
  • composer: accepts nette 3.0
  • renamed parameter $need -> $throw

For the details you can have a look at the diff.

v2.2.5
  • @return self -> static
  • Container::getComponent() optimization

For the details you can have a look at the diff.

v2.3.0
  • requires PHP 5.6
  • uses Nette\SmartObject
  • Container::getComponent() optimization
  • Component::__construct() parameters $parent & $name are deprecated

For the details you can have a look at the diff.

v2.2.4
  • Container: shows suggestions for missing components

For the details you can have a look at the diff.

v2.2.3
  • travis: migrating to container-based infrastructure
  • improved coding style

For the details you can have a look at the diff.

v2.2.2
  • Component: attached() is called only once for each object #2

For the details you can have a look at the diff.

v2.2.1
  • Container::getComponent() uses better exception message when component has parent #1
v2.2.0

The first standalone release. For more information see readme.md.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope