jaggedsoft / php-binance-api

PHP Binance API is an asynchronous PHP library for the Binance API designed to be easy to use. https://github.com/binance-exchange/php-binance-api
MIT License
604 stars 494 forks source link

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

Open phpmac opened 2 years ago

phpmac commented 2 years ago

Call to undefined function GuzzleHttp\Psr7\uri_for()

phpmac commented 2 years ago
   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))
Ruzaik11 commented 1 year ago

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