Skip to content

v2.0.0

Choose a tag to compare

@D3strukt0r D3strukt0r released this 30 Jun 22:24

2.0.0 (2018-04-24)

⚠ BREAKING CHANGES

  • Namespace changed from Votifier\Client to D3strukt0r\VotifierClient (with ServerType\ and VoteType\ sub-namespaces). Update every use statement.

  • The single Vote class with a six-argument constructor was removed. You now compose a server type, a vote type and a Vote wrapper, then call send():

    // before (1.x)
    use Votifier\Client\Vote;
    (new Vote('127.0.0.1', 8192, $publicKey, $username, 'My list', $ip))->send();
    
    // after (2.0.0)
    use D3strukt0r\VotifierClient\ServerType\ClassicVotifier;
    use D3strukt0r\VotifierClient\VoteType\ClassicVote;
    use D3strukt0r\VotifierClient\Vote;
    
    $serverType = new ClassicVotifier('127.0.0.1', null, $publicKey); // null port defaults to 8192
    $voteType = new ClassicVote($username, 'My list', $ip);
    (new Vote($voteType, $serverType))->send();
  • NuVotifier is now supported via ServerType\NuVotifier($host, $port, $publicKey, $protocolV2 = false, $token = null) — pass true and a token for the v2 protocol.

  • Sending still throws a generic \Exception on failure (typed exceptions arrive in 3.0.0).