Pawl icon indicating copy to clipboard operation
Pawl copied to clipboard

RFC6455 Incompatibility

Open adrum opened this issue 10 months ago • 6 comments

@mbonneau

I am doing some work on a ibrary that depends on this package, and this line is now causing an issue in the latest version:

Ratchet\RFC6455\Handshake\ClientNegotiator::__construct(): Argument #1 ($perMessageDeflateOptions) must be of type ?Ratchet\RFC6455\Handshake\PermessageDeflateOptions, GuzzleHttp\Psr7\HttpFactory given, called in .../vendor/ratchet/pawl/src/Connector.php on line 32 

When I change it to $this->_negotiator = new ClientNegotiator(null);, the test suite passes again.

It looks like it is also source of the issue reported here: https://github.com/laravel/reverb/issues/310

adrum avatar Mar 06 '25 05:03 adrum

@adrum Can you post the package versions that you have installed? (composer show)

mbonneau avatar Mar 07 '25 16:03 mbonneau

Of course! Here it is:

[brianium/paratest](https://github.com/paratestphp/paratest/tree/v7.7.0)                   7.7.0   Parallel testing for PHP
[brick/math](https://github.com/brick/math/tree/0.12.3)                          0.12.3  Arbitrary-precision arithmetic library
[carbonphp/carbon-doctrine-types](https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0)     3.2.0   Types to use Carbon in Doctrine
[clue/redis-protocol](https://github.com/clue/redis-protocol/tree/v0.3.2)                 0.3.2   A streaming Redis protocol (RESP) parser and serializer written in pure PHP.
[clue/redis-react](https://github.com/clue/reactphp-redis/tree/v2.8.0)                    2.8.0   Async Redis client implementation, built on top of ReactPHP.
[composer/semver](https://github.com/composer/semver/tree/3.4.3)                     3.4.3   Semver library that offers utilities, version constraint parsing and validation.
[dflydev/dot-access-data](https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3)             3.0.3   Given a deep data structure, access data by dot notation.
[doctrine/deprecations](https://github.com/doctrine/deprecations/tree/1.1.4)               1.1.4   A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.
[doctrine/inflector](https://github.com/doctrine/inflector/tree/2.0.10)                  2.0.10  PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of ...
[doctrine/lexer](https://github.com/doctrine/lexer/tree/3.0.1)                      3.0.1   PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
[dragonmantank/cron-expression](https://github.com/dragonmantank/cron-expression/tree/v3.4.0)       3.4.0   CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
[egulias/email-validator](https://github.com/egulias/EmailValidator/tree/4.0.3)             4.0.3   A library for validating emails against several RFCs
[evenement/evenement](https://github.com/igorw/evenement/tree/v3.0.2)                 3.0.2   Événement is a very simple event dispatching library for PHP
[fakerphp/faker](https://github.com/FakerPHP/Faker/tree/v1.24.1)                      1.24.1  Faker is a PHP library that generates fake data for you.
[fidry/cpu-core-counter](https://github.com/theofidry/cpu-core-counter/tree/1.2.0)              1.2.0   Tiny utility to get the number of CPU cores.
[fig/http-message-util](https://github.com/php-fig/http-message-util/tree/1.1.5)               1.1.5   Utility classes and constants for use with PSR-7 (psr/http-message)
[filp/whoops](https://github.com/filp/whoops/tree/2.17.0)                         2.17.0  php error handling for cool kids
[fruitcake/php-cors](https://github.com/fruitcake/php-cors/tree/v1.3.0)                  1.3.0   Cross-origin resource sharing library for the Symfony HttpFoundation
[graham-campbell/result-type](https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3)         1.1.3   An Implementation Of The Result Type
[guzzlehttp/guzzle](https://github.com/guzzle/guzzle/tree/7.9.2)                   7.9.2   Guzzle is a PHP HTTP client library
[guzzlehttp/promises](https://github.com/guzzle/promises/tree/2.0.4)                 2.0.4   Guzzle promises library
[guzzlehttp/psr7](https://github.com/guzzle/psr7/tree/2.7.0)                     2.7.0   PSR-7 message implementation that also provides common utility methods
[guzzlehttp/uri-template](https://github.com/guzzle/uri-template/tree/v1.0.4)             1.0.4   A polyfill class for uri_template of PHP
[hamcrest/hamcrest-php](https://github.com/hamcrest/hamcrest-php/tree/v2.0.1)               2.0.1   This is the PHP port of Hamcrest Matchers
[jean85/pretty-package-versions](https://github.com/Jean85/pretty-package-versions/tree/2.1.0)      2.1.0   A library to get pretty versions strings of installed dependencies
[laravel/framework](https://github.com/laravel/framework)                   12.1.1  The Laravel Framework.
[laravel/pail](https://github.com/laravel/pail)                        1.2.2   Easily delve into your Laravel application's log files directly from the command line.
[laravel/prompts](https://github.com/laravel/prompts/tree/v0.3.5)                     0.3.5   Add beautiful and user-friendly forms to your command-line applications.
[laravel/serializable-closure](https://github.com/laravel/serializable-closure)        2.0.3   Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.
[laravel/tinker](https://github.com/laravel/tinker/tree/v2.10.1)                      2.10.1  Powerful REPL for the Laravel framework.
[league/commonmark](https://github.com/thephpleague/commonmark)                   2.6.1   Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)
[league/config](https://github.com/thephpleague/config)                       1.2.0   Define configuration arrays with strict schemas and access values with dot notation
[league/flysystem](https://github.com/thephpleague/flysystem/tree/3.29.1)                    3.29.1  File storage abstraction for PHP
[league/flysystem-local](https://github.com/thephpleague/flysystem-local/tree/3.29.0)              3.29.0  Local filesystem adapter for Flysystem.
[league/mime-type-detection](https://github.com/thephpleague/mime-type-detection/tree/1.16.0)          1.16.0  Mime-type detection for Flysystem
[league/uri](https://github.com/thephpleague/uri/tree/7.5.1)                          7.5.1   URI manipulation library
[league/uri-interfaces](https://github.com/thephpleague/uri-interfaces/tree/7.5.0)               7.5.0   Common interfaces and classes for URI representation and interaction
[mockery/mockery](https://github.com/mockery/mockery)                     1.6.12  Mockery is a simple yet flexible PHP mock object framework
[monolog/monolog](https://github.com/Seldaek/monolog/tree/3.8.1)                     3.8.1   Sends your logs to files, sockets, inboxes, databases and various web services
[myclabs/deep-copy](https://github.com/myclabs/DeepCopy/tree/1.13.0)                   1.13.0  Create deep copies (clones) of your objects
[nesbot/carbon](https://github.com/CarbonPHP/carbon)                       3.8.6   An API extension for DateTime that supports 281 different languages.
[nette/schema](https://github.com/nette/schema/tree/v1.3.2)                        1.3.2   📐 Nette Schema: validating data structures against a given Schema.
[nette/utils](https://github.com/nette/utils/tree/v4.0.5)                         4.0.5   🛠  Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or s...
[nikic/php-parser](https://github.com/nikic/PHP-Parser/tree/v5.4.0)                    5.4.0   A PHP parser written in PHP
[nunomaduro/collision](https://github.com/nunomaduro/collision)                8.6.1   Cli error handling for console/command-line PHP applications.
[nunomaduro/termwind](https://github.com/nunomaduro/termwind/tree/v2.3.0)                 2.3.0   Its like Tailwind CSS, but for the console.
[orchestra/canvas](https://github.com/orchestral/canvas/tree/v10.0.1)                    10.0.1  Code Generators for Laravel Applications and Packages
[orchestra/canvas-core](https://github.com/orchestral/canvas-core/tree/v10.0.1)               10.0.1  Code Generators Builder for Laravel Applications and Packages
[orchestra/sidekick](https://github.com/orchestral/sidekick/tree/v1.0.5)                  1.0.5   Packages Toolkit Utilities and Helpers for Laravel
[orchestra/testbench](https://github.com/orchestral/testbench/tree/v10.0.0)                 10.0.0  Laravel Testing Helper for Packages Development
[orchestra/testbench-core](https://github.com/orchestral/testbench-core)            10.0.3  Testing Helper for Laravel Development
[orchestra/workbench](https://github.com/orchestral/workbench/tree/v10.0.0)                 10.0.0  Workbench Companion for Laravel Packages Development
[paragonie/sodium_compat](https://github.com/paragonie/sodium_compat/tree/v2.1.0)             2.1.0   Pure PHP implementation of libsodium; uses the PHP extension if it exists
[pestphp/pest](https://github.com/pestphp/pest/tree/v3.7.4)                        3.7.4   The elegant PHP Testing Framework.
[pestphp/pest-plugin](https://github.com/pestphp/pest-plugin/tree/v3.0.0)                 3.0.0   The Pest plugin manager
[pestphp/pest-plugin-arch](https://github.com/pestphp/pest-plugin-arch/tree/v3.0.0)            3.0.0   The Arch plugin for Pest PHP.
[pestphp/pest-plugin-mutate](https://github.com/pestphp/pest-plugin-mutate/tree/v3.0.5)          3.0.5   Mutates your code to find untested cases
[phar-io/manifest](https://github.com/phar-io/manifest/tree/2.0.4)                    2.0.4   Component for reading phar.io manifest information from a PHP Archive (PHAR)
[phar-io/version](https://github.com/phar-io/version/tree/3.2.1)                     3.2.1   Library for handling version information and constraints
[phpdocumentor/reflection-common](https://github.com/phpDocumentor/ReflectionCommon/tree/2.x)     2.2.0   Common reflection classes used by phpdocumentor to reflect the code structure
[phpdocumentor/reflection-docblock](https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.1)   5.6.1   With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a Doc...
[phpdocumentor/type-resolver](https://github.com/phpDocumentor/TypeResolver/tree/1.10.0)         1.10.0  A PSR-5 based resolver of Class names, Types and Structural Element Names
[phpoption/phpoption](https://github.com/schmittjoh/php-option/tree/1.9.3)                 1.9.3   Option Type for PHP
[phpstan/phpdoc-parser](https://github.com/phpstan/phpdoc-parser/tree/2.1.0)               2.1.0   PHPDoc parser with support for nullable, intersection and generic types
[phpstan/phpstan](https://github.com/phpstan/phpstan-src)                     1.12.20 PHPStan - PHP Static Analysis Tool
[phpunit/php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.9)           11.0.9  Library that provides collection, processing, and rendering functionality for PHP code coverage information.
[phpunit/php-file-iterator](https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0)           5.1.0   FilterIterator implementation that filters files based on a list of suffixes.
[phpunit/php-invoker](https://github.com/sebastianbergmann/php-invoker/tree/5.0.1)                 5.0.1   Invoke callables with a timeout
[phpunit/php-text-template](https://github.com/sebastianbergmann/php-text-template/tree/4.0.1)           4.0.1   Simple template engine.
[phpunit/php-timer](https://github.com/sebastianbergmann/php-timer/tree/7.0.1)                   7.0.1   Utility class for timing
[phpunit/phpunit](https://github.com/sebastianbergmann/phpunit/tree/11.5.3)                     11.5.3  The PHP Unit Testing framework.
[psr/clock](https://github.com/php-fig/clock/tree/1.0.0)                           1.0.0   Common interface for reading the clock.
[psr/container](https://github.com/php-fig/container/tree/2.0.2)                       2.0.2   Common Container Interface (PHP FIG PSR-11)
[psr/event-dispatcher](https://github.com/php-fig/event-dispatcher/tree/1.0.0)                1.0.0   Standard interfaces for event handling.
[psr/http-client](https://github.com/php-fig/http-client)                     1.0.3   Common interface for HTTP clients
[psr/http-factory](https://github.com/php-fig/http-factory)                    1.1.0   PSR-17: Common interfaces for PSR-7 HTTP message factories
[psr/http-message](https://github.com/php-fig/http-message/tree/1.1)                    1.1     Common interface for HTTP messages
[psr/log](https://github.com/php-fig/log/tree/3.0.2)                             3.0.2   Common interface for logging libraries
[psr/simple-cache](https://github.com/php-fig/simple-cache/tree/3.0.0)                    3.0.0   Common interfaces for simple caching
[psy/psysh](https://github.com/bobthecow/psysh/tree/v0.12.7)                           0.12.7  An interactive shell for modern PHP.
[pusher/pusher-php-server](https://github.com/pusher/pusher-http-php/tree/7.2.7)            7.2.7   Library for interacting with the Pusher REST API
[ralouphie/getallheaders](https://github.com/ralouphie/getallheaders/tree/develop)             3.0.3   A polyfill for getallheaders.
[ramsey/collection](https://github.com/ramsey/collection/tree/2.1.0)                   2.1.0   A PHP library for representing and manipulating collections.
[ramsey/uuid](https://github.com/ramsey/uuid/tree/4.7.6)                         4.7.6   A PHP library for generating and working with universally unique identifiers (UUIDs).
[ratchet/pawl](https://github.com/ratchetphp/Pawl/tree/v0.4.2)                        0.4.2   Asynchronous WebSocket client
[ratchet/rfc6455](https://github.com/ratchetphp/RFC6455/tree/v0.3.1)                     0.3.1   RFC6455 WebSocket protocol handler
[react/async](https://github.com/reactphp/async/tree/v4.3.0)                         4.3.0   Async utilities and fibers for ReactPHP
[react/cache](https://github.com/reactphp/cache/tree/v1.2.0)                         1.2.0   Async, Promise-based cache interface for ReactPHP
[react/dns](https://github.com/reactphp/dns/tree/v1.13.0)                           1.13.0  Async DNS resolver for ReactPHP
[react/event-loop](https://github.com/reactphp/event-loop/tree/v1.5.0)                    1.5.0   ReactPHP's core reactor event loop that libraries can use for evented I/O.
[react/http](https://github.com/reactphp/http/tree/v1.11.0)                          1.11.0  Event-driven, streaming HTTP client and server implementation for ReactPHP
[react/promise](https://github.com/reactphp/promise/tree/v3.2.0)                       3.2.0   A lightweight implementation of CommonJS Promises/A for PHP
[react/promise-timer](https://github.com/reactphp/promise-timer/tree/v1.11.0)                 1.11.0  A trivial implementation of timeouts for Promises, built on top of ReactPHP.
[react/socket](https://github.com/reactphp/socket/tree/v1.16.0)                        1.16.0  Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP
[react/stream](https://github.com/reactphp/stream/tree/v1.4.0)                        1.4.0   Event-driven readable and writable streams for non-blocking I/O in ReactPHP
[sebastian/cli-parser](https://github.com/sebastianbergmann/cli-parser/tree/3.0.2)                3.0.2   Library for parsing CLI options
[sebastian/code-unit](https://github.com/sebastianbergmann/code-unit/tree/3.0.2)                 3.0.2   Collection of value objects that represent the PHP code units
[sebastian/code-unit-reverse-lookup](https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1)  4.0.1   Looks up which function or method a line of code belongs to
[sebastian/comparator](https://github.com/sebastianbergmann/comparator/tree/6.3.0)                6.3.0   Provides the functionality to compare PHP values for equality
[sebastian/complexity](https://github.com/sebastianbergmann/complexity/tree/4.0.1)                4.0.1   Library for calculating the complexity of PHP code units
[sebastian/diff](https://github.com/sebastianbergmann/diff/tree/6.0.2)                      6.0.2   Diff implementation
[sebastian/environment](https://github.com/sebastianbergmann/environment/tree/7.2.0)               7.2.0   Provides functionality to handle HHVM/PHP environments
[sebastian/exporter](https://github.com/sebastianbergmann/exporter/tree/6.3.0)                  6.3.0   Provides the functionality to export PHP variables for visualization
[sebastian/global-state](https://github.com/sebastianbergmann/global-state/tree/7.0.2)              7.0.2   Snapshotting of global state
[sebastian/lines-of-code](https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1)             3.0.1   Library for counting the lines of code in PHP source code
[sebastian/object-enumerator](https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1)         6.0.1   Traverses array structures and object graphs to enumerate all referenced objects
[sebastian/object-reflector](https://github.com/sebastianbergmann/object-reflector/tree/4.0.1)          4.0.1   Allows reflection of object attributes, including inherited and non-public ones
[sebastian/recursion-context](https://github.com/sebastianbergmann/recursion-context/tree/6.0.2)         6.0.2   Provides functionality to recursively process PHP variables
[sebastian/type](https://github.com/sebastianbergmann/type/tree/5.1.0)                      5.1.0   Collection of value objects that represent the types of the PHP type system
[sebastian/version](https://github.com/sebastianbergmann/version/tree/5.0.2)                   5.0.2   Library that helps with managing the version number of Git-hosted PHP projects
[staabm/side-effects-detector](https://github.com/staabm/side-effects-detector/tree/1.0.5)        1.0.5   A static analysis tool to detect side effects in PHP code
[symfony/clock](https://github.com/symfony/clock/tree/v7.2.0)                       7.2.0   Decouples applications from the system clock
[symfony/console](https://github.com/symfony/console/tree/v7.2.1)                     7.2.1   Eases the creation of beautiful and testable command line interfaces
[symfony/css-selector](https://github.com/symfony/css-selector/tree/v7.2.0)                7.2.0   Converts CSS selectors to XPath expressions
[symfony/deprecation-contracts](https://github.com/symfony/deprecation-contracts/tree/v3.5.1)       3.5.1   A generic function and convention to trigger deprecation notices
[symfony/error-handler](https://github.com/symfony/error-handler/tree/v7.2.4)               7.2.4   Provides tools to manage errors and ease debugging PHP code
[symfony/event-dispatcher](https://github.com/symfony/event-dispatcher/tree/v7.2.0)            7.2.0   Provides tools that allow your application components to communicate with each other by dispatching events and listening to them
[symfony/event-dispatcher-contracts](https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1)  3.5.1   Generic abstractions related to dispatching event
[symfony/finder](https://github.com/symfony/finder/tree/v7.2.2)                      7.2.2   Finds files and directories via an intuitive fluent interface
[symfony/http-foundation](https://github.com/symfony/http-foundation/tree/v7.2.3)             7.2.3   Defines an object-oriented layer for the HTTP specification
[symfony/http-kernel](https://github.com/symfony/http-kernel/tree/v7.2.4)                 7.2.4   Provides a structured process for converting a Request into a Response
[symfony/mailer](https://github.com/symfony/mailer/tree/v7.2.3)                      7.2.3   Helps sending emails
[symfony/mime](https://github.com/symfony/mime/tree/v7.2.4)                        7.2.4   Allows manipulating MIME messages
[symfony/polyfill-ctype](https://github.com/symfony/polyfill-ctype/tree/v1.31.0)              1.31.0  Symfony polyfill for ctype functions
[symfony/polyfill-intl-grapheme](https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0)      1.31.0  Symfony polyfill for intl's grapheme_* functions
[symfony/polyfill-intl-idn](https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0)           1.31.0  Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
[symfony/polyfill-intl-normalizer](https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0)    1.31.0  Symfony polyfill for intl's Normalizer class and related functions
[symfony/polyfill-mbstring](https://github.com/symfony/polyfill-mbstring/tree/v1.31.0)           1.31.0  Symfony polyfill for the Mbstring extension
[symfony/polyfill-php80](https://github.com/symfony/polyfill-php80/tree/v1.31.0)              1.31.0  Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
[symfony/polyfill-php83](https://github.com/symfony/polyfill-php83/tree/v1.31.0)              1.31.0  Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions
[symfony/polyfill-php84](https://github.com/symfony/polyfill-php84/tree/v1.31.0)              1.31.0  Symfony polyfill backporting some PHP 8.4+ features to lower PHP versions
[symfony/polyfill-uuid](https://github.com/symfony/polyfill-uuid/tree/v1.31.0)               1.31.0  Symfony polyfill for uuid functions
[symfony/process](https://github.com/symfony/process/tree/v7.2.4)                     7.2.4   Executes commands in sub-processes
[symfony/routing](https://github.com/symfony/routing/tree/v7.2.3)                     7.2.3   Maps an HTTP request to a set of configuration variables
[symfony/service-contracts](https://github.com/symfony/service-contracts/tree/v3.5.1)           3.5.1   Generic abstractions related to writing services
[symfony/string](https://github.com/symfony/string/tree/v7.2.0)                      7.2.0   Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way
[symfony/translation](https://github.com/symfony/translation/tree/v7.2.4)                 7.2.4   Provides tools to internationalize your application
[symfony/translation-contracts](https://github.com/symfony/translation-contracts/tree/v3.5.1)       3.5.1   Generic abstractions related to translation
[symfony/uid](https://github.com/symfony/uid/tree/v7.2.0)                         7.2.0   Provides an object-oriented API to generate and represent UIDs
[symfony/var-dumper](https://github.com/symfony/var-dumper/tree/v7.2.3)                  7.2.3   Provides mechanisms for walking through any arbitrary PHP variable
[symfony/yaml](https://github.com/symfony/yaml/tree/v7.2.3)                        7.2.3   Loads and dumps YAML files
[ta-tikoma/phpunit-architecture-test](https://github.com/ta-tikoma/phpunit-architecture-test/tree/0.8.4) 0.8.4   Methods for testing application architecture
[theseer/tokenizer](https://github.com/theseer/tokenizer/tree/1.2.3)                   1.2.3   A small library for converting tokenized PHP source code into XML and potentially other formats
[tijsverkoyen/css-to-inline-styles](https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.3.0)   2.3.0   CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when...
[vlucas/phpdotenv](https://github.com/vlucas/phpdotenv/tree/v5.6.1)                    5.6.1   Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
[voku/portable-ascii](https://github.com/voku/portable-ascii/tree/2.0.3)                 2.0.3   Portable ASCII library - performance optimized (ascii) string functions for php.
[webmozart/assert](https://github.com/webmozarts/assert/tree/1.11.0)                    1.11.0  Assertions to validate method input/output with nice error messages.

adrum avatar Mar 09 '25 22:03 adrum

I'm hitting the same problem. The issue here is the change in the constructor signature of \Ratchet\RFC6455\Handshake\ClientNegotiator between 0.3.x and 0.4:

(0.3.1):

    function __construct(PermessageDeflateOptions $perMessageDeflateOptions = null) {

(0.4.0):

    public function __construct(
        RequestFactoryInterface $requestFactory,
        ?PermessageDeflateOptions $perMessageDeflateOptions = null
    ) {

Since \Ratchet\Client\Connector::__construct() now passes the result of new gPsr\HttpFactory() as the first argument, this crashes if 0.3.x is installed.

andreaswolf avatar Mar 14 '25 22:03 andreaswolf

This issue occurs while using both this package along with the websocket server package cboden/ratchet. The first depends on ^0.4.0 || ^0.3.1 of the ratchet/rfc6455 package while the latter still depends only on ^0.3.1.

grey-dev-0 avatar Mar 20 '25 11:03 grey-dev-0

in case people get here from google and got trouble to get this to work with ratchetphp/Ratchet.

just downgrade to "ratchet/pawl": "v0.4.1" and use the version of https://github.com/ratchetphp/Ratchet/pull/1014 and it worked for me.

dvdknaap avatar May 05 '25 10:05 dvdknaap

if you want to fix this error: vendor/ratchet/rfc6455/src/Handshake/ClientNegotiator.php:19

function __construct(?PermessageDeflateOptions $perMessageDeflateOptions = null) {

vendor/ratchet/pawl/src/Connector.php:29

$this->_negotiator = new ClientNegotiator(PermessageDeflateOptions::createDisabled());

also tried the following because it's in a test case but it didn't work in my case

$this->_negotiator = new ClientNegotiator(PermessageDeflateOptions::permessageDeflateSupported() ? PermessageDeflateOptions::createEnabled() : PermessageDeflateOptions::createDisabled());

@mbonneau

dvdknaap avatar Sep 06 '25 10:09 dvdknaap