bitvavo / php-bitvavo-api

PHP SDK IS DEPRECATED! PHP wrapper for the Bitvavo API
ISC License
15 stars 13 forks source link

PHP 8 #8

Open wimurk opened 2 years ago

wimurk commented 2 years ago

WHen running the API in PHP 8 there are some methods that need to be changed.

For example the contruct method of the Websocket does not match the caller

public function newWebSocket($reconnect = false, $publicCommandArray = null, $privateCommandArray = null, $oldSocket = null) {
    $this->webSocket = new Websocket($this, $reconnect, $publicCommandArray, $privateCommandArray, $oldSocket);
    return $this->webSocket;
}

class Websocket {
  public function __construct($bitvavo = null, $reconnect = false, $publicCommandArray, $privateCommandArray, $oldSocket) {

  }
}

Changing the above to match the caller or change the caller to the constructor.

class Websocket {
  public function __construct($bitvavo = null, $reconnect = false, $publicCommandArray= null, $privateCommandArray = null, $oldSocket = null) {

  }
}

I will make a pull request to find other issues.