PHPackages                             eiriksm/wait-for-listen - 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. eiriksm/wait-for-listen

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

eiriksm/wait-for-listen
=======================

Waits until a port is listening.

1.0.1(8y ago)0131.8k—1.6%2GPL-2.0+PHP

Since Jul 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/eiriksm/wait-for-listen)[ Packagist](https://packagist.org/packages/eiriksm/wait-for-listen)[ RSS](/packages/eiriksm-wait-for-listen/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (4)Used By (0)

wait-for-listen
===============

[](#wait-for-listen)

[![Packagist](https://camo.githubusercontent.com/7b8b6d8ecd30625264d9ca6fa370f7b0aafdb022881d53a6e15cc28d798171a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656972696b736d2f776169742d666f722d6c697374656e2e7376673f6d61784167653d33363030)](https://packagist.org/packages/eiriksm/wait-for-listen)[![Packagist](https://camo.githubusercontent.com/5bd91b21de678e0e1ed04bbfdc075e978880156c659f44c3c60c8ef676c1869a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656972696b736d2f776169742d666f722d6c697374656e2e7376673f6d61784167653d33363030)](https://packagist.org/packages/eiriksm/wait-for-listen)[![Coverage Status](https://camo.githubusercontent.com/b8b313e29caa0c485535e7cde164495dc7f9180b197eb3925da669a3fa08a47d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f656972696b736d2f776169742d666f722d6c697374656e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/eiriksm/wait-for-listen?branch=master)[![Test](https://github.com/eiriksm/wait-for-listen/actions/workflows/test.yml/badge.svg)](https://github.com/eiriksm/wait-for-listen/actions/workflows/test.yml)[![Violinist enabled](https://camo.githubusercontent.com/d9732258721280d90f7f95b5f928ea5c63eb6d3d740151d62e4a9ad1660d95d3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76696f6c696e6973742d656e61626c65642d627269676874677265656e2e737667)](https://violinist.io)

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

[](#installation)

```
composer require eiriksm/wait-for-listen

```

...or probably you want this as a dev requirement:

```
composer require eiriksm/wait-for-listen --dev

```

Usage
-----

[](#usage)

This package is useful to use in CI setups before your tests assume a service has started.

So instead of this:

```
- ./some-slow-starting-task-that-exposes-port 8000 &
- sleep 5
- composer test

```

You can now use this:

```
- ./some-slow-starting-task-that-exposes-port 8000 &
- ./vendor/bin/wait-for-listen 8000

```

Configuration
-------------

[](#configuration)

`wait-for-listen` has 3 options. Port, host and timeout.

They are specified like this:

```
./vendor/bin/wait-for-listen  [host] [timeout]

```

### Port (required)

[](#port-required)

Specify a port to wait for.

### Host (optional)

[](#host-optional)

Specify an optional host. The default is `127.0.0.1`.

### Timeout (optional)

[](#timeout-optional)

Specify a timeout. The default is 10.

### Licence

[](#licence)

WTFPL.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

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

Total

2

Last Release

3224d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/012259317b9e5a3b6cc2b03681d852940e11ac05f37bfbda7360d6524b1c9085?d=identicon)[eiriksm](/maintainers/eiriksm)

---

Top Contributors

[![eiriksm](https://avatars.githubusercontent.com/u/865153?v=4)](https://github.com/eiriksm "eiriksm (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eiriksm-wait-for-listen/health.svg)

```
[![Health](https://phpackages.com/badges/eiriksm-wait-for-listen/health.svg)](https://phpackages.com/packages/eiriksm-wait-for-listen)
```

###  Alternatives

[yireo/magento2-disablelog2

Magento 2 module to disable customer logging

31370.7k](/packages/yireo-magento2-disablelog2)

PHPackages © 2026

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