From 1926673521d96da937f081ece2e5ebf93601ee54 Mon Sep 17 00:00:00 2001 From: Alexander Kozienko Date: Mon, 5 Nov 2018 10:04:51 +0200 Subject: [PATCH 01/13] compatibility with 0.9x --- pkg/enqueue/Client/Producer.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/enqueue/Client/Producer.php b/pkg/enqueue/Client/Producer.php index 8fda47ff6..5e0f16836 100644 --- a/pkg/enqueue/Client/Producer.php +++ b/pkg/enqueue/Client/Producer.php @@ -8,6 +8,12 @@ class Producer implements ProducerInterface { + /** + * compatibility with 0.9x + */ + const TOPIC_09X = 'enqueue.topic'; + const COMMAND_09X = 'enqueue.command'; + /** * @var DriverInterface */ @@ -54,6 +60,7 @@ public function sendEvent($topic, $message) $this->prepareBody($message); $message->setProperty(Config::PARAMETER_TOPIC_NAME, $topic); + $message->setProperty(self::TOPIC_09X, $topic); if (!$message->getMessageId()) { $message->setMessageId(UUID::generate()); @@ -119,6 +126,7 @@ public function sendCommand($command, $message, $needReply = false) $message->setProperty(Config::PARAMETER_TOPIC_NAME, Config::COMMAND_TOPIC); $message->setProperty(Config::PARAMETER_COMMAND_NAME, $command); + $message->setProperty(self::COMMAND_09X, $command); $message->setScope(Message::SCOPE_APP); $this->sendEvent(Config::COMMAND_TOPIC, $message); From f810d5e26b38beb70b06d89d814ddec4d8f3f5f0 Mon Sep 17 00:00:00 2001 From: Alexander Kozienko Date: Mon, 5 Nov 2018 10:24:49 +0200 Subject: [PATCH 02/13] compatibility with 0.9x --- pkg/enqueue/Tests/Client/ProducerTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/enqueue/Tests/Client/ProducerTest.php b/pkg/enqueue/Tests/Client/ProducerTest.php index c9a30fcde..0716dc50d 100644 --- a/pkg/enqueue/Tests/Client/ProducerTest.php +++ b/pkg/enqueue/Tests/Client/ProducerTest.php @@ -44,6 +44,7 @@ public function testShouldSendMessageToRouter() $expectedProperties = [ 'enqueue.topic_name' => 'topic', + 'enqueue.topic' => 'topic', ]; self::assertEquals($expectedProperties, $message->getProperties()); From 5b6d5c457c2287ab853bddbfba27314320a39ef3 Mon Sep 17 00:00:00 2001 From: Alexander Kozienko Date: Mon, 5 Nov 2018 12:42:54 +0200 Subject: [PATCH 03/13] fix amqp ssl certs --- pkg/enqueue/Client/Producer.php | 2 +- var/rabbitmq_certificates/cert.pem | 30 +++++++++--------- var/rabbitmq_certificates/key.pem | 50 +++++++++++++++--------------- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/pkg/enqueue/Client/Producer.php b/pkg/enqueue/Client/Producer.php index 5e0f16836..ea385efab 100644 --- a/pkg/enqueue/Client/Producer.php +++ b/pkg/enqueue/Client/Producer.php @@ -9,7 +9,7 @@ class Producer implements ProducerInterface { /** - * compatibility with 0.9x + * compatibility with 0.9x. */ const TOPIC_09X = 'enqueue.topic'; const COMMAND_09X = 'enqueue.command'; diff --git a/var/rabbitmq_certificates/cert.pem b/var/rabbitmq_certificates/cert.pem index 8626b0ca5..12b395936 100644 --- a/var/rabbitmq_certificates/cert.pem +++ b/var/rabbitmq_certificates/cert.pem @@ -1,18 +1,18 @@ -----BEGIN CERTIFICATE----- -MIIC5TCCAc2gAwIBAgIBAjANBgkqhkiG9w0BAQsFADATMREwDwYDVQQDDAhNeVRl -c3RDQTAeFw0xNzExMDExMzE1NDBaFw0xODExMDExMzE1NDBaMCgxFTATBgNVBAMM -DGNiNzA0YmRhYWZjNjEPMA0GA1UECgwGY2xpZW50MIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEAxLvg5RmUO3Ws+9D0Xh1l0k5Hg30jUWcyV4nCX2wJgxz5 -mjApsEYqSytE3Sr63Otl+yUugoL8gPdO7eWslWJycIWKFEWOmE7G3V89kjAd/sNP -U6Wo2j4T9pCRLogOuq54SPEEdn2HGPr+JaUYRvdsXZmLy6Wa1dnx3UemxKirKpmo -uxkqTfycZFKq8RQsOrMqMtZFExgN++ylNMDcl7rYG3cYduKN9uB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7MEXQ3wk1L1SzRz57a3r+rBIMHBNEkakAoq9VmzKLA -y6xpRqt0+CnvmQ9OIdY4jxUMVXxcQGjUnw== +AQsFAAOCAQEA16hw/R7sZ5d0ykwKFzcjYSN+Dl8mnka1PRfVGqxFluahytbvD3Ns +yzhdXD4iaTumuVqjyOSe7WfA4hE1Nb1aW2H6GhEzqDsFo/usmC6H6zH9HXVtI9wM +l7sa7THWh1BTNssRBtihpjhjlWzU6eQd7F7O3rhPoM0FeZ7S78ZCo8R86p72xaKg +Ttx+CNfUyvDEY35Jh5kYg/VW0V1/M6zsif0xEbSYTmEkirS4exdrk8Hy5q70V8ZN +UEHxXOcQRN+Y+SP8xFUWNjpRO/+P+ZapvXUd47FnZ12Hxyp9V+V1yqO24mv4RzpO +AMpTn8botOTbuvQXqzr398uOwxZ7RlTzIg== -----END CERTIFICATE----- diff --git a/var/rabbitmq_certificates/key.pem b/var/rabbitmq_certificates/key.pem index cc4315e85..8ec88ecd8 100644 --- a/var/rabbitmq_certificates/key.pem +++ b/var/rabbitmq_certificates/key.pem @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEAxLvg5RmUO3Ws+9D0Xh1l0k5Hg30jUWcyV4nCX2wJgxz5mjAp -sEYqSytE3Sr63Otl+yUugoL8gPdO7eWslWJycIWKFEWOmE7G3V89kjAd/sNPU6Wo -2j4T9pCRLogOuq54SPEEdn2HGPr+JaUYRvdsXZmLy6Wa1dnx3UemxKirKpmouxkq -TfycZFKq8RQsOrMqMtZFExgN++ylNMDcl7rYG3cYduKN9uBq5Fwcl5oan76fNvTn -W++bolSOVa6wKTfPt9a+XcsAxx+XSrWx17HaegrTFMizFxTWOwqfNVCTmJkDrI4G -Yoat1ymHlb5v0MQRaMSWi+USLmrKIEUqXbwHJwIDAQABAoIBAQCwhbPBXTY4M9pH -CLJ7T/1wunRIcxwhimsNSLpzTEksr+72foipdgu07toXaN03JLCYrEATMtzGCyFz -LEWytGbit6+xiM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KBkavbrXFHKLU1R4ZDLtqgxlFtDYBTt+xyn +54GEwZV0FNVK/mRRRq8yWpTTXhflCN0xvO+PRU0CgYAKJKNMU9sPWSHkIUYPi7W+ +VDlDJ2NTkpvLz4RXbNVYGX99mzJ9Kfby4JWv6OUw/kAfXUESM1TJggfOvTM7Kt0B +88DCzK4434HKQAQ96SHzmVjtIuVcHtKY2dR4oQmnkU7+Gr5X0fS4xhMif9zcxoiD +U/I7U329S8m/XrgZls2gQQKBgB4a3ft9U5hWJb0NrCA3Mt9rcP8YBDlrZODKgH18 +Uq6Sjh3gyjfxhfG7ycEbAN6n3OHuFVA7qefJFSAE2XBGmHxkrSyNiSIF6LJ2PAem +285msqRap8t4zoQdlbwcdLv8xozwcGuktp7YWGBO5/63t8f8XkV3jo+/0uHiWSay +6E+ZAoGBAOk0eYTLurIylLQH0uEuy55wY4u79mb2ukFSQqa6iXU55ZExXd8Dphqu +nDy1NuxoCR8fbfhtr7Ea0RhKJJKqBNhK6r48ZgYsSwFsXPDvlAstnT7ZYe2tyszg +HBby3tmlpiNLFrR9e7RMpWxB+7Myu8bWPbLI1WcbbLkTbA63XKqy -----END RSA PRIVATE KEY----- From 6670d70cc9ab99a0b0bac1d236af79e4f830062f Mon Sep 17 00:00:00 2001 From: Alexander Kozienko Date: Mon, 5 Nov 2018 13:57:03 +0200 Subject: [PATCH 04/13] fix tests --- .../Tests/Functional/Client/ProducerTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/enqueue-bundle/Tests/Functional/Client/ProducerTest.php b/pkg/enqueue-bundle/Tests/Functional/Client/ProducerTest.php index 971b803ef..a2e55fc24 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Client/ProducerTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Client/ProducerTest.php @@ -93,6 +93,9 @@ public function testShouldSendMessageInstanceAsCommandWithoutNeedForReply() 'enqueue.processor_name' => RouterProcessor::class, 'enqueue.command_name' => 'theCommand', 'enqueue.processor_queue_name' => 'default', + // compatibility with 0.9x + 'enqueue.command' => 'theCommand', + 'enqueue.topic' => '__command__', ], $traces[0]['properties']); } @@ -116,6 +119,9 @@ public function testShouldSendExclusiveCommandWithNeedForReply() 'enqueue.processor_name' => 'theExclusiveCommandName', 'enqueue.command_name' => 'theExclusiveCommandName', 'enqueue.processor_queue_name' => 'the_exclusive_command_queue', + // compatibility with 0.9x + 'enqueue.command' => 'theExclusiveCommandName', + 'enqueue.topic' => '__command__', ], $traces[0]['properties']); } @@ -139,6 +145,9 @@ public function testShouldSendMessageInstanceCommandWithNeedForReply() 'enqueue.processor_name' => RouterProcessor::class, 'enqueue.command_name' => 'theCommand', 'enqueue.processor_queue_name' => 'default', + // compatibility with 0.9x + 'enqueue.command' => 'theCommand', + 'enqueue.topic' => '__command__', ], $traces[0]['properties']); } From 01a24448f7e38f64bddfa9d80f530142fa5c4b64 Mon Sep 17 00:00:00 2001 From: Alexander Kozienko Date: Mon, 5 Nov 2018 14:24:06 +0200 Subject: [PATCH 05/13] fix tests --- .../Tests/Functional/Events/AsyncListenerTest.php | 2 ++ .../Tests/Functional/Events/AsyncSubscriberTest.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php index cb1cf7b2e..18cd19bd7 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php @@ -54,6 +54,8 @@ public function testShouldSendMessageToExpectedCommandInsteadOfCallingRealListen $this->assertCount(1, $traces); + var_dump($traces); + $this->assertEquals('symfony_events', $traces[0]['command']); $this->assertEquals('{"subject":"theSubject","arguments":{"fooArg":"fooVal"}}', $traces[0]['body']); } diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php index 4d4eb9240..93f07504c 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php @@ -35,6 +35,8 @@ public function testShouldNotCallRealSubscriberIfMarkedAsAsync() /** @var TestAsyncListener $listener */ $listener = static::$container->get('test_async_subscriber'); + var_dump($listener->calls); + $this->assertEmpty($listener->calls); } From fda9c05b61e08f7bd266769ed6ff2da7cd18e8d9 Mon Sep 17 00:00:00 2001 From: Alexander Kozienko Date: Mon, 5 Nov 2018 15:53:09 +0200 Subject: [PATCH 06/13] fix tests --- pkg/enqueue-bundle/Tests/Functional/Client/ProducerTest.php | 4 ++-- .../Tests/Functional/Events/AsyncListenerTest.php | 4 ++-- .../Tests/Functional/Events/AsyncSubscriberTest.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/enqueue-bundle/Tests/Functional/Client/ProducerTest.php b/pkg/enqueue-bundle/Tests/Functional/Client/ProducerTest.php index a2e55fc24..388cfa2f8 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Client/ProducerTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Client/ProducerTest.php @@ -25,9 +25,9 @@ public function setUp() public function tearDown() { - parent::tearDown(); - static::$container->get(Producer::class)->clearTraces(); + + parent::tearDown(); } public function testCouldBeGetFromContainerAsService() diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php index 18cd19bd7..92f970206 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php @@ -23,6 +23,8 @@ public function setUp() $asyncListener = static::$container->get('enqueue.events.async_listener'); $asyncListener->resetSyncMode(); + static::$container->get('test_async_subscriber')->calls = []; + static::$container->get('test_async_listener')->calls = []; } public function testShouldNotCallRealListenerIfMarkedAsAsync() @@ -54,8 +56,6 @@ public function testShouldSendMessageToExpectedCommandInsteadOfCallingRealListen $this->assertCount(1, $traces); - var_dump($traces); - $this->assertEquals('symfony_events', $traces[0]['command']); $this->assertEquals('{"subject":"theSubject","arguments":{"fooArg":"fooVal"}}', $traces[0]['body']); } diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php index 93f07504c..5bb23f060 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php @@ -23,6 +23,8 @@ public function setUp() $asyncListener = static::$container->get('enqueue.events.async_listener'); $asyncListener->resetSyncMode(); + static::$container->get('test_async_subscriber')->calls = []; + static::$container->get('test_async_listener')->calls = []; } public function testShouldNotCallRealSubscriberIfMarkedAsAsync() @@ -35,8 +37,6 @@ public function testShouldNotCallRealSubscriberIfMarkedAsAsync() /** @var TestAsyncListener $listener */ $listener = static::$container->get('test_async_subscriber'); - var_dump($listener->calls); - $this->assertEmpty($listener->calls); } From fdc27a37b3614e5a6c9b3641b6b9b69b6717be53 Mon Sep 17 00:00:00 2001 From: Alexander Kozienko Date: Mon, 5 Nov 2018 16:22:54 +0200 Subject: [PATCH 07/13] fix tests --- .../Tests/Functional/Events/AsyncListenerTest.php | 11 +++-------- .../Tests/Functional/Events/AsyncProcessorTest.php | 10 +++------- .../Tests/Functional/Events/AsyncSubscriberTest.php | 12 +++--------- 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php index 92f970206..75527f14f 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php @@ -15,16 +15,11 @@ */ class AsyncListenerTest extends WebTestCase { - public function setUp() + protected function tearDown() { - parent::setUp(); + parent::tearDown(); - /** @var AsyncListener $asyncListener */ - $asyncListener = static::$container->get('enqueue.events.async_listener'); - - $asyncListener->resetSyncMode(); - static::$container->get('test_async_subscriber')->calls = []; - static::$container->get('test_async_listener')->calls = []; + static::$container = null; } public function testShouldNotCallRealListenerIfMarkedAsAsync() diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncProcessorTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncProcessorTest.php index 244782c30..4513069a2 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncProcessorTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncProcessorTest.php @@ -2,7 +2,6 @@ namespace Enqueue\Bundle\Tests\Functional\Events; -use Enqueue\AsyncEventDispatcher\AsyncListener; use Enqueue\AsyncEventDispatcher\AsyncProcessor; use Enqueue\Bundle\Tests\Functional\App\TestAsyncListener; use Enqueue\Bundle\Tests\Functional\App\TestAsyncSubscriber; @@ -18,14 +17,11 @@ */ class AsyncProcessorTest extends WebTestCase { - public function setUp() + protected function tearDown() { - parent::setUp(); + parent::tearDown(); - /** @var AsyncListener $asyncListener */ - $asyncListener = static::$container->get('enqueue.events.async_listener'); - - $asyncListener->resetSyncMode(); + static::$container = null; } public function testCouldBeGetFromContainerAsService() diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php index 5bb23f060..c2e9dc0f6 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php @@ -2,7 +2,6 @@ namespace Enqueue\Bundle\Tests\Functional\Events; -use Enqueue\AsyncEventDispatcher\AsyncListener; use Enqueue\Bundle\Tests\Functional\App\TestAsyncListener; use Enqueue\Bundle\Tests\Functional\WebTestCase; use Enqueue\Client\TraceableProducer; @@ -15,16 +14,11 @@ */ class AsyncSubscriberTest extends WebTestCase { - public function setUp() + protected function tearDown() { - parent::setUp(); + parent::tearDown(); - /** @var AsyncListener $asyncListener */ - $asyncListener = static::$container->get('enqueue.events.async_listener'); - - $asyncListener->resetSyncMode(); - static::$container->get('test_async_subscriber')->calls = []; - static::$container->get('test_async_listener')->calls = []; + static::$container = null; } public function testShouldNotCallRealSubscriberIfMarkedAsAsync() From 6f52cddaa839ed354acce2bea87996c3c256372b Mon Sep 17 00:00:00 2001 From: Alexander Kozienko Date: Mon, 5 Nov 2018 16:27:26 +0200 Subject: [PATCH 08/13] fix tests --- pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php index 75527f14f..b9be84e02 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php @@ -2,7 +2,6 @@ namespace Enqueue\Bundle\Tests\Functional\Events; -use Enqueue\Bundle\Events\AsyncListener; use Enqueue\Bundle\Tests\Functional\App\TestAsyncListener; use Enqueue\Bundle\Tests\Functional\WebTestCase; use Enqueue\Client\TraceableProducer; From c1d4eec74484c3f948e6db6213e5eceb03bbe33f Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Mon, 12 Nov 2018 12:24:34 +0100 Subject: [PATCH 09/13] Fixed headline --- pkg/enqueue/Symfony/Client/Meta/QueuesCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/enqueue/Symfony/Client/Meta/QueuesCommand.php b/pkg/enqueue/Symfony/Client/Meta/QueuesCommand.php index 02d263d2b..a1f9f54fe 100644 --- a/pkg/enqueue/Symfony/Client/Meta/QueuesCommand.php +++ b/pkg/enqueue/Symfony/Client/Meta/QueuesCommand.php @@ -47,7 +47,7 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { $table = new Table($output); - $table->setHeaders(['Client Name', 'Transport Name', 'processors']); + $table->setHeaders(['Client Name', 'Transport Name', 'Processors']); $count = 0; $firstRow = true; From 13b601750f335f41058908b161c4730dc6edac3f Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Mon, 12 Nov 2018 12:25:29 +0100 Subject: [PATCH 10/13] fixed headline --- pkg/enqueue/Symfony/Client/Meta/TopicsCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/enqueue/Symfony/Client/Meta/TopicsCommand.php b/pkg/enqueue/Symfony/Client/Meta/TopicsCommand.php index 8314fb99a..51019a7d6 100644 --- a/pkg/enqueue/Symfony/Client/Meta/TopicsCommand.php +++ b/pkg/enqueue/Symfony/Client/Meta/TopicsCommand.php @@ -47,7 +47,7 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { $table = new Table($output); - $table->setHeaders(['Topic', 'Description', 'processors']); + $table->setHeaders(['Topic', 'Description', 'Processors']); $count = 0; $firstRow = true; From efcc05455b2e12d888e9928812d7ce4295017554 Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Mon, 19 Nov 2018 11:04:39 +0200 Subject: [PATCH 11/13] Release 0.8.41 --- CHANGELOG.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc4034b29..4dc423155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,44 @@ # Change Log +## [0.8.41](https://github.com/php-enqueue/enqueue-dev/tree/0.8.41) (2018-11-19) +[Full Changelog](https://github.com/php-enqueue/enqueue-dev/compare/0.8.40...0.8.41) + +- \[dbal\] consumption improvements. [\#605](https://github.com/php-enqueue/enqueue-dev/issues/605) +- Make new RouterProcessor backward compatible. [\#598](https://github.com/php-enqueue/enqueue-dev/issues/598) +- profiler and data collector should support multiple clients. [\#594](https://github.com/php-enqueue/enqueue-dev/issues/594) +- \[bundle\]\[client\] Add ability to configure multiple clients. [\#592](https://github.com/php-enqueue/enqueue-dev/issues/592) +- \[gearman\]\[travis\] Build and cache gearman extension. [\#511](https://github.com/php-enqueue/enqueue-dev/issues/511) +- \[consumption\] Do not overwrite signal handlers set before SignalExtension [\#318](https://github.com/php-enqueue/enqueue-dev/issues/318) +- \[Symfony\] add support to transfer tokenStorage \(user info\) to the worker [\#69](https://github.com/php-enqueue/enqueue-dev/issues/69) + +- Fix AMQP tests [\#614](https://github.com/php-enqueue/enqueue-dev/issues/614) +- Enqueue/FS does not use latest Parse DSN class [\#610](https://github.com/php-enqueue/enqueue-dev/issues/610) +- Async commands queue setup error [\#608](https://github.com/php-enqueue/enqueue-dev/issues/608) +- \[FS\] Maximum function nesting level of '256' reached [\#327](https://github.com/php-enqueue/enqueue-dev/issues/327) + +- \[dbal\] consumer should still work if table is truncated [\#638](https://github.com/php-enqueue/enqueue-dev/issues/638) +- \[redis\] LogicException on set priority [\#635](https://github.com/php-enqueue/enqueue-dev/issues/635) +- Elastica populate with AWS SQS [\#629](https://github.com/php-enqueue/enqueue-dev/issues/629) +- SQS and fallback subscription consumer [\#625](https://github.com/php-enqueue/enqueue-dev/issues/625) +- \[dsn\] Add multi hosts parsing. [\#624](https://github.com/php-enqueue/enqueue-dev/issues/624) +- \[Symfony\] Try to check private service existence from container [\#621](https://github.com/php-enqueue/enqueue-dev/issues/621) +- Configuration with Amazon SQS and Symfony [\#619](https://github.com/php-enqueue/enqueue-dev/issues/619) +- \[redis\] Do not force phpredis [\#551](https://github.com/php-enqueue/enqueue-dev/issues/551) + +- Fixed headline [\#631](https://github.com/php-enqueue/enqueue-dev/pull/631) ([OskarStark](https://github.com/OskarStark)) +- Compatibility with 0.9x [\#615](https://github.com/php-enqueue/enqueue-dev/pull/615) ([ASKozienko](https://github.com/ASKozienko)) +- Fix Tests 0.8x [\#609](https://github.com/php-enqueue/enqueue-dev/pull/609) ([ASKozienko](https://github.com/ASKozienko)) +- Add support for the 'ciphers' ssl option [\#607](https://github.com/php-enqueue/enqueue-dev/pull/607) ([eperazzo](https://github.com/eperazzo)) +- Allow JobStorage to reset the EntityManager [\#586](https://github.com/php-enqueue/enqueue-dev/pull/586) ([damijank](https://github.com/damijank)) +- Fix delay not working on SQS [\#584](https://github.com/php-enqueue/enqueue-dev/pull/584) ([mbeccati](https://github.com/mbeccati)) + ## [0.8.40](https://github.com/php-enqueue/enqueue-dev/tree/0.8.40) (2018-10-22) [Full Changelog](https://github.com/php-enqueue/enqueue-dev/compare/0.8.39...0.8.40) - \[redis\] support for delay [\#553](https://github.com/php-enqueue/enqueue-dev/issues/553) +- \[rdkafka\] Backport changes to topic subscription [\#575](https://github.com/php-enqueue/enqueue-dev/pull/575) ([Steveb-p](https://github.com/Steveb-p)) + ## [0.8.39](https://github.com/php-enqueue/enqueue-dev/tree/0.8.39) (2018-10-19) [Full Changelog](https://github.com/php-enqueue/enqueue-dev/compare/0.8.38...0.8.39) From 9c8a399a03d1b3d2a4ddb2db915b0866d6588612 Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Mon, 19 Nov 2018 11:45:42 +0200 Subject: [PATCH 12/13] remove unrelated changes. --- .../Tests/Functional/Events/AsyncListenerTest.php | 4 ++-- .../Tests/Functional/Events/AsyncProcessorTest.php | 9 +++------ .../Tests/Functional/Events/AsyncSubscriberTest.php | 8 ++------ pkg/enqueue/Client/Producer.php | 6 ------ 4 files changed, 7 insertions(+), 20 deletions(-) diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php index 87b406e15..ae0cf7e97 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php @@ -20,9 +20,9 @@ protected function tearDown() { parent::tearDown(); -//<<<<<<< HEAD + //<<<<<<< HEAD // static::$container = null; -//======= + //======= /** @var AsyncListener $asyncListener */ $asyncListener = static::$container->get('enqueue.events.async_listener'); diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncProcessorTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncProcessorTest.php index cf21d8689..101e5ecec 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncProcessorTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncProcessorTest.php @@ -2,6 +2,7 @@ namespace Enqueue\Bundle\Tests\Functional\Events; +use Enqueue\AsyncEventDispatcher\AsyncListener; use Enqueue\AsyncEventDispatcher\AsyncProcessor; use Enqueue\Bundle\Tests\Functional\App\TestAsyncListener; use Enqueue\Bundle\Tests\Functional\App\TestAsyncSubscriber; @@ -17,20 +18,16 @@ */ class AsyncProcessorTest extends WebTestCase { - protected function tearDown() + public function setUp() { - parent::tearDown(); + parent::setUp(); -//<<<<<<< HEAD -// static::$container = null; -//======= /** @var AsyncListener $asyncListener */ $asyncListener = static::$container->get('enqueue.events.async_listener'); $asyncListener->resetSyncMode(); static::$container->get('test_async_subscriber')->calls = []; static::$container->get('test_async_listener')->calls = []; -//>>>>>>> origin/master } public function testCouldBeGetFromContainerAsService() diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php index d347d1fdb..6e00eafca 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncSubscriberTest.php @@ -16,20 +16,16 @@ */ class AsyncSubscriberTest extends WebTestCase { - protected function tearDown() + public function setUp() { - parent::tearDown(); + parent::setUp(); -//<<<<<<< HEAD -// static::$container = null; -//======= /** @var AsyncListener $asyncListener */ $asyncListener = static::$container->get('enqueue.events.async_listener'); $asyncListener->resetSyncMode(); static::$container->get('test_async_subscriber')->calls = []; static::$container->get('test_async_listener')->calls = []; -//>>>>>>> origin/master } public function testShouldNotCallRealSubscriberIfMarkedAsAsync() diff --git a/pkg/enqueue/Client/Producer.php b/pkg/enqueue/Client/Producer.php index 3d73cd8cf..6ea612b8c 100644 --- a/pkg/enqueue/Client/Producer.php +++ b/pkg/enqueue/Client/Producer.php @@ -9,12 +9,6 @@ final class Producer implements ProducerInterface { - /** - * compatibility with 0.9x. - */ - const TOPIC_09X = 'enqueue.topic'; - const COMMAND_09X = 'enqueue.command'; - /** * @var DriverInterface */ From 79b5cf5b569a428b1e64eca8bb806e4ce838b021 Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Mon, 19 Nov 2018 11:48:10 +0200 Subject: [PATCH 13/13] remove unrelated changes. --- .../Tests/Functional/Events/AsyncListenerTest.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php index ae0cf7e97..6e952ab28 100644 --- a/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/Events/AsyncListenerTest.php @@ -16,13 +16,10 @@ */ class AsyncListenerTest extends WebTestCase { - protected function tearDown() + public function setUp() { - parent::tearDown(); + parent::setUp(); - //<<<<<<< HEAD -// static::$container = null; - //======= /** @var AsyncListener $asyncListener */ $asyncListener = static::$container->get('enqueue.events.async_listener');