PHPackages                             bestit/commercetools-async-pool - 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. bestit/commercetools-async-pool

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

bestit/commercetools-async-pool
===============================

Batch-Processing of a pool asynchronous commercetools requests.

3.1.0(8y ago)227.0k2MITPHPPHP ^7.0

Since Dec 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/bestit/commercetools-async-pool)[ Packagist](https://packagist.org/packages/bestit/commercetools-async-pool)[ RSS](/packages/bestit-commercetools-async-pool/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (16)Used By (0)

commercetools-async-pool
========================

[](#commercetools-async-pool)

Batch-Processing of a pool asynchronous commercetools requests.

Introdction
-----------

[](#introdction)

Commercetools suggests that you use [asynchronous requests instead of sequential ones](https://dev.commercetools.com/best-practices-performance.html#api-request-planning) but the [PHP SDK](https://github.com/commercetools/commercetools-php-sdk) makes it not very easy:

1. Promises for Client::executeAsync works on the raw guzzle response, not the "requested object".
2. [Guzzle promise-chaining/forwarding](https://github.com/guzzle/promises#promise-forwarding) and the AbstractApiResponse from commercetools are not compatible.

So i created a helping pool of async requests. Please review the following information.

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

[](#installation)

```
composer require bestit/commercetools-async-pool

```

API and Usage
-------------

[](#api-and-usage)

```
$pool = new Pool($this->getClient());

$pool->addPromise(ProductTypeByIdGetRequest::ofId('example')).then(
    // Success
    function(ProductType $productType) use ($userdata) {
        echo $productType->getId();
    },
    // optional error callback
    function(ErrorResponse $error) {
        echo $error->getStatusCode();
    }
);
//.then(/* chained callbacks */)
//.then()
// ....

// Gets flushed automatically, if we overflow the tick rate from the constructor.
$pool->flush();
```

**But beware, do not forget that the callbacks are happening asynchronous! That is no sequential PHP anymore!**

Future
------

[](#future)

- More Unittests

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

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

Recently: every ~37 days

Total

15

Last Release

3184d ago

Major Versions

0.3.0 → 1.0.02017-01-25

1.0.4 → 2.0.02017-03-23

2.0.1 → 3.0.02017-05-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/66b163ea4a6e36824a598692bb26389d545c39d2af3830f9cbaf6b3b196e04af?d=identicon)[WBLKonzept](/maintainers/WBLKonzept)

![](https://www.gravatar.com/avatar/acc5af332f2a79dedb5aea83c3b4c2665d99fd2c14743fd0c2a3d70ecf0b7859?d=identicon)[best-it](/maintainers/best-it)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/bestit-commercetools-async-pool/health.svg)

```
[![Health](https://phpackages.com/badges/bestit-commercetools-async-pool/health.svg)](https://phpackages.com/packages/bestit-commercetools-async-pool)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[amphp/parser

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2238.8M170](/packages/react-async)

PHPackages © 2026

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