8000 [Messenger] Stamps as class attributes · symfony/symfony@89fb4e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 89fb4e5

Browse files
committed
[Messenger] Stamps as class attributes
1 parent 2618d47 commit 89fb4e5

28 files changed

+28
-0
lines changed

src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsFifoStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Component\Messenger\Stamp\NonSendableStampInterface;
1515

16+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1617
final class AmazonSqsFifoStamp implements NonSendableStampInterface
1718
{
1819
private ?string $messageGroupId;

src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsReceivedStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/**
1717
* @author Jérémy Derussé <jeremy@derusse.com>
1818
*/
19+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1920
class AmazonSqsReceivedStamp implements NonSendableStampInterface
2021
{
2122
private string $id;

src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsXrayTraceHeaderStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Component\Messenger\Stamp\NonSendableStampInterface;
1515

16+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1617
final class AmazonSqsXrayTraceHeaderStamp implements NonSendableStampInterface
1718
{
1819
private string $traceId;

src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpReceivedStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/**
1717
* Stamp applied when a message is received from Amqp.
1818
*/
19+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1920
class AmqpReceivedStamp implements NonSendableStampInterface
2021
{
2122
private \AMQPEnvelope $amqpEnvelope;

src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* @author Guillaume Gammelin <ggammelin@gmail.com>
1818
* @author Samuel Roze <samuel.roze@gmail.com>
1919
*/
20+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
2021
final class AmqpStamp implements NonSendableStampInterface
2122
{
2223
private ?string $routingKey;

src/Symfony/Component/Messenger/Bridge/Beanstalkd/Transport/BeanstalkdReceivedStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/**
1717
* @author Antonio Pauletich <antonio.pauletich95@gmail.com>
1818
*/
19+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1920
class BeanstalkdReceivedStamp implements NonSendableStampInterface
2021
{
2122
private string $id;

src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceivedStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/**
1717
* @author Vincent Touzet <vincent.touzet@gmail.com>
1818
*/
19+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1920
class DoctrineReceivedStamp implements NonSendableStampInterface
2021
{
2122
private string $id;

src/Symfony/Component/Messenger/Bridge/Redis/Transport/RedisReceivedStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/**
1717
* @author Alexander Schranz <alexander@sulu.io>
1818
*/
19+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1920
class RedisReceivedStamp implements NonSendableStampInterface
2021
{
2122
private string $id;

src/Symfony/Component/Messenger/Stamp/AckStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/**
1717
* Marker stamp for messages that can be ack/nack'ed.
1818
*/
19+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1920
final class AckStamp implements NonSendableStampInterface
2021
{
2122
private $ack;

src/Symfony/Component/Messenger/Stamp/BusNameStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*
1717
* @author Ryan Weaver <ryan@symfonycasts.com>
1818
*/
19+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1920
final class BusNameStamp implements StampInterface
2021
{
2122
private string $busName;

src/Symfony/Component/Messenger/Stamp/ConsumedByWorkerStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* A marker that this message was consumed by a worker process.
1616
*/
17+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1718
class ConsumedByWorkerStamp implements NonSendableStampInterface
1819
{
1920
}

src/Symfony/Component/Messenger/Stamp/DispatchAfterCurrentBusStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*
1919
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
2020
*/
21+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
2122
final class DispatchAfterCurrentBusStamp implements NonSendableStampInterface
2223
{
2324
}

src/Symfony/Component/Messenger/Stamp/ErrorDetailsStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/**
1818
* Stamp applied when a messages fails due to an exception in the handler.
1919
*/
20+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
2021
final class ErrorDetailsStamp implements StampInterface
2122
{
2223
private string $exceptionClass;

src/Symfony/Component/Messenger/Stamp/FlushBatchHandlersStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* Marker telling that any batch handlers bound to the envelope should be flushed.
1616
*/
17+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1718
final class FlushBatchHandlersStamp implements NonSendableStampInterface
1819
{
1920
private $force;

src/Symfony/Component/Messenger/Stamp/HandledStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*
2626
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
2727
*/
28+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
2829
final class HandledStamp implements StampInterface
2930
{
3031
private mixed $result;

src/Symfony/Component/Messenger/Stamp/HandlerArgumentsStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* @author Jáchym Toušek <enumag@gmail.com>
1616
*/
17+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1718
final class HandlerArgumentsStamp implements NonSendableStampInterface
1819
{
1920
public function __construct(

src/Symfony/Component/Messenger/Stamp/MessageDecodingFailedStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* @author Grégoire Pineau <lyrixx@lyrixx.info>
1616
*/
17+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1718
class MessageDecodingFailedStamp implements StampInterface
1819
{
1920
}

src/Symfony/Component/Messenger/Stamp/NoAutoAckStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/**
1717
* Marker telling that ack should not be done automatically for this message.
1818
*/
19+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1920
final class NoAutoAckStamp implements NonSendableStampInterface
2021
{
2122
private $handlerDescriptor;

src/Symfony/Component/Messenger/Stamp/ReceivedStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*
2424
* @author Samuel Roze <samuel.roze@gmail.com>
2525
*/
26+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
2627
final class ReceivedStamp implements NonSendableStampInterface
2728
{
2829
private string $transportName;

src/Symfony/Component/Messenger/Stamp/RedeliveryStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/**
1717
* Stamp applied when a messages needs to be redelivered.
1818
*/
19+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1920
final class RedeliveryStamp implements StampInterface
2021
{
2122
private int $retryCount;

src/Symfony/Component/Messenger/Stamp/RouterContextStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* @author Jérémy Derussé <jeremy@derusse.com>
1616
*/
17+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1718
class RouterContextStamp implements StampInterface
1819
{
1920
private string $baseUrl;

src/Symfony/Component/Messenger/Stamp/SentStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*
1919
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
2020
*/
21+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
2122
final class SentStamp implements NonSendableStampInterface
2223
{
2324
private string $senderClass;

src/Symfony/Component/Messenger/Stamp/SentToFailureTransportStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*
1717
* @author Ryan Weaver <ryan@symfonycasts.com>
1818
*/
19+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1920
final class SentToFailureTransportStamp implements StampInterface
2021
{
2122
private string $originalReceiverName;

src/Symfony/Component/Messenger/Stamp/SerializedMessageStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Messenger\Stamp;
1313

14+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1415
final class SerializedMessageStamp implements NonSendableStampInterface
1516
{
1617
public function __construct(private string $serializedMessage)

src/Symfony/Component/Messenger/Stamp/SerializerStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
1616
*/
17+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1718
final class SerializerStamp implements StampInterface
1819
{
1920
private array $context;

src/Symfony/Component/Messenger/Stamp/TransportMessageIdStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*
1717
* @author Ryan Weaver <ryan@symfonycasts.com>
1818
*/
19+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1920
final class TransportMessageIdStamp implements StampInterface
2021
{
2122
private mixed $id;

src/Symfony/Component/Messenger/Stamp/TransportNamesStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* Stamp used to override the transport names specified in the Messenger routing configuration file.
1616
*/
17+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
1718
final class TransportNamesStamp implements StampInterface
1819
{
1920
private array $transportNames;

src/Symfony/Component/Scheduler/Messenger/ScheduledStamp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/**
1818
* @experimental
1919
*/
20+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
2021
final class ScheduledStamp implements NonSendableStampInterface
2122
{
2223
public function __construct(public readonly MessageContext $messageContext)

0 commit comments

Comments
 (0)
0