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. nimp/observer

ActiveLibrary

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

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

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

Since Sep 28Pushed 7mo ago1 watchersCompare

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

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

34

—

LowBetter than 77% of packages

Maintenance63

Regular maintenance activity

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

231d 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.3k86.3M2.2k](/packages/symfony-symfony)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

3.0k404.0M702](/packages/league-commonmark)[symfony/mailer

Helps sending emails

1.6k368.1M955](/packages/symfony-mailer)[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[phpro/soap-client

A general purpose SoapClient library

8885.6M46](/packages/phpro-soap-client)

PHPackages © 2026

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