PHPackages                             amphp/websocket - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. amphp/websocket

ActiveLibrary[HTTP &amp; Networking](/categories/http)

amphp/websocket
===============

Shared code for websocket servers and clients.

v2.0.4(1y ago)464.4M↑13.3%610MITPHPPHP &gt;=8.1CI failing

Since Nov 16Pushed 3w ago9 watchersCompare

[ Source](https://github.com/amphp/websocket)[ Packagist](https://packagist.org/packages/amphp/websocket)[ Docs](https://github.com/amphp/websocket)[ GitHub Sponsors](https://github.com/amphp)[ RSS](/packages/amphp-websocket/feed)WikiDiscussions 2.x Synced 1w ago

READMEChangelog (10)Dependencies (10)Versions (24)Used By (10)

amphp/websocket
===============

[](#amphpwebsocket)

AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind. `amphp/websocket` contains basic websocket components shared by our [Websocket Server](https://github.com/amphp/websocket-server) and [Websocket Client](https://github.com/amphp/websocket-client) packages.

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

[](#installation)

This package can be installed as a [Composer](https://getcomposer.org/) dependency.

```
composer require amphp/websocket

```

Requirements
------------

[](#requirements)

- PHP 8.1+

Versioning
----------

[](#versioning)

`amphp/websocket` follows the [semver](http://semver.org/) semantic versioning specification like all other `amphp` packages.

Security
--------

[](#security)

If you discover any security related issues, please use the private security issue reporter instead of using the public issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information.

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance69

Regular maintenance activity

Popularity57

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 88.3% 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 ~165 days

Recently: every ~244 days

Total

22

Last Release

23d ago

Major Versions

v0.2.3 → v1.0.0-rc12019-08-06

v1.0.3 → v2.0.0-beta.12022-05-30

PHP version history (4 changes)v0.1.0PHP &gt;=5.5

v0.2.0PHP &gt;=7

v1.0.0-rc1PHP &gt;=7.1

v2.0.0-beta.1PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1628287?v=4)[Aaron Piotrowski](/maintainers/Trowski)[@trowski](https://github.com/trowski)

![](https://www.gravatar.com/avatar/12852217f3369e8144bc9ce6ac2a2341c28c5512c5b3df5749bfbbd45b6877ff?d=identicon)[kelunik](/maintainers/kelunik)

![](https://www.gravatar.com/avatar/f6db63ad594446f67d79532b75c69439fd0df779cc90868b43c187c02a4221ef?d=identicon)[bwoebi](/maintainers/bwoebi)

---

Top Contributors

[![trowski](https://avatars.githubusercontent.com/u/1628287?v=4)](https://github.com/trowski "trowski (188 commits)")[![kelunik](https://avatars.githubusercontent.com/u/2743004?v=4)](https://github.com/kelunik "kelunik (15 commits)")[![bwoebi](https://avatars.githubusercontent.com/u/3154871?v=4)](https://github.com/bwoebi "bwoebi (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![dfelton](https://avatars.githubusercontent.com/u/2659558?v=4)](https://github.com/dfelton "dfelton (2 commits)")[![iggyvolz](https://avatars.githubusercontent.com/u/2197376?v=4)](https://github.com/iggyvolz "iggyvolz (2 commits)")

---

Tags

amphpasyncphprfc-6455rfc-7692websockethttpasyncnon-blockingwebsocketampamphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/amphp-websocket/health.svg)

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

###  Alternatives

[amphp/http-server

A non-blocking HTTP application server for PHP based on Amp.

1.3k5.9M101](/packages/amphp-http-server)[amphp/http-client

An advanced async HTTP client library for PHP, enabling efficient, non-blocking, and concurrent requests and responses.

7318.5M183](/packages/amphp-http-client)[amphp/websocket-client

Async WebSocket client for PHP based on Amp.

1624.3M53](/packages/amphp-websocket-client)[amphp/redis

Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.

164685.0k55](/packages/amphp-redis)[amphp/parallel

Parallel processing component for Amp.

85049.9M89](/packages/amphp-parallel)[amphp/byte-stream

A stream abstraction to make working with non-blocking I/O simple.

393122.3M128](/packages/amphp-byte-stream)

PHPackages © 2026

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