Skip to content

Commit 0092f4b

Browse files
authored
Merge pull request #507 from php-enqueue/remove-deprecated-things
Remove deprecated in 0.8 code
2 parents 2de28e5 + daac6e6 commit 0092f4b

15 files changed

+40
-243
lines changed

Diff for: docs/transport/sqs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ $consumer->acknowledge($message);
110110

111111
$fooQueue = $psrContext->createQueue('foo');
112112

113-
$psrContext->purge($fooQueue);
113+
$psrContext->purgeQueue($fooQueue);
114114
```
115115

116116
[back to index](../index.md)

Diff for: pkg/amqp-bunny/Tests/Spec/AmqpSubscriptionConsumerConsumeUntilUnsubscribedTest.php

+9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
*/
1414
class AmqpSubscriptionConsumerConsumeUntilUnsubscribedTest extends SubscriptionConsumerConsumeUntilUnsubscribedSpec
1515
{
16+
protected function tearDown()
17+
{
18+
if ($this->subscriptionConsumer) {
19+
$this->subscriptionConsumer->unsubscribeAll();
20+
}
21+
22+
parent::tearDown();
23+
}
24+
1625
/**
1726
* @return AmqpContext
1827
*

Diff for: pkg/amqp-bunny/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"enqueue/test": "0.9.x-dev",
1717
"enqueue/enqueue": "0.9.x-dev",
1818
"enqueue/null": "0.9.x-dev",
19-
"queue-interop/queue-spec": "^0.5.8@dev",
19+
"queue-interop/queue-spec": "^0.5.9@dev",
2020
"symfony/dependency-injection": "^3.4|^4",
2121
"symfony/config": "^3.4|^4"
2222
},

Diff for: pkg/amqp-ext/Tests/Spec/AmqpSubscriptionConsumerConsumeUntilUnsubscribedTest.php

+9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
*/
1414
class AmqpSubscriptionConsumerConsumeUntilUnsubscribedTest extends SubscriptionConsumerConsumeUntilUnsubscribedSpec
1515
{
16+
protected function tearDown()
17+
{
18+
if ($this->subscriptionConsumer) {
19+
$this->subscriptionConsumer->unsubscribeAll();
20+
}
21+
22+
parent::tearDown();
23+
}
24+
1625
/**
1726
* @return AmqpContext
1827
*

Diff for: pkg/amqp-ext/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"enqueue/test": "0.9.x-dev",
1717
"enqueue/enqueue": "0.9.x-dev",
1818
"enqueue/null": "0.9.x-dev",
19-
"queue-interop/queue-spec": "^0.5.8@dev",
19+
"queue-interop/queue-spec": "^0.5.9@dev",
2020
"empi89/php-amqp-stubs": "*@dev",
2121
"symfony/dependency-injection": "^3.4|^4",
2222
"symfony/config": "^3.4|^4"

Diff for: pkg/amqp-lib/Tests/Spec/AmqpSubscriptionConsumerConsumeUntilUnsubscribedTest.php

+9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
*/
1414
class AmqpSubscriptionConsumerConsumeUntilUnsubscribedTest extends SubscriptionConsumerConsumeUntilUnsubscribedSpec
1515
{
16+
protected function tearDown()
17+
{
18+
if ($this->subscriptionConsumer) {
19+
$this->subscriptionConsumer->unsubscribeAll();
20+
}
21+
22+
parent::tearDown();
23+
}
24+
1625
/**
1726
* @return AmqpContext
1827
*

Diff for: pkg/amqp-lib/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"enqueue/test": "0.9.x-dev",
1717
"enqueue/enqueue": "0.9.x-dev",
1818
"enqueue/null": "0.9.x-dev",
19-
"queue-interop/queue-spec": "^0.5.8@dev",
19+
"queue-interop/queue-spec": "^0.5.9@dev",
2020
"symfony/dependency-injection": "^3.4|^4",
2121
"symfony/config": "^3.4|^4"
2222
},

Diff for: pkg/amqp-tools/SubscriptionConsumer.php

-57
This file was deleted.

Diff for: pkg/amqp-tools/Tests/SubscriptionConsumerTest.php

-96
This file was deleted.

Diff for: pkg/job-queue/Schema.php

-55
This file was deleted.

Diff for: pkg/simple-client/SimpleClient.php

-16
Original file line numberDiff line numberDiff line change
@@ -148,22 +148,6 @@ public function sendEvent($topic, $message)
148148
$this->getProducer()->sendEvent($topic, $message);
149149
}
150150

151-
/**
152-
* @deprecated since 0.8.18 and will be removed in 0.9. Use sendEvent method instead
153-
*
154-
* @param string $topic
155-
* @param string|array $message
156-
* @param bool $setupBroker
157-
*/
158-
public function send($topic, $message, $setupBroker = false)
159-
{
160-
if ($setupBroker) {
161-
$this->setupBroker();
162-
}
163-
164-
$this->sendEvent($topic, $message);
165-
}
166-
167151
/**
168152
* @param ExtensionInterface|null $runtimeExtension
169153
*/

Diff for: pkg/simple-client/Tests/Functional/SimpleClientTest.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ public function testProduceAndConsumeOneMessage($config)
112112
return Result::ACK;
113113
});
114114

115-
$client->send('foo_topic', 'Hello there!', true);
115+
$client->setupBroker();
116+
117+
$client->sendEvent('foo_topic', 'Hello there!');
116118

117119
$client->consume(new ChainExtension([
118120
new LimitConsumptionTimeExtension(new \DateTime('+5sec')),
@@ -144,7 +146,9 @@ public function testProduceAndRouteToTwoConsumes($config)
144146
return Result::ACK;
145147
});
146148

147-
$client->send('foo_topic', 'Hello there!', true);
149+
$client->setupBroker();
150+
151+
$client->sendEvent('foo_topic', 'Hello there!');
148152

149153
$client->consume(new ChainExtension([
150154
new LimitConsumptionTimeExtension(new \DateTime('+5sec')),

Diff for: pkg/sqs/SqsContext.php

-10
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,6 @@ public function deleteQueue(SqsDestination $dest)
185185
unset($this->queueUrls[$dest->getQueueName()]);
186186
}
187187

188-
/**
189-
* @deprecated since 0.8 will be removed 0.9 use self::purgeQueue()
190-
*
191-
* @param SqsDestination $dest
192-
*/
193-
public function purge(SqsDestination $dest)
194-
{
195-
$this->purgeQueue($dest);
196-
}
197-
198188
/**
199189
* @param SqsDestination $destination
200190
*/

Diff for: pkg/sqs/Tests/Functional/SqsConsumptionUseCasesTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ protected function setUp()
3939
$this->context->declareQueue($replyQueue);
4040

4141
try {
42-
$this->context->purge($queue);
43-
$this->context->purge($replyQueue);
42+
$this->context->purgeQueue($queue);
43+
$this->context->purgeQueue($replyQueue);
4444
} catch (\Exception $e) {
4545
}
4646
}

Diff for: pkg/sqs/Tests/SqsContextTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function testShouldAllowPurgeQueue()
187187

188188
$queue = $context->createQueue('aQueueName');
189189

190-
$context->purge($queue);
190+
$context->purgeQueue($queue);
191191
}
192192

193193
public function testShouldAllowGetQueueUrl()

0 commit comments

Comments
 (0)