Weave 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

Yii Event Laravel Package

yiisoft/yii-event

PSR-14 event dispatcher for Yii Framework. Register listeners in DI container config files, bind callables or service methods to events, and dispatch type-safe events through a lightweight, framework-integrated implementation.

Deep Wiki
Context7

Product Decisions This Supports

  • Framework-consistency decisions, not greenfield ones. This is Yii 3's event wiring layer (listener registration/configuration over a PSR-14 dispatcher), so it informs "do we standardize our extension points on the framework's native event bus?" — not "which event library should we buy." Despite the brief framing, this is a Yii package, not Laravel; for a Laravel shop it is effectively out of scope, and that mismatch should be the first thing a PM settles.
  • Build vs. buy for cross-cutting hooks. If you're on Yii 3, using this instead of hand-rolling a dispatcher/observer registry is a clear "buy" (adopt): a tiny, BSD-licensed, maintained dependency beats bespoke glue code you'd have to own and test.
  • Plugin/extension architecture. Supports the roadmap decision of exposing lifecycle hooks (before/after request, domain events, module bootstrapping) so internal teams or third parties can extend behavior without forking core.
  • Decoupling roadmap bets. Event-driven seams let you defer hard commitments: emit an event now, add consumers later. Good for staged rollouts, audit logging, notifications, and side-effect isolation without touching the emitting service.
  • Dependency-risk register entry. 17 stars and a single-maintainer-adjacent ecosystem profile means it belongs on the supply-chain watchlist, with a documented exit path (swap the dispatcher implementation) if the Yii 3 ecosystem stalls.
  • Use cases it enables: module/plugin registration, request-lifecycle middleware-style hooks, domain event fan-out to logging/audit/notifications, and configuration-driven listener wiring per environment.

When to Consider This Package

Consider it when all of the following hold:

  • Your application is Yii 3 (or migrating toward it). The value is in the framework integration — listener configuration, container-aware resolution — not in the dispatcher concept itself.
  • You want configuration-driven listener registration rather than scattering ->on() calls through bootstrap code.
  • You want a PSR-14-compatible seam so handlers remain portable and testable in isolation.
  • Your team is small enough that "follow the framework's idiom" beats "standardize on a stack we already know."
  • You accept a low-visibility dependency: pin the version, read the changelog on each release, and keep an abstraction boundary so you're not importing its concrete classes everywhere.

Look elsewhere when:

  • You're on Laravel (or Symfony, or a plain PSR-14 app). Laravel ships its own events; Symfony has symfony/event-dispatcher; framework-agnostic code should depend on psr/event-dispatcher directly rather than on a Yii adapter. Adopting this outside Yii adds a framework-shaped dependency for zero benefit.
  • You need throughput guarantees, async/queued delivery, or distributed fan-out. This is in-process dispatch; pair it with a queue or message bus instead of assuming it scales.
  • You require a large community, commercial support, or an SLA. 17 stars, BSD-3-Clause, single-ecosystem — that's a fine risk profile for glue code, a poor one for a load-bearing platform decision.
  • You need observability baked in (event tracing, metrics). You'll be building that yourself.

How to Pitch It (Stakeholders)

For executives (one line): A small, free, permissively licensed component that lets our Yii application's modules plug into each other through standard events instead of hard-coded dependencies — low cost, low lock-in, and deliberately small scope.

For engineering leadership:

  • Cost & risk: BSD-3-Clause, no vendor, no license review friction. The real risk is ecosystem maturity — low adoption means we should treat it as glue code we can replace, not a platform commitment.
  • Strategic value: it is the seam, not the feature. It buys us the option to add audit logging, notifications, or third-party extensions later without refactoring the services that emit events.
  • Reversibility: keep business logic behind a thin event-publishing interface of our own; if Yii 3's trajectory disappoints, we swap the adapter and keep every handler. This is a reversible decision, which is exactly the kind we should be making quickly.
  • Scope discipline: this does not replace a message bus. If the roadmap needs durable, cross-service, or high-volume event delivery, that's a separate (and larger) decision.

Recommendation: Adopt only if the platform is Yii 3 and we want extension points now; otherwise take a pass and revisit if we migrate. Treat as a tactical, reversible dependency — no architecture review required, but log it in the dependency register.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin