Skip to content

Commit

Permalink
rename interfaces to add suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
tyx committed Oct 18, 2023
1 parent 1bf1c9c commit 1265059
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public function handle(Envelope $envelope, StackInterface $stack): Envelope
$messageGroupId = null;
$messageDeduplicationId = null;

if ($message instanceof WithMessageGroupId) {
if ($message instanceof SupportsMessageGroupInterface) {
$messageGroupId = $message->messageGroupId();
}
if ($message instanceof WithMessageDeduplicationId) {
if ($message instanceof SupportsMessageDeduplicationInterface) {
$messageDeduplicationId = $message->messageDeduplicationId();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @see https://docs.aws.amazon.com/en_gb/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html
*/
interface WithMessageDeduplicationId
interface SupportsMessageDeduplicationInterface
{
/**
* The max length of MessageDeduplicationId is 128 characters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @see https://docs.aws.amazon.com/en_gb/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html
*/
interface WithMessageGroupId
interface SupportsMessageGroupInterface
{
/**
* The max length of MessageGroupId is 128 characters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
namespace Symfony\Component\Messenger\Bridge\AmazonSqs\Tests\Middleware;

use Symfony\Component\Messenger\Bridge\AmazonSqs\Middleware\AddFifoStamp;
use Symfony\Component\Messenger\Bridge\AmazonSqs\Middleware\WithMessageDeduplicationId;
use Symfony\Component\Messenger\Bridge\AmazonSqs\Middleware\WithMessageGroupId;
use Symfony\Component\Messenger\Bridge\AmazonSqs\Middleware\SupportsMessageDeduplicationInterface;
use Symfony\Component\Messenger\Bridge\AmazonSqs\Middleware\SupportsMessageGroupInterface;
use Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\AmazonSqsFifoStamp;
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\Test\Middleware\MiddlewareTestCase;
Expand Down Expand Up @@ -63,7 +63,7 @@ public function testHandleWithoutId()
}
}

class WithMessageDeduplicationIdAndMessageGroupIdMessage implements WithMessageDeduplicationId, WithMessageGroupId
class WithMessageDeduplicationIdAndMessageGroupIdMessage implements SupportsMessageDeduplicationInterface, SupportsMessageGroupInterface
{
public function __construct(
private string $messageGroupId,
Expand All @@ -82,7 +82,7 @@ public function messageGroupId(): string
}
}

class WithMessageDeduplicationIdMessage implements WithMessageDeduplicationId
class WithMessageDeduplicationIdMessage implements SupportsMessageDeduplicationInterface
{
public function __construct(
private string $messageDeduplicationId,
Expand All @@ -95,7 +95,7 @@ public function messageDeduplicationId(): string
}
}

class WithMessageGroupIdMessage implements WithMessageGroupId
class WithMessageGroupIdMessage implements SupportsMessageGroupInterface
{
public function __construct(
private string $messageGroupId,
Expand Down

0 comments on commit 1265059

Please sign in to comment.