Skip to content

Bug: installed guzzle with version >= 7.3.0 leads to Call to undefined function GuzzleHttp\Psr7\uri_for() #460

@themazim

Description

@themazim

calling websocket based functions results in

System / tests
tested on Linux and MacOs
tested PHP Version 8.1 / 7.4

code

$api->miniTicker(function($api, $ticker) {
            print_r($ticker);
        });

result

  Call to undefined function GuzzleHttp\Psr7\uri_for()

  at vendor/ratchet/pawl/src/Connector.php:126

Description
Installing binance package in an application with guzzle 7.3 or higher or when upgrading, the above mentioned error is thrown.

This is a result of deprecating this function in guzzle and the currently used ratched/pawl version still uses uri_for.
Newer Versions of pawl have the fix implemented.

Replacing with the officially suggested replacements, leads to infinite waiting (no message receives?).

//        $uri = gPsr\uri_for($url);
$uri = gPsr\Utils::uriFor($url);

Locking guzzle to 7.2 solves the issue for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions