Releases: jakubkulhan/bunny
Releases · jakubkulhan/bunny
v0.6.0-alpha.2
Since v0.6.0-alpha.1
Non-Breaking Changes:
- Added support for DSNs
DSN
To make configuration simple, and support existing standards, DSN (configuration by URL) has been added:
use Bunny\Client;
use Bunny\Configuration;
$configuration = Configuration::fromDSN('amqp://USERNAME:PASSWORD@HOSTNAME/VHOST');
$bunny = new Client($configuration);
$bunny->connect();With TLS support:
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
enhancement
- 195: [0.6.x] Include benchmark, examples, and tutorial in PHPCS runs thanks to @WyriHaximus
- 194: [0.6.x] Add support for creating Configuration from DSN thanks to @WyriHaximus
- 193: [0.6.x] Make it abundantly clear Bunny must run in a fiber thanks to @WyriHaximus
Full 0.6.0 change set so far:
======
- Total issues resolved: 1
- Total pull requests resolved: 35
- Total contributors: 5
bug
- 196: [0.6.x] Handle channel closing mid handling a message thanks to @WyriHaximus
- 188: [0.6.x] Run CI on pushes to 0.6.x branch thanks to @WyriHaximus
- 183: [0.6.x] Local development TLS fixes thanks to @WyriHaximus
- 173: [0.6.x] Strengthen channel consume test assertations thanks to @WyriHaximus
- 169: [0.6.x] Wait for connection to fully open while opening channel thanks to @WyriHaximus
- 164: Consume should only process one message at a time thanks to @WyriHaximus
- 162: Remove implicit nullable typehints for PHP 8.4 compatibility thanks to @janlanger
enhancement
- 195: [0.6.x] Include benchmark, examples, and tutorial in PHPCS runs thanks to @WyriHaximus
- 194: [0.6.x] Add support for creating Configuration from DSN thanks to @WyriHaximus
- 193: [0.6.x] Make it abundantly clear Bunny must run in a fiber thanks to @WyriHaximus
- 190: Drop react-amqp from readme thanks to @WyriHaximus
- 189: [0.6.x] CI Optimizations thanks to @WyriHaximus
- 187: [0.6.x] Tidy up readme thanks to @WyriHaximus
- 186: [0.6.x] Update benchmark numbers thanks to @WyriHaximus
- 185: [0.6.x] Improve benchmark outputs thanks to @WyriHaximus
- 184: [0.6.x] Make Connection::onHeartbeat private thanks to @WyriHaximus
- 182: [0.6.x] Change SSL to TLS thanks to @WyriHaximus
- 181: [0.6.x] Refactor configuration internals thanks to @WyriHaximus
- 180: [0.6.x] Optional loop instance to client thanks to @tomas-novotny
- 177: [0.6.x] Update the minimum PHP version mention in the readme to 8.1 thanks to @WyriHaximus
- 176: [0.6.x] Add Configuration object thanks to @WyriHaximus
- 172: [0.6.x] One command local testing thanks to @WyriHaximus
- 167: Better typehints thanks to @tomas-novotny
- 166: Update code style thanks to @tomas-novotny
- 165: Support int64 in arguments thanks to @tomas-novotny
- 163: Missing methods to ChannelInterface thanks to @tomas-novotny
- 160: Test against RabbitMQ 4 thanks to @WyriHaximus
- 154: Replace
*Enumclasses with a native Enums thanks to @jeromegamez - 152: Generate better connections thanks to @jeromegamez
- 150: Add support for setting client properties thanks to @jeromegamez
- 148: Allow CI workflow to be manually triggered thanks to @WyriHaximus
- 143: react/promise 3.0 support? thanks to @lookyman
feature
bug,enhancement
-
170: [0.6.x] Await for connection in async thanks to @tomas-novotny
-
153: Replace
elseifs with early returns inConnectionthanks to @jeromegamez
enhancement,feature
v0.6.0-alpha.1
Non-Breaking Changes:
- Merged clients into one
- Marked
ClientandChannelfinalthrough doc block and introduced interfaces for them for unit testing - Dropped build in event loop, socket, and stream handling switching to
react/event-loop,react/socket, andreact/streamfor 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
Configurationobject deprecating using anarrayfor client configuration
Breaking changes:
- Raised minimum PHP version to 8.1+ unlocking the use of fibers
- Swapped
react/promisev2 with v3 - Dropped Event Loop injection and replaced it with the global loop accessor
<?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
AsyncandSyncclients intoClientutilizing fibers throughreact/async
Sync
receive.php:
<?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:
<?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:
<?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:
<?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 $queueandstring $exchangeswitched argument locations
<?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 thanks to @WyriHaximus
- 189: [0.6.x] CI Optimizations thanks to @WyriHaximus
- 187: [0.6.x] Tidy up readme thanks to @WyriHaximus
- 186: [0.6.x] Update benchmark numbers thanks to @WyriHaximus
- 185: [0.6.x] Improve benchmark outputs thanks to @WyriHaximus
- 184: [0.6.x] Make Connection::onHeartbeat private thanks to @WyriHaximus
- 182: [0.6.x] Change SSL to TLS thanks to @WyriHaximus
- 181: [0.6.x] Refactor configuration internals thanks to @WyriHaximus
- 180: [0.6.x] Optional loop instance to client thanks to @tomas-novotny
- 177: [0.6.x] Update the minimum PHP version mention in the readme to 8.1 thanks to @WyriHaximus
- 176: [0.6.x] Add Configuration object thanks to @WyriHaximus
- 172: [0.6.x] One command local testing thanks to @WyriHaximus
- 167: Better typehints thanks to @tomas-novotny
- 166: Update code style thanks to @tomas-novotny
- 165: Support int64 in arguments thanks to @tomas-novotny
- 163: Missing methods to ChannelInterface thanks to @tomas-novotny
- 160: Test against RabbitMQ 4 thanks to @WyriHaximus
- 154: Replace
*Enumclasses with a native Enums thanks to @jeromegamez - 152: Generate better connections thanks to @jeromegamez
- 150: Add support for setting client properties thanks to @jeromegamez
- 143: react/promise 3.0 support? thanks to @lookyman
- 153: Replace
elseifs with early returns inConnectionthanks to @jeromegamez - 148: Allow CI workflow to be manually triggered thanks to @WyriHaximus
bug
- 188: [0.6.x] Run CI on pushes to 0.6.x branch thanks to @WyriHaximus
- 183: [0.6.x] Local development TLS fixes thanks to @WyriHaximus
- 173: [0.6.x] Strengthen channel consume test assertations thanks to @WyriHaximus
- 169: [0.6.x] Wait for connection to fully open while opening channel thanks to @WyriHaximus
- 164: Consume should only process one message at a time thanks to @WyriHaximus
- 162: Remove implicit nullable typehints for PHP 8.4 compatibility thanks to @janlanger
feature
bug,enhancement
enhancement,feature
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 thanks to @radimvaculik
- 120: Fix drop connection by RabbitMQ thanks to @viras777
enhancement
v0.5.5
v0.5.5
- Total issues resolved: 0
- Total pull requests resolved: 3
- Total contributors: 3
enhancement
v0.5.4
v0.5.4
- Total issues resolved: 0
- Total pull requests resolved: 1
- Total contributors: 1
bug
v0.5.3
v0.5.3
- Total issues resolved: 0
- Total pull requests resolved: 2
- Total contributors: 2
enhancement
v0.5.2
v0.5.2
- Total issues resolved: 0
- Total pull requests resolved: 4
- Total contributors: 3
enhancement
v0.5.1
Removed unused psr/log thanks to @snapshotpl (#117)
v0.5.0
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.
