PHPackages                             zeran/promise-queue - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. zeran/promise-queue

ActiveLibrary[Queues &amp; Workers](/categories/queues)

zeran/promise-queue
===================

A PHP library for asynchronous, promise-based queues with execution concurrency limit

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

Since Apr 6Pushed 1y ago1 watchersCompare

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

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

promise-queue
=============

[](#promise-queue)

A PHP library for asynchronous, promise-based queues with execution concurrency limit.

basic usage example
-------------------

[](#basic-usage-example)

```
$q = new Queue();

$d1 = new Deferred();
$q->execute(function (int $jobId) use ($d1) {
    echo 'Run first' . PHP_EOL;
    return $d1->promise();
})->then(function ($value) {
    echo 'Resolve first: ' . $value . PHP_EOL;
});

$d2 = new Deferred();
$q->execute(function (int $jobId) use ($d2) {
    echo 'Run second' . PHP_EOL;
    return $d2->promise();
})->then(function ($value) {
    echo 'Resolve second: ' . $value . PHP_EOL;
});

$d3 = new Deferred();
$q->execute(function (int $jobId) use ($d3) {
    echo 'Run third' . PHP_EOL;
    return $d3->promise();
})->then(function ($value) {
    echo 'Resolve third: ' . $value . PHP_EOL;
});

$d1->resolve('value1');
$d2->resolve('value2');
$d3->resolve('value3');

```

### output

[](#output)

```
Run first
Resolve first: value1
Run second
Resolve second: value2
Run third
Resolve third: value3

```

### output will be the same even if we change sequence of resolving

[](#output-will-be-the-same-even-if-we-change-sequence-of-resolving)

```
$d1->resolve('value1');
$d3->resolve('value3');
$d2->resolve('value2');

```

### also you may return not promise from callable

[](#also-you-may-return-not-promise-from-callable)

```
$q->execute(function (int $jobId) use ($d2) {
    echo 'Runing job' . $jobId . PHP_EOL;
    return 1000;
})->then(function ($value) {
    echo 'Resolve job value: ' . $value . PHP_EOL;
});

```

### output will be

[](#output-will-be)

```
Runing job 1
Resolve job value: 1000

```

###  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 ~363 days

Total

3

Last Release

412d ago

Major Versions

1.1 → 2.02025-04-01

PHP version history (2 changes)1.0PHP ^8.1

1.1PHP &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 (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[symfony/messenger

Helps applications send and receive messages to/from other applications or via message queues

1.1k120.7M958](/packages/symfony-messenger)[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[symfony/amazon-sqs-messenger

Symfony Amazon SQS extension Messenger Bridge

4612.5M15](/packages/symfony-amazon-sqs-messenger)[toin0u/geotools

Geo-related tools PHP 7.3+ library

1.4k1.3k](/packages/toin0u-geotools)[clue/docker-react

Async, event-driven access to the Docker Engine API, built on top of ReactPHP.

113154.9k1](/packages/clue-docker-react)[pmg/queue

A task queue framework for PHP

13460.6k8](/packages/pmg-queue)

PHPackages © 2026

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