Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. PHP
  3. Evenement

Evenement

MITPHP

A simple event dispatching library for PHP with a Node.js EventEmitter-inspired API.

GitHubGitHub
1.3k stars74 forks0 contributors

What is Evenement?

Événement is a simple event dispatching library for PHP that implements the observer pattern through an event-driven API. It allows PHP components to emit and listen for events, enabling decoupled communication without direct dependencies. The library is designed to be minimal and intuitive, inspired by Node.js's EventEmitter.

Target Audience

PHP developers building applications that require decoupled component communication, such as those implementing event-driven architectures or needing lightweight event handling without full-fledged frameworks.

Value Proposition

Developers choose Événement for its simplicity and familiarity—it offers a clean, Node.js-inspired API while staying lightweight and focused, making it easy to integrate into existing projects without overhead.

Overview

Événement is a very simple event dispatching library for PHP.

Use Cases

Best For

  • Implementing event-driven communication in PHP applications
  • Adding simple event dispatching to legacy PHP codebases
  • Building decoupled components that need to notify each other
  • Creating plugins or extensions that react to application events
  • Learning event-driven patterns in PHP with a minimal library
  • Migrating Node.js EventEmitter patterns to PHP environments

Not Ideal For

  • Projects requiring event priorities, wildcard listeners, or complex event propagation patterns
  • Teams already using full-stack PHP frameworks like Laravel or Symfony that have integrated event systems
  • Applications needing asynchronous event handling or integration with message queues

Pros & Cons

Pros

Simple and Intuitive API

The library offers straightforward methods like `on()`, `emit()`, and `removeListener()`, mirroring Node.js's EventEmitter for ease of use, as demonstrated in the README examples.

Familiar for JS Developers

Inspired by Node.js EventEmitter, it allows developers with JavaScript experience to quickly adopt event-driven patterns in PHP without a steep learning curve, as highlighted in the README.

Lightweight and Minimal

Focuses on core event dispatching without unnecessary features, keeping the library small and easy to integrate, similar to Silex and Pimple as mentioned in the philosophy section.

Promotes Decoupled Architecture

Enables components to communicate via events without direct dependencies, leading to cleaner, more maintainable codebases, as emphasized in the decoupled design goal.

Cons

Limited Advanced Features

Lacks built-in support for event priorities, wildcard listeners, or event bubbling, which are common in more comprehensive event libraries like Symfony's EventDispatcher, making it unsuitable for complex scenarios.

Synchronous Event Emission

Events are emitted synchronously by default, which can block execution and may not be suitable for performance-sensitive applications requiring non-blocking or parallel processing.

Minimal Error Handling

The README does not demonstrate error handling mechanisms for events, leaving developers to implement their own solutions for robust error management in event listeners.

Frequently Asked Questions

Quick Stats

Stars1,349
Forks74
Contributors0
Open Issues2
Last commit4 months ago
CreatedSince 2011

Tags

#event-dispatching#lightweight#observer-pattern#php#composer-package#event-emitter

Built With

P
PHP

Included in

PHP32.5k
Auto-fetched 12 hours ago

Related Projects

SwooleSwoole

🚀 Coroutine-based concurrency library for PHP

Stars18,862
Forks3,150
Last commit4 days ago
WorkermanWorkerman

An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.

Stars11,539
Forks2,260
Last commit4 days ago
ReactPHPReactPHP

Event-driven, non-blocking I/O with PHP.

Stars9,084
Forks716
Last commit1 year ago
RatchetRatchet

Asynchronous WebSocket server

Stars6,423
Forks791
Last commit6 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub