php-binance-api icon indicating copy to clipboard operation
php-binance-api copied to clipboard

php8.1 Call to undefined function GuzzleHttp\Psr7\uri_for()

Open phpmac opened this issue 3 years ago • 2 comments
trafficstars

Call to undefined function GuzzleHttp\Psr7\uri_for()

phpmac avatar Sep 22 '22 21:09 phpmac

   Error 

  Call to undefined function GuzzleHttp\Psr7\uri_for()

  at vendor/ratchet/pawl/src/Connector.php:126
    122▕      * @throws \InvalidArgumentException
    123▕      * @return \Psr\Http\Message\RequestInterface
    124▕      */
    125▕     protected function generateRequest($url, array $subProtocols, array $headers) {
  ➜ 126▕         $uri = gPsr\uri_for($url);
    127▕ 
    128▕         $scheme = $uri->getScheme();
    129▕ 
    130▕         if (!in_array($scheme, ['ws', 'wss'])) {

      +2 vendor frames 
  3   app/Console/Commands/ListenOrder.php:61
      Binance\API::userData(Object(Closure), Object(Closure))

      +13 vendor frames 
  17  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

phpmac avatar Sep 22 '22 21:09 phpmac

this will fix the issue if anyone else facing the same issue composer require guzzlehttp/psr7 "^1.8.2"

Ruzaik11 avatar Oct 27 '22 17:10 Ruzaik11