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 1mo ago

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 68% of packages

Maintenance46

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

412d 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://www.gravatar.com/avatar/1f2f8eceb33bed0c09d174955067087ad583f698a05e79b998224c4a35a8c58a?d=identicon)[zeran](/maintainers/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.4k187.2M2.6k](/packages/composer-composer)[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[civicrm/civicrm-core

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

728272.9k20](/packages/civicrm-civicrm-core)[j0k3r/php-readability

Automatic article extraction from HTML

186808.8k6](/packages/j0k3r-php-readability)[symfony/ai-platform

PHP library for interacting with AI platform provider.

51927.7k136](/packages/symfony-ai-platform)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)

PHPackages © 2026

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