PHPackages                             nimp/observer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nimp/observer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nimp/observer
=============

minimal realization lets the text editor object notify other service objects about changes in its state

v1.0.4(9mo ago)052MITPHPPHP &gt;=8.3CI passing

Since Sep 28Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/nimp-dev/observer)[ Packagist](https://packagist.org/packages/nimp/observer)[ RSS](/packages/nimp-observer/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (6)Used By (2)

Nimp Observer
=============

[](#nimp-observer)

[![Tests](https://github.com/nimp-dev/observer/actions/workflows/tests.yml/badge.svg)](https://github.com/nimp-dev/observer/actions/workflows/tests.yml/badge.svg)[![PHPStan](https://github.com/nimp-dev/observer/actions/workflows/phpstan.yml/badge.svg)](https://github.com/nimp-dev/observer/actions/workflows/phpstan.yml/badge.svg)[![Code Coverage](https://camo.githubusercontent.com/c811453a952c3a33080e47ab40b0d7db67179d1fe35fd6b1322846361092bc63/68747470733a2f2f636f6465636f762e696f2f67682f6e696d702d6465762f6f627365727665722f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://camo.githubusercontent.com/c811453a952c3a33080e47ab40b0d7db67179d1fe35fd6b1322846361092bc63/68747470733a2f2f636f6465636f762e696f2f67682f6e696d702d6465762f6f627365727665722f6272616e63682f6d61696e2f67726170682f62616467652e737667)[![PHP Version](https://camo.githubusercontent.com/7535257ca228724c93658bd52583d4e47a9bab02c356abf6e54c1d575f2151e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c75652e737667)](https://camo.githubusercontent.com/7535257ca228724c93658bd52583d4e47a9bab02c356abf6e54c1d575f2151e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c75652e737667)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)

Minimalistic implementation of event dispatching according to PSR-14: EventDispatcher + ListenerProvider.

Installation
------------

[](#installation)

```
composer require nimp/observer
```

Quick start
-----------

[](#quick-start)

```
final class MyListener implements EventListenerInterface
{
    public function events(): iterable
    {
        yield StartedEvent::class => $this->onStarted(...);
        yield MyEvent::class => 'onMyEvent';
        yield MyStoppableEvent::class => function (MyStoppableEvent $e): void {
                // handle and stop propagation if needed
                $e->stop();
            };
    }

    public function onStarted(StartedEvent $event): void
    {
        // handle StartedEvent
    }

    public function onMyEvent(object $event): void
    {
        // handle MyEvent
    }
}

$provider = new ListenerProvider();
$provider->addListeners(new MyListener());

$dispatcher = new EventDispatcher($provider);
```

Tests
-----

[](#tests)

```
composer install && composer test
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance58

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

277d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/481697526984e04c33b7db73c63e8b5a3f0662b3d3b8855829783811b0e10415?d=identicon)[egorkonopka](/maintainers/egorkonopka)

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nimp-observer/health.svg)

```
[![Health](https://phpackages.com/badges/nimp-observer/health.svg)](https://phpackages.com/packages/nimp-observer)
```

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[symfony/event-dispatcher-contracts

Generic abstractions related to dispatching event

3.4k807.0M621](/packages/symfony-event-dispatcher-contracts)[symfony/mailer

Helps sending emails

1.6k409.1M1.4k](/packages/symfony-mailer)[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k8.8M118](/packages/deptrac-deptrac)[phpro/soap-client

A general purpose SoapClient library

8896.1M54](/packages/phpro-soap-client)[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.5k1.5M87](/packages/mcp-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
