Skip to content

Commit

Permalink
#68: Drop ext driver
Browse files Browse the repository at this point in the history
  • Loading branch information
tim committed Mar 26, 2018
1 parent 25940b9 commit 463d006
Show file tree
Hide file tree
Showing 17 changed files with 8 additions and 810 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"require": {
"php": "~7.0.0",
"php-amqplib/php-amqplib": "~2.6.3",
"lizards-and-pumpkins/catalog": "~3.1.0"
"lizards-and-pumpkins/catalog": "^3.0.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0",
Expand Down
9 changes: 2 additions & 7 deletions src/AmqpFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use LizardsAndPumpkins\Messaging\MessageQueueFactory;
use LizardsAndPumpkins\Messaging\Queue;
use LizardsAndPumpkins\Messaging\Queue\Amqp\Driver\DriverFactoryLocator;
use LizardsAndPumpkins\Messaging\Queue\Amqp\Driver\AmqpLib\AmqpLibFactory;
use LizardsAndPumpkins\Util\Factory\FactoryWithCallback;
use LizardsAndPumpkins\Util\Factory\FactoryWithCallbackTrait;
use LizardsAndPumpkins\Util\Factory\MasterFactory;
Expand All @@ -17,12 +17,7 @@ class AmqpFactory implements MessageQueueFactory, FactoryWithCallback

public function factoryRegistrationCallback(MasterFactory $masterFactory)
{
$masterFactory->register($this->createDriverFactoryLocator()->getDriverFactory());
}

public function createDriverFactoryLocator() : DriverFactoryLocator
{
return new DriverFactoryLocator();
$masterFactory->register(new AmqpLibFactory());
}

public function createAmqpQueue(string $name) : AmqpQueue
Expand Down
25 changes: 0 additions & 25 deletions src/Driver/AmqpExt/AmpqExtQueueFactory.php

This file was deleted.

128 changes: 0 additions & 128 deletions src/Driver/AmqpExt/AmqpExtFactory.php

This file was deleted.

55 changes: 0 additions & 55 deletions src/Driver/AmqpExt/AmqpExtReader.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Driver/AmqpExt/AmqpExtWriter.php

This file was deleted.

18 changes: 0 additions & 18 deletions src/Driver/DriverFactoryLocator.php

This file was deleted.

6 changes: 5 additions & 1 deletion tests/Integration/Suite/Driver/AmqpDriverTestIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ protected function tearDown()
public static function tearDownAfterClass()
{
if (! self::$skipTearDownAfterClass) {
$reader = static::createMasterFactoryWithAmqpDriver()->createAmqpReader(static::getQueueName());
/** @var MasterFactory|AmqpDriverFactory $masterFactoryWithAmqpDriver */
$masterFactoryWithAmqpDriver = static::createMasterFactoryWithAmqpDriver();
$reader = $masterFactoryWithAmqpDriver->createAmqpReader(static::getQueueName());
$reader->deleteQueue();
}
}
Expand Down Expand Up @@ -183,11 +185,13 @@ public function testConsumesMessagesWithMultipleReaders()

public function testCanReadMessagesWrittenViaAnotherConnection()
{
/** @var MasterFactory|AmqpDriverFactory $masterFactoryWriteConnection */
$masterFactoryWriteConnection = static::createMasterFactoryWithAmqpDriver();
$writer = $masterFactoryWriteConnection->createAmqpWriter(static::getQueueName());
$writer->addMessage('foo');
$this->closeConnection($masterFactoryWriteConnection);

/** @var MasterFactory|AmqpDriverFactory $masterFactoryReadConnection */
$masterFactoryReadConnection = static::createMasterFactoryWithAmqpDriver();
$reader = $masterFactoryReadConnection->createAmqpReader(static::getQueueName());
$this->assertNextConsumedMessageSame('foo', $reader);
Expand Down
36 changes: 0 additions & 36 deletions tests/Integration/Suite/Driver/AmqpExtTest.php

This file was deleted.

Loading

0 comments on commit 463d006

Please sign in to comment.