Tags: jakubkulhan/bunny
Tags
This release is mainly a bugfix release, thanks to the work of @tomas… …-novotny, @dantleech, and @appkit-framework reporting and fixing issues solidifying `v0.6.0`'s stability. **Note: This is the last alpha release, next will be one or two beta releases adding some quality of life improvements before the stable `v0.6.0` release.** ====== - Total issues resolved: **2** - Total pull requests resolved: **54** - Total contributors: **7** enhancement ----------- - [228: [0.6.x] Refactor tests](#228) thanks to @tomas-novotny - [221: [0.6.x] Solve PHP 8.5 `chr` PHPStan out of bounds warning](#221) thanks to @WyriHaximus - [216: [0.6.x] Add simple wait for RabbitMQ build with Bunny](#216) thanks to @WyriHaximus - [215: [0.6.x] Add mock client and channel objects](#215) thanks to @WyriHaximus - [214: [0.6.x] Make connection take ClientInterface](#214) thanks to @WyriHaximus - [212: [0.6.x] Moved mocked connection interface into MockConnectionInterface](#212) thanks to @WyriHaximus - [209: [0.6.x] Add make generate and always run it before all other make commands](#209) thanks to @WyriHaximus - [206: Emit client 'close' event](#206) thanks to @appkit-framework - [204: [0.6.x] Check if argv argument count meets expectations in bunny consumer](#204) thanks to @WyriHaximus - [202: Global handling of channel and connection close](#202) thanks to @appkit-framework - [198: Fix error handling, channel closing and connection loss](#198) thanks to @appkit-framework - [197: [0.6.x] Test against upcoming releases](#197) thanks to @WyriHaximus bug --- - [229: [0.6.x] Keep `var/` around](#229) thanks to @WyriHaximus - [227: [0.6.x] Always clear heartbeat timer](#227) thanks to @tomas-novotny - [226: [0.6.x] Fix event loop crash in heartbeat timer callback](#226) thanks to @tomas-novotny - [222: [0.6.x] Add return type `int` ranges to Buffer::consume*int*/read*int* methods](#222) thanks to @WyriHaximus - [220: [0.6.x] Always clear heartbeat timer](#220) thanks to @WyriHaximus - [217: Fatal error when connect() returns an array on failure to connect](#217) thanks to @dantleech - [213: [0.6.x] Remove slipped in debug line](#213) thanks to @WyriHaximus - [205: Fix handling disconnect and channel close initiated by server](#205) thanks to @appkit-framework - [201: Fix handling of exceptions thrown by frame handlers](#201) thanks to @appkit-framework ====== - Total issues resolved: **2** - Total pull requests resolved: **54** - Total contributors: **7** enhancement ----------- - [228: [0.6.x] Refactor tests](#228) thanks to @tomas-novotny - [221: [0.6.x] Solve PHP 8.5 `chr` PHPStan out of bounds warning](#221) thanks to @WyriHaximus - [216: [0.6.x] Add simple wait for RabbitMQ build with Bunny](#216) thanks to @WyriHaximus - [215: [0.6.x] Add mock client and channel objects](#215) thanks to @WyriHaximus - [214: [0.6.x] Make connection take ClientInterface](#214) thanks to @WyriHaximus - [212: [0.6.x] Moved mocked connection interface into MockConnectionInterface](#212) thanks to @WyriHaximus - [209: [0.6.x] Add make generate and always run it before all other make commands](#209) thanks to @WyriHaximus - [206: Emit client 'close' event](#206) thanks to @appkit-framework - [204: [0.6.x] Check if argv argument count meets expectations in bunny consumer](#204) thanks to @WyriHaximus - [202: Global handling of channel and connection close](#202) thanks to @appkit-framework - [198: Fix error handling, channel closing and connection loss](#198) thanks to @appkit-framework - [197: [0.6.x] Test against upcoming releases](#197) thanks to @WyriHaximus - [195: [0.6.x] Include benchmark, examples, and tutorial in PHPCS runs](#195) thanks to @WyriHaximus - [194: [0.6.x] Add support for creating Configuration from DSN](#194) thanks to @WyriHaximus - [193: [0.6.x] Make it abundantly clear Bunny must run in a fiber](#193) thanks to @WyriHaximus - [190: Drop react-amqp from readme](#190) thanks to @WyriHaximus - [189: [0.6.x] CI Optimizations](#189) thanks to @WyriHaximus - [187: [0.6.x] Tidy up readme](#187) thanks to @WyriHaximus - [186: [0.6.x] Update benchmark numbers](#186) thanks to @WyriHaximus - [185: [0.6.x] Improve benchmark outputs](#185) thanks to @WyriHaximus - [184: [0.6.x] Make Connection::onHeartbeat private](#184) thanks to @WyriHaximus - [182: [0.6.x] Change SSL to TLS](#182) thanks to @WyriHaximus - [181: [0.6.x] Refactor configuration internals](#181) thanks to @WyriHaximus - [180: [0.6.x] Optional loop instance to client](#180) thanks to @tomas-novotny - [177: [0.6.x] Update the minimum PHP version mention in the readme to 8.1](#177) thanks to @WyriHaximus - [176: [0.6.x] Add Configuration object](#176) thanks to @WyriHaximus - [172: [0.6.x] One command local testing](#172) thanks to @WyriHaximus - [167: Better typehints](#167) thanks to @tomas-novotny - [166: Update code style](#166) thanks to @tomas-novotny - [165: Support int64 in arguments](#165) thanks to @tomas-novotny - [163: Missing methods to ChannelInterface](#163) thanks to @tomas-novotny - [160: Test against RabbitMQ 4](#160) thanks to @WyriHaximus - [154: Replace `*Enum` classes with a native Enums](#154) thanks to @jeromegamez - [152: Generate better connections](#152) thanks to @jeromegamez - [150: Add support for setting client properties](#150) thanks to @jeromegamez - [148: Allow CI workflow to be manually triggered](#148) thanks to @WyriHaximus - [143: react/promise 3.0 support?](#143) thanks to @lookyman bug,enhancement --------------- - [170: [0.6.x] Await for connection in async](#170) thanks to @tomas-novotny enhancement,feature ------------------- - [147: Rebuild into async only with sync API](#147) thanks to @WyriHaximus feature ------- - [171: [0.6.x] Concurrent consuming](#171) thanks to @WyriHaximus bug --- - [229: [0.6.x] Keep `var/` around](#229) thanks to @WyriHaximus - [227: [0.6.x] Always clear heartbeat timer](#227) thanks to @tomas-novotny - [226: [0.6.x] Fix event loop crash in heartbeat timer callback](#226) thanks to @tomas-novotny - [222: [0.6.x] Add return type `int` ranges to Buffer::consume*int*/read*int* methods](#222) thanks to @WyriHaximus - [220: [0.6.x] Always clear heartbeat timer](#220) thanks to @WyriHaximus - [217: Fatal error when connect() returns an array on failure to connect](#217) thanks to @dantleech - [213: [0.6.x] Remove slipped in debug line](#213) thanks to @WyriHaximus - [205: Fix handling disconnect and channel close initiated by server](#205) thanks to @appkit-framework - [201: Fix handling of exceptions thrown by frame handlers](#201) thanks to @appkit-framework - [196: [0.6.x] Handle channel closing mid handling a message](#196) thanks to @WyriHaximus - [188: [0.6.x] Run CI on pushes to 0.6.x branch](#188) thanks to @WyriHaximus - [183: [0.6.x] Local development TLS fixes](#183) thanks to @WyriHaximus - [173: [0.6.x] Strengthen channel consume test assertations](#173) thanks to @WyriHaximus - [169: [0.6.x] Wait for connection to fully open while opening channel](#169) thanks to @WyriHaximus - [164: Consume should only process one message at a time](#164) thanks to @WyriHaximus - [162: Remove implicit nullable typehints for PHP 8.4 compatibility](#162) thanks to @janlanger
Non-Breaking Changes:
* Added support for DSNs
To make configuration simple, and support existing standards, DSN (configuration by URL) has been added:
```php
use Bunny\Client;
use Bunny\Configuration;
$configuration = Configuration::fromDSN('amqp://USERNAME:PASSWORD@HOSTNAME/VHOST');
$bunny = new Client($configuration);
$bunny->connect();
```
With TLS support:
```php
use Bunny\Client;
use Bunny\Configuration;
$configuration = Configuration::fromDSN(
'amqp://USERNAME:PASSWORD@HOSTNAME/VHOST?tls[cafile]=ca.pem&tls[local_cert]=client.cert&tls[local_pk]=client.key',
);
$bunny = new Client($configuration);
$bunny->connect();
```
======
- Total issues resolved: **1**
- Total pull requests resolved: **35**
- Total contributors: **5**
bug
---
- [196: [0.6.x] Handle channel closing mid handling a message](#196) thanks to @WyriHaximus
enhancement
-----------
- [195: [0.6.x] Include benchmark, examples, and tutorial in PHPCS runs](#195) thanks to @WyriHaximus
- [194: [0.6.x] Add support for creating Configuration from DSN](#194) thanks to @WyriHaximus
- [193: [0.6.x] Make it abundantly clear Bunny must run in a fiber](#193) thanks to @WyriHaximus
======
- Total issues resolved: **1**
- Total pull requests resolved: **35**
- Total contributors: **5**
bug
---
- [196: [0.6.x] Handle channel closing mid handling a message](#196) thanks to @WyriHaximus
- [188: [0.6.x] Run CI on pushes to 0.6.x branch](#188) thanks to @WyriHaximus
- [183: [0.6.x] Local development TLS fixes](#183) thanks to @WyriHaximus
- [173: [0.6.x] Strengthen channel consume test assertations](#173) thanks to @WyriHaximus
- [169: [0.6.x] Wait for connection to fully open while opening channel](#169) thanks to @WyriHaximus
- [164: Consume should only process one message at a time](#164) thanks to @WyriHaximus
- [162: Remove implicit nullable typehints for PHP 8.4 compatibility](#162) thanks to @janlanger
enhancement
-----------
- [195: [0.6.x] Include benchmark, examples, and tutorial in PHPCS runs](#195) thanks to @WyriHaximus
- [194: [0.6.x] Add support for creating Configuration from DSN](#194) thanks to @WyriHaximus
- [193: [0.6.x] Make it abundantly clear Bunny must run in a fiber](#193) thanks to @WyriHaximus
- [190: Drop react-amqp from readme](#190) thanks to @WyriHaximus
- [189: [0.6.x] CI Optimizations](#189) thanks to @WyriHaximus
- [187: [0.6.x] Tidy up readme](#187) thanks to @WyriHaximus
- [186: [0.6.x] Update benchmark numbers](#186) thanks to @WyriHaximus
- [185: [0.6.x] Improve benchmark outputs](#185) thanks to @WyriHaximus
- [184: [0.6.x] Make Connection::onHeartbeat private](#184) thanks to @WyriHaximus
- [182: [0.6.x] Change SSL to TLS](#182) thanks to @WyriHaximus
- [181: [0.6.x] Refactor configuration internals](#181) thanks to @WyriHaximus
- [180: [0.6.x] Optional loop instance to client](#180) thanks to @tomas-novotny
- [177: [0.6.x] Update the minimum PHP version mention in the readme to 8.1](#177) thanks to @WyriHaximus
- [176: [0.6.x] Add Configuration object](#176) thanks to @WyriHaximus
- [172: [0.6.x] One command local testing](#172) thanks to @WyriHaximus
- [167: Better typehints](#167) thanks to @tomas-novotny
- [166: Update code style](#166) thanks to @tomas-novotny
- [165: Support int64 in arguments](#165) thanks to @tomas-novotny
- [163: Missing methods to ChannelInterface](#163) thanks to @tomas-novotny
- [160: Test against RabbitMQ 4](#160) thanks to @WyriHaximus
- [154: Replace `*Enum` classes with a native Enums](#154) thanks to @jeromegamez
- [152: Generate better connections](#152) thanks to @jeromegamez
- [150: Add support for setting client properties](#150) thanks to @jeromegamez
- [148: Allow CI workflow to be manually triggered](#148) thanks to @WyriHaximus
- [143: react/promise 3.0 support?](#143) thanks to @lookyman
feature
-------
- [171: [0.6.x] Concurrent consuming](#171) thanks to @WyriHaximus
bug,enhancement
---------------
- [170: [0.6.x] Await for connection in async](#170) thanks to @tomas-novotny
- [153: Replace `elseif`s with early returns in `Connection`](#153) thanks to @jeromegamez
enhancement,feature
-------------------
- [147: Rebuild into async only with sync API](#147) thanks to @WyriHaximus
v0.6.0-alpha.1 Non-Breaking Changes: * Merged clients into one * Marked `Client` and `Channel` `final` through doc block and introduced interfaces for them for unit testing * Dropped build in event loop, socket, and stream handling switching to [`react/event-loop`](https://reactphp.org/event-loop/), [`react/socket`](https://reactphp.org/socket/), and [`react/stream`](https://reactphp.org/stream/) for that * Partially introduced strict typing and (return) type hints due to all the changes in the code * Updated certain generated traits into generated classes * Ensured performance didn't regress with these changes * Updated all examples, tutorials, and the benchmark. Dropping the async variants due to the merge * Introduced `Configuration` object deprecating using an `array` for client configuration Breaking changes: * Raised minimum PHP version to 8.1+ unlocking the use of fibers * Swapped [`react/promise`](https://reactphp.org/promise/) v2 with v3 * Dropped Event Loop injection and replaced it with the global loop accessor ```diff <?php -use Bunny\Async\Client; +use Bunny\Client; -use React\EventLoop\Factory; require dirname(__DIR__, 2) . '/vendor/autoload.php'; -$loop = Factory::create(); -(new Client($loop))->connect(); +$client = new Client(); -$loop->run(); ``` * Merged `Async` and `Sync` clients into `Client` utilizing fibers through [`react/async`](https://reactphp.org/async/) Sync `receive.php`: ```diff <?php use Bunny\Channel; use Bunny\Client; use Bunny\Message; require dirname(__DIR__, 2) . '/vendor/autoload.php'; -$client = (new Client())->connect(); +$client = new Client(); $channel = $client->channel(); $channel->queueDeclare('hello', false, false, false, false); echo ' [*] Waiting for messages. To exit press CTRL+C', "\n"; -$channel->run( +$channel->consume( function (Message $message, Channel $channel) { echo " [x] Received ", $message->content, "\n"; }, 'hello', '', false, true, ); ``` `send.php`: ```diff <?php use Bunny\Client; require dirname(__DIR__, 2) . '/vendor/autoload.php'; -$client = (new Client())->connect(); +$client = new Client(); $channel = $client->channel(); $channel->queueDeclare('hello', false, false, false, false); $channel->close(); $channel->publish('Hello World!', [], '', 'hello'); echo " [x] Sent 'Hello World!'\n"; $channel->close(); $client->disconnect(); ``` Async `receive-async.php`: ```diff <?php use Bunny\Channel; -use Bunny\Async\Client; +use Bunny\Client; use Bunny\Message; -use React\EventLoop\Factory; require dirname(__DIR__, 2) . '/vendor/autoload.php'; -$loop = Factory::create(); -(new Client($loop))->connect() +$client = new Client(); -->then(function (Client $client) { - return $client->channel(); -}) +$channel = $client->channel(); -->then(function (Channel $channel) { - return $channel->queueDeclare('hello', false, false, false, false)->then(function () use ($channel) { - return $channel; - }); -}) +$channel->queueDeclare('hello', false, false, false, false); -->then(function (Channel $channel) { - echo ' [*] Waiting for messages. To exit press CTRL+C', "\n"; - $channel->consume( - function (Message $message, Channel $channel, Client $client) { - echo " [x] Received ", $message->content, "\n"; - }, - 'hello', - '', - false, - true - ); -}); +echo ' [*] Waiting for messages. To exit press CTRL+C', "\n"; +$channel->consume( + function (Message $message, Channel $channel) { + echo " [x] Received ", $message->content, "\n"; + }, + 'hello', + '', + false, + true, +); -$loop->run(); ``` `send-async.php`: ```diff <?php -use Bunny\Channel; -use Bunny\Async\Client; +use Bunny\Client; -use React\EventLoop\Factory; require dirname(__DIR__, 2) . '/vendor/autoload.php'; -$loop = Factory::create(); -(new Client($loop))->connect() +$client = new Client(); -->then(function (Client $client) { - return $client->channel(); -}) +$channel = $client->channel(); -->then(function (Channel $channel) { - return $channel->queueDeclare('hello', false, false, false, false)->then(function () use ($channel) { - return $channel; - }); -}) +$channel->queueDeclare('hello', false, false, false, false); -->then(function (Channel $channel) { - echo " [x] Sending 'Hello World!'\n"; - return $channel->publish('Hello World!', [], '', 'hello')->then(function () use ($channel) { - return $channel; - }); -}) +$channel->publish('Hello World!', [], '', 'hello'); -->then(function (Channel $channel) { - echo " [x] Sent 'Hello World!'\n"; - $client = $channel->getClient(); - return $channel->close()->then(function () use ($client) { - return $client; - }); -}) +echo " [x] Sent 'Hello World!'\n"; +$channel->close(); -->then(function (Client $client) { - $client->disconnect(); -}); +$client->disconnect(); ``` * Channel::queueBind arguments `string $queue` and `string $exchange` switched argument locations ```diff <?php use Bunny\Channel; use Bunny\Client; use Bunny\Message; require dirname(__DIR__, 2) . '/vendor/autoload.php'; $client = new Client(); $channel = $client->channel(); $channel->exchangeDeclare('logs', 'fanout'); $queue = $channel->queueDeclare('', false, false, true, false); -$channel->queueBind($queue->queue, 'logs'); +$channel->queueBind('logs', $queue->queue); ``` ====== - Total issues resolved: **1** - Total pull requests resolved: **32** - Total contributors: **5** enhancement ----------- - [190: Drop react-amqp from readme](#190) thanks to @WyriHaximus - [189: [0.6.x] CI Optimizations](#189) thanks to @WyriHaximus - [187: [0.6.x] Tidy up readme](#187) thanks to @WyriHaximus - [186: [0.6.x] Update benchmark numbers](#186) thanks to @WyriHaximus - [185: [0.6.x] Improve benchmark outputs](#185) thanks to @WyriHaximus - [184: [0.6.x] Make Connection::onHeartbeat private](#184) thanks to @WyriHaximus - [182: [0.6.x] Change SSL to TLS](#182) thanks to @WyriHaximus - [181: [0.6.x] Refactor configuration internals](#181) thanks to @WyriHaximus - [180: [0.6.x] Optional loop instance to client](#180) thanks to @tomas-novotny - [177: [0.6.x] Update the minimum PHP version mention in the readme to 8.1](#177) thanks to @WyriHaximus - [176: [0.6.x] Add Configuration object](#176) thanks to @WyriHaximus - [172: [0.6.x] One command local testing](#172) thanks to @WyriHaximus - [167: Better typehints](#167) thanks to @tomas-novotny - [166: Update code style](#166) thanks to @tomas-novotny - [165: Support int64 in arguments](#165) thanks to @tomas-novotny - [163: Missing methods to ChannelInterface](#163) thanks to @tomas-novotny - [160: Test against RabbitMQ 4](#160) thanks to @WyriHaximus - [154: Replace `*Enum` classes with a native Enums](#154) thanks to @jeromegamez - [152: Generate better connections](#152) thanks to @jeromegamez - [150: Add support for setting client properties](#150) thanks to @jeromegamez - [143: react/promise 3.0 support?](#143) thanks to @lookyman - [153: Replace `elseif`s with early returns in `Connection`](#153) thanks to @jeromegamez - [148: Allow CI workflow to be manually triggered](#148) thanks to @WyriHaximus bug --- - [188: [0.6.x] Run CI on pushes to 0.6.x branch](#188) thanks to @WyriHaximus - [183: [0.6.x] Local development TLS fixes](#183) thanks to @WyriHaximus - [173: [0.6.x] Strengthen channel consume test assertations](#173) thanks to @WyriHaximus - [169: [0.6.x] Wait for connection to fully open while opening channel](#169) thanks to @WyriHaximus - [164: Consume should only process one message at a time](#164) thanks to @WyriHaximus - [162: Remove implicit nullable typehints for PHP 8.4 compatibility](#162) thanks to @janlanger feature ------- - [171: [0.6.x] Concurrent consuming](#171) thanks to @WyriHaximus bug,enhancement --------------- - [170: [0.6.x] Await for connection in async](#170) thanks to @tomas-novotny enhancement,feature ------------------- - [147: Rebuild into async only with sync API](#147) thanks to @WyriHaximus
v0.5.6 ====== - Total issues resolved: **0** - Total pull requests resolved: **3** - Total contributors: **3** bug --- - [175: PHP 8.4: Implicitly marking parameter X as nullable is deprecated, the explicit nullable type must be used instead in](#175) thanks to @radimvaculik - [120: Fix drop connection by RabbitMQ](#120) thanks to @viras777 enhancement ----------- - [132: Add support for setting client properties](#132) thanks to @jeromegamez
Changelog generated: v0.5.5 ====== - Total issues resolved: **0** - Total pull requests resolved: **3** - Total contributors: **3** enhancement ----------- - [140: Add .github, examples and docker to .gitattributes](#140) thanks to @VincentLanglet - [138: Add PHPStan to the project and CI](#138) thanks to @realFlowControl - [137: #136: Adding documentation to connect to quorum queues](#137) thanks to @MTijn
v0.5.3 ====== - Total issues resolved: **0** - Total pull requests resolved: **2** - Total contributors: **2** enhancement ----------- - [129: Update docker-compose setup to PHP 8.2](#129) thanks to @mermshaus - [126: Call HB if communication is still active](#126) thanks to @roman-huliak
v0.5.2 ====== - Total issues resolved: **0** - Total pull requests resolved: **4** - Total contributors: **3** enhancement ----------- - [128: Add test to illustrate #125 (stream_select/interrupt issue). Also a fix](#128) thanks to @mermshaus - [127: Update tests to work in PHP 8 Docker Compose setup](#127) thanks to @mermshaus - [106: Migrate to GitHub Actions](#106) thanks to @WyriHaximus - [125: Case insensitive error_get_last() check](#125) thanks to @wizu
The release adds PHP 8 support! (Thanks to @edudobay for filing #102)  Additionally, this release also includes queue clean up between tests by @sanderheijselaar in #103.
PreviousNext