Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Websocket Laravel Package

phrity/websocket

WebSocket client and multi-connection server for PHP, supporting ws/wss, listener callbacks, close and ping/pong handling, optional deflate compression, message fragmentation, and custom opcodes.

View on GitHub
Deep Wiki
Context7
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

  • Improved exception structure (@sirn-se)
  • MessageEncodingException on message compression failure (@sirn-se)
  • Remove deprecated code (@sirn-se)
  • Nyholm PSR HTTP (remove internal stub classes) (@sirn-se)
  • getConnections() return Connections collection instead of array (@sirn-se)

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.8.1...4.0.0

3.8.1
  • Remove redundant detach
  • Fix typos
  • Updated documentation

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.8.0...3.8.1

3.8.0

Features and fixes

  • Configurable opcode/class mapping using OpcodeRegistry
  • New onMessage() listener, triggered on all messages
  • Connections container class
  • Dispach onDisconnect on remote connection close
  • Exceptions: ControlInterface on CloseException, ReconnectException
  • Exceptions: HandlerLevelInterface on BadUriException, ClientException, RunnerException, ServerException
  • Close status as int<0, 4999>|null
  • Preparations for v4

What's Changed

New Contributors

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.7.3...3.8.0

3.7.3
  • Use safe stream read in FrameHandler (avoid potential byte read sync issue)

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.7.2...3.7.3

3.7.2
  • Detach connection on failed handshake

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.7.1...3.7.2

3.7.1
  • Safeguard on identity conflict

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.7.0...3.7.1

3.7.0
  • Configuration class for various settings
  • Identity interface and implementation
  • Using Nyholm PSR HTTP
  • Runner class wraps stream-select handler
  • StreamFactory as constructor option Client/Server
  • Preparations for v4

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.6.2...3.7.0

3.6.2
  • Fuzzy header parsing deflate compression
  • Ensure valid range deflation window size

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.6.1...3.6.2

3.6.1
  • Fix typos and broken link
  • Repo setup, PHP 8.5 default, 8.6 unit test

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.6.0...3.6.1

3.6.0
  • CloseConnection and ReconnectException in Client listener
  • Creating PSR-7 messages using configurable PSR-17 factories
  • v4 deprecation warnings
  • Improved phpdoc
  • Code coverage improvement

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.5.0...3.6.0

3.5.0
  • Timeouts support float (@sirn-se)
  • Client and Server start() can have specific timeout (@sirn-se)
  • Internal LoggerAwareTrait for logger handling (@sirn-se)
  • Constant in interface (@sirn-se)
  • Frame pulling rewritten (@sirn-se)
  • phpstan level 8, and fixes accordingly (@sirn-se)

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.4.0...3.5.0

3.4.0
  • Compression Extension as optional middleware (@sirn-se)
  • Per-Message Deflate as Compression implementation (@sirn-se)
  • Example: Server using SSL certificate capture (@marki555)

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.3.0...3.4.0

3.3.0
  • Using Phrity/Net/Context for context management in Client, Server and Connection
  • Additional input checks
  • Improved phpdoc and phpstan definitions
  • Improved logging: exceptions exposed in context
  • Extended documentation and examples

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.3...3.3.0

3.2.5

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.4...3.2.5

3.2.4

The onError() listener should not dispatch unresolvable errors

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.3...3.2.4

3.2.3

What's Changed

New Contributors

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.2...3.2.3

3.2.1

What's Changed

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.2.0...3.2.1

3.2.0
  • Server setContext() method (@sirn-se)
  • RSV flags on Frame (@sirn-se)
  • Fixed various typos and broken links (@pieterocp)
  • phrity/net-stream v2.1 for context support and select warning handling (@sirn-se)
  • Deprecation warnings (@sirn-se)

Full Changelog: https://github.com/sirn-se/websocket-php/compare/3.1.0...3.2.0

3.0.0

Version 3.0.0

  • Support psr/log v3
  • Client receive() never return null
  • Typed class properties

Full Changelog: https://github.com/sirn-se/websocket-php/compare/2.2.3...3.0.0

1.7.3

Version 1.7.3

  • Fix dependency psr/http-message
2.2.3

Version 2.2.3

  • URL-decoded user-info in headers
2.2.2

Version 2.2.2

  • Fix so redirect to https uses ssl (ended up with tcp before)
2.2.1

Version 2.2.1

  • Minor fixes on FollowRedirect middleware
2.2.0

Version 2.2.0

  • Optional FollowRedirect middleware (Client only)
  • Optional SubprotocolNegotiation middleware
  • getMeta() exposed on Client
  • Server throws HandshakeException if HTTP middleware return invalid status
  • New ReconnectException to force Client reconnection
  • Server->isSsl() method
  • Improved URI handling
  • Allow empty HTTP header handling (RFC compliance)
  • Documentation changes
  • Using phrity/net v2
  • Updating workflow and dependencies
2.1.3

Version 2.1.3

  • Allow additional content in Connection header during handshake
2.1.2

Version 2.1.2

  • Allow repeated headers when pulling HTTP messages
2.1.1

Version 2.1.1

  • Fix issue with falsy but valid HTTP headers
  • Additional check for HTTP headers
  • Some documentation changes
2.1.0

Version 2.1.0

  • Http & Tick middleware support
  • PingInterval middleware for heartbeat functionality
  • Connection get/set meta functions
  • All classes Stringable, consistent
  • HTTP method fix
  • Unit tests for php 8.4
  • Fixing various typos
  • Remove unused code and documentation
1.7.2

Version 1.7.2

  • Restoring psr/log v3 and psr/http-message v2, fixing HTTP classes to be compliant.
1.7.1

Version 1.7.1

  • Define return on receive()
  • Fix some dependencies
2.0.1

Patch 2.0.1

  • Fix dependency version
2.0.0

Version 2.0.0

Version 2.0 introduces significant and breaking changes.

  • Listeners for client and server
  • Middleware support
  • Multi connection server
  • receive() always return Message instance or null
  • send() require Message instance as first argument
  • Strict mask policy
  • Strict handshake procedure
  • Close get close-status methods
  • Server no longer auto-increment port
  • Removed deprecated methods and options
  • Moved source
  • Removed PHP 7.4 support
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels