Skip to content

[producer] do not throw exception if feature not implemented and null… #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/amqp-bunny/AmqpProducer.php
Original file line number Diff line number Diff line change
@@ -92,6 +92,10 @@ public function send(PsrDestination $destination, PsrMessage $message)
*/
public function setDeliveryDelay($deliveryDelay)
{
if (null === $deliveryDelay) {
return;
}

throw DeliveryDelayNotSupportedException::providerDoestNotSupportIt();
}

4 changes: 4 additions & 0 deletions pkg/amqp-ext/AmqpProducer.php
Original file line number Diff line number Diff line change
@@ -99,6 +99,10 @@ public function send(PsrDestination $destination, PsrMessage $message)
*/
public function setDeliveryDelay($deliveryDelay)
{
if (null === $deliveryDelay) {
return;
}

throw DeliveryDelayNotSupportedException::providerDoestNotSupportIt();
}

4 changes: 4 additions & 0 deletions pkg/amqp-lib/AmqpProducer.php
Original file line number Diff line number Diff line change
@@ -94,6 +94,10 @@ public function send(PsrDestination $destination, PsrMessage $message)
*/
public function setDeliveryDelay($deliveryDelay)
{
if (null === $deliveryDelay) {
return;
}

throw DeliveryDelayNotSupportedException::providerDoestNotSupportIt();
}

12 changes: 12 additions & 0 deletions pkg/dbal/DbalProducer.php
Original file line number Diff line number Diff line change
@@ -91,6 +91,10 @@ public function send(PsrDestination $destination, PsrMessage $message)
*/
public function setDeliveryDelay($deliveryDelay)
{
if (null === $deliveryDelay) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -107,6 +111,10 @@ public function getDeliveryDelay()
*/
public function setPriority($priority)
{
if (null === $priority) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -123,6 +131,10 @@ public function getPriority()
*/
public function setTimeToLive($timeToLive)
{
if (null === $timeToLive) {
return;
}

throw new \LogicException('Not implemented');
}

8 changes: 8 additions & 0 deletions pkg/fs/FsProducer.php
Original file line number Diff line number Diff line change
@@ -73,6 +73,10 @@ public function send(PsrDestination $destination, PsrMessage $message)
*/
public function setDeliveryDelay($deliveryDelay)
{
if (null === $deliveryDelay) {
return;
}

throw DeliveryDelayNotSupportedException::providerDoestNotSupportIt();
}

@@ -89,6 +93,10 @@ public function getDeliveryDelay()
*/
public function setPriority($priority)
{
if (null === $priority) {
return;
}

throw PriorityNotSupportedException::providerDoestNotSupportIt();
}

12 changes: 12 additions & 0 deletions pkg/gearman/GearmanProducer.php
Original file line number Diff line number Diff line change
@@ -47,6 +47,10 @@ public function send(PsrDestination $destination, PsrMessage $message)
*/
public function setDeliveryDelay($deliveryDelay)
{
if (null === $deliveryDelay) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -63,6 +67,10 @@ public function getDeliveryDelay()
*/
public function setPriority($priority)
{
if (null === $priority) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -79,6 +87,10 @@ public function getPriority()
*/
public function setTimeToLive($timeToLive)
{
if (null === $timeToLive) {
return;
}

throw new \LogicException('Not implemented');
}

12 changes: 12 additions & 0 deletions pkg/pheanstalk/PheanstalkProducer.php
Original file line number Diff line number Diff line change
@@ -57,6 +57,10 @@ public function send(PsrDestination $destination, PsrMessage $message)
*/
public function setDeliveryDelay($deliveryDelay)
{
if (null === $deliveryDelay) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -73,6 +77,10 @@ public function getDeliveryDelay()
*/
public function setPriority($priority)
{
if (null === $priority) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -89,6 +97,10 @@ public function getPriority()
*/
public function setTimeToLive($timeToLive)
{
if (null === $timeToLive) {
return;
}

throw new \LogicException('Not implemented');
}

12 changes: 12 additions & 0 deletions pkg/rdkafka/RdKafkaProducer.php
Original file line number Diff line number Diff line change
@@ -48,6 +48,10 @@ public function send(PsrDestination $destination, PsrMessage $message)
*/
public function setDeliveryDelay($deliveryDelay)
{
if (null === $deliveryDelay) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -64,6 +68,10 @@ public function getDeliveryDelay()
*/
public function setPriority($priority)
{
if (null === $priority) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -80,6 +88,10 @@ public function getPriority()
*/
public function setTimeToLive($timeToLive)
{
if (null === $timeToLive) {
return;
}

throw new \LogicException('Not implemented');
}

12 changes: 12 additions & 0 deletions pkg/redis/RedisProducer.php
Original file line number Diff line number Diff line change
@@ -42,6 +42,10 @@ public function send(PsrDestination $destination, PsrMessage $message)
*/
public function setDeliveryDelay($deliveryDelay)
{
if (null === $deliveryDelay) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -58,6 +62,10 @@ public function getDeliveryDelay()
*/
public function setPriority($priority)
{
if (null === $priority) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -74,6 +82,10 @@ public function getPriority()
*/
public function setTimeToLive($timeToLive)
{
if (null === $timeToLive) {
return;
}

throw new \LogicException('Not implemented');
}

8 changes: 8 additions & 0 deletions pkg/sqs/SqsProducer.php
Original file line number Diff line number Diff line change
@@ -108,6 +108,10 @@ public function getDeliveryDelay()
*/
public function setPriority($priority)
{
if (null === $priority) {
return;
}

throw PriorityNotSupportedException::providerDoestNotSupportIt();
}

@@ -124,6 +128,10 @@ public function getPriority()
*/
public function setTimeToLive($timeToLive)
{
if (null === $timeToLive) {
return;
}

throw TimeToLiveNotSupportedException::providerDoestNotSupportIt();
}

12 changes: 12 additions & 0 deletions pkg/stomp/StompProducer.php
Original file line number Diff line number Diff line change
@@ -50,6 +50,10 @@ public function send(PsrDestination $destination, PsrMessage $message)
*/
public function setDeliveryDelay($deliveryDelay)
{
if (null === $deliveryDelay) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -66,6 +70,10 @@ public function getDeliveryDelay()
*/
public function setPriority($priority)
{
if (null === $priority) {
return;
}

throw new \LogicException('Not implemented');
}

@@ -82,6 +90,10 @@ public function getPriority()
*/
public function setTimeToLive($timeToLive)
{
if (null === $timeToLive) {
return;
}

throw new \LogicException('Not implemented');
}