PHPackages                             akondas/exspecto - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. akondas/exspecto

ActiveLibrary[Testing &amp; Quality](/categories/testing)

akondas/exspecto
================

Small PHP DSL for synchronizing asynchronous operations (busy-waiting)

1.2.0(1y ago)53.5k↓43.3%MITPHPPHP &gt;=8.2

Since Jan 27Pushed 1y ago1 watchersCompare

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

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

Exspecto
========

[](#exspecto)

[![Minimum PHP Version](https://camo.githubusercontent.com/ec21f169d70b69344c67d6f18fa1a24d20476d2f0cd680e8c4a1534c22f34e5f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e322d3838393242462e737667)](https://php.net/)

Small PHP DSL for synchronizing asynchronous operations (busy-waiting).

A simple and useful library recommended especially for testing asynchronous systems. Exspecto allows you to express expectations of an asynchronous system in a concise and easy to read manner. Example:

```
await()->atMost(1)->until(function() {
    return customerStatusIsUpdated();
});
```

You can use `pollInterval` to set how often the condition should be checked (default value is 100 milliseconds):

```
await()->atMost(3)->pollInterval(200)->until(function() {
    return customerStatusIsUpdated();
});
```

You can also await for given value in case the returning method (closure) could throw an exception:

```
$value = await()->atMost(3)->pollInterval(200)->on(fn() => getValue());
```

---

*exspecto* - from latin: *wait for*, *await*

Install
-------

[](#install)

```
composer require akondas/exspecto
```

Roadmap
-------

[](#roadmap)

- `untilAsserted` for example: `untilAsserted('UserRepository::size', equaltTo(3))`
- support different poll interval strategy (fixed, fibonacci, iterative)
- `ignoreExceptions` do not stop when exceptions occur (`ignoreException(string $exceptionClass)`)
- `atLeast`
- `unitlNotNull`, `untilNull` etc.

License
-------

[](#license)

Exspecto is released under the MIT Licence. See the bundled LICENSE file for details.

Author
------

[](#author)

Arkadiusz Kondas (@ArkadiuszKondas)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

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

Total

4

Last Release

540d ago

Major Versions

0.1.0 → 1.0.02021-08-23

PHP version history (3 changes)0.1.0PHP ^7.4

1.0.0PHP &gt;=7.4

1.2.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d00e1e73a4ff379162b943421469055929a95e7a6ce4c3808976dcc1fa28f4f?d=identicon)[akondas](/maintainers/akondas)

---

Top Contributors

[![akondas](https://avatars.githubusercontent.com/u/8239917?v=4)](https://github.com/akondas "akondas (11 commits)")

---

Tags

asynchronous-programmingbusy-waithacktoberfestphpquality-assurancetestingphpasynchronoustestingquality assurancebusy-waiting

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/akondas-exspecto/health.svg)

```
[![Health](https://phpackages.com/badges/akondas-exspecto/health.svg)](https://phpackages.com/packages/akondas-exspecto)
```

###  Alternatives

[php-vfs/php-vfs

Virtual file system implementation for use with PHP unit testing.

572.7M24](/packages/php-vfs-php-vfs)[zoon/puphpeteer

A Puppeteer bridge for PHP, supporting the entire API.

204192.9k1](/packages/zoon-puphpeteer)[marvinrabe/laravel-graphql-test

Provides you with a simple GraphQL testing trait.

58329.7k](/packages/marvinrabe-laravel-graphql-test)[quizlet/hammock

Hammock is a stand-alone mocking library for Hacklang.

27445.5k](/packages/quizlet-hammock)[doppiogancio/mocked-client

A simple way to mock a client

2174.9k3](/packages/doppiogancio-mocked-client)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

1783.0k34](/packages/robiningelbrecht-phpunit-coverage-tools)

PHPackages © 2026

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