Releases: clue/reactphp-quassel
v0.7.0
-
Feature / BC break: Add
BufferInfo
andMessage
to represent complex data types,
represent all map structures asstdClass
objects instead of assoc arrays,
represent message timestamps asDateTime
objects and
changeIrcUsersAndChannels
structure to its logic represenation.
(#41, #43, #44, #46, #47 and #49 by @clue)Incoming buffers/channels and chat messages use complex data models,
so they are represented byBufferInfo
andMessage
respectively.All other data types use plain structured data, so you can access its structure very similar to a JSON-like data structure.
All map structures are now represented asstdClass
object instead of assoc arrays.
This only applies to object maps and lists will continue to be represented as arrays.
This allows for a clear distinction between these concepts and allows you to
differentiate between empty objects and empty lists.
This is in line with how PHP'sjson_decode()
function works by default.This is a major BC break because this means these data structures can no longer be accessed like normal PHP arrays.
However, using the newBufferInfo
andMessage
models makes accessing these somewhat easier.
See the updated examples for more details on practical effect, for example:// old assert(is_array($message)); echo $message['sender'] . ': ' . $message['content'] . PHP_EOL; assert(is_int($message['timestamp'])); echo 'Date: ' . date('Y-m-d', $message['timestamp']) . PHP_EOL; assert(is_array($message['bufferInfo'])); echo 'Channel: ' . $message['bufferInfo']['name'] . PHP_EOL; // new assert($message instanceof Message); echo $message->sender . ': ' . $message->contents . PHP_EOL; assert($message->timestamp instanceof DateTime); echo 'Date: ' . $message->timestamp->format('Y-m-d') . PHP_EOL; assert($message->bufferInfo instanceof BufferInfo); echo 'Channel: ' . $message->bufferInfo->name . PHP_EOL;
-
Feature / BC break: Update
writeBufferRequestBacklog()
parameters and add newwriteBufferRequestBacklogAll()
.
(#42 by @clue)// old $client->writeBufferRequestBacklog($bufferId, 100); // new $client->writeBufferRequestBacklog($bufferId, -1, -1, 100, 0); $client->writeBufferRequestBacklogAll(-1, -1, 100, 0);
-
Feature / BC Break: Automatically send heartbeat requests and replies (ping messages).
This can be controlled with the new?ping=0
and?pong=0
parameters.
(#38 and #39 by @clue) -
Feature: Support passing authentication as part of URL to Quassel core.
(#36 by @clue)$factory->createClient('quassel://user:h%40llo@localhost')->then( function (Client $client) { // client sucessfully connected and authenticated $client->on('data', function ($data) { // next message to follow would be "SessionInit" }); } );
-
Feature: Ignore unsolicited
CoreInfo reports
(Quassel v0.13+).
(#45 by @clue) -
Feature: Support permanently removing networks and improve examples to support disconnected networks.
(#48 and #50 by @clue)// new $client->writeNetworkRemove($networkId);
-
Feature: Update QDataStream dependency to no longer depend on
ext-mbstring
.
(#35 by @clue) -
Improve test suite and add
.gitattributes
to exclude dev files from exports.
Prepare PHP 8 support, update to PHPUnit 9 and simplify test matrix.
(#33 by @carusogabriel, #34, #37 and #54 by @clue and #52 and #53 by @SimonFrings)
v0.6.0
-
Feature / BC break: Upcast legacy Network sync model to newer datastream protocol variant
and only support optionalquassel://
URI scheme and always use probing
(#27 and #31 by @clue)This means that both the old "legacy" protocol and the newer "datastream"
protocol now expose message data in the exact same format so that you no
longer have to worry about protocol inconsistencies.Note that this is not a BC break for most consumers, it merely updates
the "legacy" fallback protocol to behave just like the the "datastream"
protocol. -
Feature / BC break: Significantly improve performance by updating QDataStream dependency and
suggestext-mbstring
for character encoding and mark all protocol classes as@internal
only
(#26 by @clue)This update significantly improves performance and in particular parsing
large messages (such as theSessionInit
message) is now ~20 to ~100
times as fast. What previously took seconds now takes mere milliseconds.
This also makes the previously implicit dependency onext-mbstring
entirely optional.
It is recommended to install this extension to support special characters
outside of ASCII / ISO8859-1 range.Note that this is not a BC break for most consumers, it merely updates
internal protocol handler classes. -
Feature / Fix: Report error if connection ends while receiving data and
simplify close logic to remove all event listeners once closed
(#30 by @clue) -
Feature: Automatically send current timestamp for heartbeat requests by default unless explicit timestamp is given
(#32 by @clue)// new: no parameter sends current timestamp $client->writeHeartBeatRequest();
-
Feature: Limit incoming packet size to 16 MB to avoid excessive buffers
(#29 by @clue)
v0.5.0
-
Feature / BC break: Replace legacy SocketClient with new Socket component and
improve forward compatibility with new components
(#25 by @clue)Note that this is not a BC break for most consumers, it merely updates
internal references and the optional parameter passed to theFactory
.// old from SocketClient component $dnsFactory = new React\Dns\Resolver\Factory(); $resolver = $dnsFactory->create('8.8.8.8', $loop); $connector = new React\SocketClient\Connector($loop, $resolver); $factory = new Factory($loop, $connector); // new from Socket component $connector = new React\Socket\Connector($loop, array( 'dns' => '8.8.8.8' )); $factory = new Factory($loop, $connector);
-
Forward compatibility with PHP 7.1 and PHPUnit v5
(#24 by @clue) -
Improve test suite by locking Travis distro so new defaults will not break the build
(#23 by @clue)
v0.4.0
- Feature / BC break: The Client implement DuplexStreamInterface and behaves like a normal stream
(#21, #22 by @clue)
// old (custom "message" event)
$client->on('message', $callback);
// new (default "data" event)
$client->on('data', $callback);
// old (applies to app send*() methods
$client->sendClientInit(…);
// new (now uses write*() prefix)
$client->writeClientInit(…);
// shared interfaces allow for interoperability with other components
$client->pipe($logger);
// allows advanced / custom messages through writable interface
$client->write(array(…));
// supports and reports back pressure to avoid buffer overflows
$more = $client->write*(…);
$client->pause();
$client->resume();