NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1319 most downloaded on Packagist
WebSocket client and server
Latest stable
4.1.0
Last release 28 days ago
25 Oct 2026
Ships fairly regularly
a new release about every 6 weeks
Nearly every release is documented
notes for 58 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
67 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Max received frame and message size
Full Changelog: 4.0.0...4.1.0
Full Changelog: https://github.com/sirn-se/websocket-php/compare/4.0.0...4.1.0
v4.0PHP version
^8.2
Your coding agent can read these notes before it upgrades. Set up the MCP server →
V4 deprecates some deeper level code interfaces. Most likely conflict with v3 concerns configuration of Client and Server.
V4 deprecates some deeper level code interfaces.
Most likely conflict with v3 concerns configuration of Client and Server.
See v3→v4 migration
Full Changelog: 3.8.1...4.0.0
V4 deprecates some deeper level code interfaces. Most likely conflict with v3 concerns configuration of Client and Server.
See v3→v4 migration
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.8.1...4.0.0
v3.8PHP version
^8.1
Fix typos, remove redundant runner detach by @srebb in #160
Full Changelog: 3.8.0...3.8.1
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.8.0...3.8.1
Configurable opcode/class mapping using OpcodeRegistry
Features and fixes
onMessage() listener, triggered on all messagesonDisconnect on remote connection closeint<0, 4999>|nullFull Changelog: 3.7.3...3.8.0
Features and fixes
onMessage() listener, triggered on all messagesonDisconnect on remote connection closeint<0, 4999>|nullFull Changelog: https://github.com/sirn-se/websocket-php/compare/3.7.3...3.8.0
v3.7PHP version
^8.1
Use safe stream read in FrameHandler (avoid potential byte read sync issue)
Full Changelog: 3.7.2...3.7.3
Detach connection on failed handshake
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.7.1...3.7.2
Fix spelling of 'implements' in class definitions by @carvefx in #151
Full Changelog: 3.7.0...3.7.1
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.7.0...3.7.1
Configuration class for various settings
Full Changelog: 3.6.2...3.7.0
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.6.2...3.7.0
v3.6PHP version
^8.1
Fuzzy header parsing deflate compression
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.6.1...3.6.2
Full Changelog: 3.6.1...3.6.2
Repo setup, PHP 8.5 default, 8.6 unit test
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.6.0...3.6.1
Full Changelog: 3.6.0...3.6.1
Deprecations by @sirn-se in https://github.com/sirn-se/websocket-php/pull/128
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.5.0...3.6.0
Full Changelog: 3.5.0...3.6.0
v3.5PHP version
^8.1
Timeouts support float (@sirn-se)
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.4.0...3.5.0
Full Changelog: 3.4.0...3.5.0
phpstan level 8, and fixes accordingly (@sirn-se)v3.4PHP version
^8.1
Compression Extension as optional middleware (@sirn-se)
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.3.0...3.4.0
v3.3PHP version
^8.1
Using Phrity/Net/Context for context management in Client, Server and Connection
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.3...3.3.0
Phrity/Net/Context for context management in Client, Server and Connection (@sirn-se)v3.2PHP version
^8.1
reverse args in str_contains by @carvefx in https://github.com/sirn-se/websocket-php/pull/109
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.5...3.2.6
Allow additional content in Connection header during handshake by @sirn-se in https://github.com/sirn-se/websocket-php/pull/108
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.4...3.2.5
The onError() listener should not dispatch unresolvable errors
The onError() listener should not dispatch unresolvable errors
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.3...3.2.4
Fix connection error when the reason is empty by @Sebastix in https://github.com/sirn-se/websocket-php/pull/100
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.2...3.2.3
Adding phpstan for static analysis by @sirn-se in https://github.com/sirn-se/websocket-php/pull/90
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.1...3.2.2
Php 8.5 acceptance tests by @sirn-se in https://github.com/sirn-se/websocket-php/pull/86
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.0...3.2.1
Deprecation warnings (@sirn-se)
setContext() method (@sirn-se)phrity/net-stream v2.1 for context support and select warning handling (@sirn-se)Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.1.0...3.2.0
setContext() method (@sirn-se)phrity/net-stream v2.1 for context support and select warning handling (@sirn-se)v3.1PHP version
^8.1
Server connections by @sirn-se in https://github.com/sirn-se/websocket-php/pull/64
Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.0.0...3.1.0
getConnections(), getReadableConnections(), getWritableConnections() (@sirn-se)onHandshake(...) listener (will deprecate onConnect(...)) (@sirn-se)setMaxConnections(int|null) (@sirn-se)shutdown() orderly close server (@sirn-se)phrity/net-uri v2.1 for URI decoding (@sirn-se)v3.0PHP version
^8.1
Client receive() never return null
Version 3.0.0
psr/log v3receive() never return nullFull Changelog: https://github.com/sirn-se/websocket-php/compare/2.2.3...3.0.0
psr/log v3 (@sirn-se)receive() never return null (@sirn-se)v2.2PHP version
^8.0
URL-decoded user-info in headers
Version 2.2.3
Fix so redirect to https uses ssl (ended up with tcp before)
Version 2.2.2
https uses ssl (ended up with tcp before)Minor fixes on FollowRedirect middleware
Version 2.2.1
FollowRedirect middlewareOptional FollowRedirect middleware (Client only)
Version 2.2.0
FollowRedirect middleware (Client only)SubprotocolNegotiation middlewaregetMeta() exposed on ClientHandshakeException if HTTP middleware return invalid statusReconnectException to force Client reconnectionServer->isSsl() methodphrity/net v2FollowRedirect middleware (Client only) (@sirn-se)SubprotocolNegotiation middleware (@sirn-se)getMeta() exposed on Client (@sirn-se)HandshakeException if HTTP middleware return invalid status (@sirn-se)ReconnectException to force Client reconnection (@sirn-se)Server->isSsl() method (@sirn-se)phrity/net v2 (@sirn-se)v2.1PHP version
^8.0
Allow additional content in Connection header during handshake
Version 2.1.3
Allow repeated headers when pulling HTTP messages
Version 2.1.2
Fix issue with falsy but valid HTTP headers
Version 2.1.1
PingInterval middleware for heartbeat functionality
Version 2.1.0
v2.0PHP version
^8.0
Patch 2.0.1 - Fix dependency version
Patch 2.0.1
Version 2.0 introduces significant and breaking changes.
Version 2.0.0
Version 2.0 introduces significant and breaking changes.
receive() always return Message instance or null (@sirn-se)send() require Message instance as first argument (@sirn-se)Close get close-status methods (@sirn-se)7.4 support (@sirn-se)v1.7PHP version
^7.4|^8.0
Fix dependency psr/http-message
Version 1.7.3
psr/http-messageRestoring psr/log v3 and psr/http-message v2, fixing HTTP classes to be compliant.
Version 1.7.2
psr/log v3 and psr/http-message v2, fixing HTTP classes to be compliant.psr/log v3 psr/http-message v2 (@sirn-se)Version 1.7.1 - Define return on receive() - Fix some dependencies
Version 1.7.1
receive()Version 1.7.0 This will be the last version in v1.x scope, expect lots of deprecations in upcoming v2.0.
Version 1.7.0
This will be the last version in v1.x scope, expect lots of deprecations in upcoming v2.0.
getHandshakeResponse()getHandshakeRequest()connect() methods are now publicgetHandshakeResponse() method (@sirn-se)getHandshakeRequest() method (@sirn-se)connect() methods are now public (@sirn-se)v1.6PHP version
^7.4|^8.0
According to websocket specification, a client must mask messages and a server must not mask messages.
According to websocket specification, a client must mask messages and a server must not mask messages.
This has never been properly address in this library, but it turned out improvement in v1.6 caused other issues instead. This fix should ensure correct behavior concerning sending messages. There are other related requirements as well, but those are not critical and will be approached later.
Fix issue with implicit default ports (@etrinh, @sirn-se)
Fix issue where port was missing in socket uri (@sirn-se)
Fix client path for http request (@simPod, @sirn-se)
getPier() deprecated, replaced by getRemoteName() (@sirn-se)
Psr\Http\Message\UriInterface as input for URI:s (@sirn-se)v1.5PHP version
^7.2|^8.0
Handle read error during handshake (@sirn-se)
Large header block fix (@sirn-se)
Add test for PHP 8.1 (@sirn-se)
Support for psr/log v2 and v3 (@simPod)
Keep open connection on read timeout (@marcroberts)
Fix for persistent connection (@sirn-se)
Fix for getName() method (@sirn-se)
Fix for persistent connections (@rmeisler)
Convenience send methods; text(), binary(), ping(), pong() (@sirn-se)
8.0 support (@webpatser)7.1 support (@sirn-se)v1.4PHP version
^7.1
Solve stream closure/get meta conflict (@sirn-se)
Force stream close on read error (@sirn-se)
Ping/Pong, handled internally to avoid breaking fragmented messages (@nshmyrev, @sirn-se)
Dropped support of old PHP versions (@sirn-se)
v1.3PHP version
^5.4and^7.0
Allow control messages without payload (@Logioniz)
Implements ping/pong frames (@pmccarren @Logioniz)
v1.2PHP version
^5.4and^7.0
Adding stream context options (to set e.g. SSL allow_self_signed).
allow_self_signed).v1.1PHP version
^5.4and^7.0
Fixed error message on broken frame.
* Adding license information.
One column per quarter.