Skip to content

Commit

Permalink
Merge pull request #5 from cdn77/drop-consistence
Browse files Browse the repository at this point in the history
Drop consistence
  • Loading branch information
simPod authored Aug 19, 2020
2 parents 5348302 + 1a3302f commit e4777f4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require": {
"php": "^7.2",
"bunny/bunny": "^0.4.1",
"consistence/consistence": "^2.0",
"myclabs/php-enum": "^1.7",
"react/promise": "^2.0",
"symfony/config": "^4.3|^5.0",
"symfony/console": "^4.3|^5.0",
Expand Down
3 changes: 2 additions & 1 deletion src/RabbitMQ/DeliveryMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

namespace Cdn77\RabbitMQBundle\RabbitMQ;

use Consistence\Enum\Enum;
use MyCLabs\Enum\Enum;

/** @extends Enum<int> */
final class DeliveryMode extends Enum
{
public const TRANSIENT = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/RabbitMQ/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static function fromConfiguration(string $name, array $configuration) : s
{
return new self(
$name,
ExchangeType::get($configuration[Configuration::KEY_EXCHANGE_TYPE] ?? ExchangeType::DIRECT),
new ExchangeType($configuration[Configuration::KEY_EXCHANGE_TYPE] ?? ExchangeType::DIRECT),
$configuration[Configuration::KEY_EXCHANGE_DURABLE] ?? false,
$configuration[Configuration::KEY_EXCHANGE_AUTO_DELETE] ?? false,
$configuration[Configuration::KEY_EXCHANGE_INTERNAL] ?? false,
Expand Down
3 changes: 2 additions & 1 deletion src/RabbitMQ/ExchangeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

namespace Cdn77\RabbitMQBundle\RabbitMQ;

use Consistence\Enum\Enum;
use MyCLabs\Enum\Enum;

/** @extends Enum<string> */
final class ExchangeType extends Enum
{
public const DIRECT = 'direct';
Expand Down
2 changes: 1 addition & 1 deletion tests/ConsumerRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function tearDown() : void
*/
public function testMaxMessagesLimit(int $maxMessages) : void
{
$exchange = new Exchange('test', ExchangeType::get(ExchangeType::DIRECT));
$exchange = new Exchange('test', new ExchangeType(ExchangeType::DIRECT));
$queue = new Queue('testQueue');
$routingKey = 'a_routing_key';
$topology = new Topology(
Expand Down

0 comments on commit e4777f4

Please sign in to comment.