PHPackages                             zeran/promise-watcher - 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. zeran/promise-watcher

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

zeran/promise-watcher
=====================

A PHP library for asynchronous, promise-based object evaluation

2.0(1y ago)01GPL-3.0-or-laterPHPPHP &gt;=8.3

Since Apr 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tsiura/promise-watcher)[ Packagist](https://packagist.org/packages/zeran/promise-watcher)[ RSS](/packages/zeran-promise-watcher/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (6)Versions (4)Used By (0)

promise-watcher
===============

[](#promise-watcher)

A PHP library for asynchronous, promise-based object watching.

### basic usage example

[](#basic-usage-example)

```
class EvalObjNum implements EvaluatedObjectInterface
{
    public function __construct(
        private readonly int $value,
    ) {
    }

    public function __toString(): string
    {
        return sprintf('%s', $this->value);
    }

    public function evaluate(mixed $object): bool
    {
        return (is_numeric($object) && $object == $this->value);
    }
}

$watcher = new ObjectWatcher(Loop::get());

$w1 = $watcher->createWatching(new EvalObjNum(10), 1);
$w1->start()
    ->then(function ($value) {
        echo sprintf('Evaluated successfully with value ' . $value) . PHP_EOL;
    }, function (\Throwable $e) { echo $e->getMessage() . PHP_EOL; });

$watcher->evaluate(11);

```

#### this example with print `Timed out watching 0:(10)`

[](#this-example-with-print-timed-out-watching-010)

#### in case we evaluate with number 10 output will be `Evaluated successfully with value 10`

[](#in-case-we-evaluate-with-number-10-output-will-be-evaluated-successfully-with-value-10)

### For evaluating more complex object may be used `webmozart/expression`

[](#for-evaluating-more-complex-object-may-be-used-webmozartexpression)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance43

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~362 days

Total

3

Last Release

459d ago

Major Versions

0.1 → 1.02024-06-18

1.0 → 2.02025-04-01

PHP version history (2 changes)0.1PHP ^8.2

1.0PHP &gt;=8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/864789?v=4)[zeran](/maintainers/zeran)[@zeran](https://github.com/zeran)

---

Top Contributors

[![tsiura](https://avatars.githubusercontent.com/u/1318413?v=4)](https://github.com/tsiura "tsiura (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/zeran-promise-watcher/health.svg)

```
[![Health](https://phpackages.com/badges/zeran-promise-watcher/health.svg)](https://phpackages.com/packages/zeran-promise-watcher)
```

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[symfony/lock

Creates and manages locks, a mechanism to provide exclusive access to a shared resource

514139.2M692](/packages/symfony-lock)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k53](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M208](/packages/illuminate-broadcasting)

PHPackages © 2026

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