From ac87e0db2ac5db90f1b0639a2d31c7098b4eaa20 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 14 Sep 2016 10:17:22 +0200 Subject: [PATCH] AMPQ -> AMQP --- app/config/config.yml | 8 ++++---- ...PQEntryConsumer.php => AMQPEntryConsumer.php} | 2 +- .../ImportBundle/Resources/config/rabbit.yml | 16 ++++++++-------- ...onsumerTest.php => AMQPEntryConsumerTest.php} | 10 +++++----- 4 files changed, 18 insertions(+), 18 deletions(-) rename src/Wallabag/ImportBundle/Consumer/{AMPQEntryConsumer.php => AMQPEntryConsumer.php} (82%) rename tests/Wallabag/ImportBundle/Consumer/{AMPQEntryConsumerTest.php => AMQPEntryConsumerTest.php} (96%) diff --git a/app/config/config.yml b/app/config/config.yml index e18a932d..4b869c4f 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -254,7 +254,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.pocket' - callback: wallabag_import.consumer.ampq.pocket + callback: wallabag_import.consumer.amqp.pocket import_readability: connection: default exchange_options: @@ -262,7 +262,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.readability' - callback: wallabag_import.consumer.ampq.readability + callback: wallabag_import.consumer.amqp.readability import_wallabag_v1: connection: default exchange_options: @@ -270,7 +270,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.wallabag_v1' - callback: wallabag_import.consumer.ampq.wallabag_v1 + callback: wallabag_import.consumer.amqp.wallabag_v1 import_wallabag_v2: connection: default exchange_options: @@ -278,4 +278,4 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.wallabag_v2' - callback: wallabag_import.consumer.ampq.wallabag_v2 + callback: wallabag_import.consumer.amqp.wallabag_v2 diff --git a/src/Wallabag/ImportBundle/Consumer/AMPQEntryConsumer.php b/src/Wallabag/ImportBundle/Consumer/AMQPEntryConsumer.php similarity index 82% rename from src/Wallabag/ImportBundle/Consumer/AMPQEntryConsumer.php rename to src/Wallabag/ImportBundle/Consumer/AMQPEntryConsumer.php index d95a011d..5aaa8c03 100644 --- a/src/Wallabag/ImportBundle/Consumer/AMPQEntryConsumer.php +++ b/src/Wallabag/ImportBundle/Consumer/AMQPEntryConsumer.php @@ -5,7 +5,7 @@ namespace Wallabag\ImportBundle\Consumer; use OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface; use PhpAmqpLib\Message\AMQPMessage; -class AMPQEntryConsumer extends AbstractConsumer implements ConsumerInterface +class AMQPEntryConsumer extends AbstractConsumer implements ConsumerInterface { /** * {@inheritdoc} diff --git a/src/Wallabag/ImportBundle/Resources/config/rabbit.yml b/src/Wallabag/ImportBundle/Resources/config/rabbit.yml index f09dda0d..aa049749 100644 --- a/src/Wallabag/ImportBundle/Resources/config/rabbit.yml +++ b/src/Wallabag/ImportBundle/Resources/config/rabbit.yml @@ -1,28 +1,28 @@ # RabbitMQ stuff services: - wallabag_import.consumer.ampq.pocket: - class: Wallabag\ImportBundle\Consumer\AMPQEntryConsumer + wallabag_import.consumer.amqp.pocket: + class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer arguments: - "@doctrine.orm.entity_manager" - "@wallabag_user.user_repository" - "@wallabag_import.pocket.import" - "@logger" - wallabag_import.consumer.ampq.readability: - class: Wallabag\ImportBundle\Consumer\AMPQEntryConsumer + wallabag_import.consumer.amqp.readability: + class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer arguments: - "@doctrine.orm.entity_manager" - "@wallabag_user.user_repository" - "@wallabag_import.readability.import" - "@logger" - wallabag_import.consumer.ampq.wallabag_v1: - class: Wallabag\ImportBundle\Consumer\AMPQEntryConsumer + wallabag_import.consumer.amqp.wallabag_v1: + class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer arguments: - "@doctrine.orm.entity_manager" - "@wallabag_user.user_repository" - "@wallabag_import.wallabag_v1.import" - "@logger" - wallabag_import.consumer.ampq.wallabag_v2: - class: Wallabag\ImportBundle\Consumer\AMPQEntryConsumer + wallabag_import.consumer.amqp.wallabag_v2: + class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer arguments: - "@doctrine.orm.entity_manager" - "@wallabag_user.user_repository" diff --git a/tests/Wallabag/ImportBundle/Consumer/AMPQEntryConsumerTest.php b/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php similarity index 96% rename from tests/Wallabag/ImportBundle/Consumer/AMPQEntryConsumerTest.php rename to tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php index b13ade1d..a3263771 100644 --- a/tests/Wallabag/ImportBundle/Consumer/AMPQEntryConsumerTest.php +++ b/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php @@ -2,12 +2,12 @@ namespace Tests\Wallabag\ImportBundle\Consumer\AMQP; -use Wallabag\ImportBundle\Consumer\AMPQEntryConsumer; +use Wallabag\ImportBundle\Consumer\AMQPEntryConsumer; use PhpAmqpLib\Message\AMQPMessage; use Wallabag\UserBundle\Entity\User; use Wallabag\CoreBundle\Entity\Entry; -class AMPQEntryConsumerTest extends \PHPUnit_Framework_TestCase +class AMQPEntryConsumerTest extends \PHPUnit_Framework_TestCase { public function testMessageOk() { @@ -112,7 +112,7 @@ JSON; ->with(json_decode($body, true)) ->willReturn($entry); - $consumer = new AMPQEntryConsumer( + $consumer = new AMQPEntryConsumer( $em, $userRepository, $import @@ -157,7 +157,7 @@ JSON; ->disableOriginalConstructor() ->getMock(); - $consumer = new AMPQEntryConsumer( + $consumer = new AMQPEntryConsumer( $em, $userRepository, $import @@ -212,7 +212,7 @@ JSON; ->with(json_decode($body, true)) ->willReturn(null); - $consumer = new AMPQEntryConsumer( + $consumer = new AMQPEntryConsumer( $em, $userRepository, $import -- 2.41.0