Skip to content

Commit 75309ae

Browse files
authored
chore: add redeliveredAt in RedeliveryStamp construct
this would allows one to correctly unserialise a RedeliveryStamp with a custom serializer not using the php serialize function
1 parent ad94b39 commit 75309ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ final class RedeliveryStamp implements StampInterface
2424
private $exceptionMessage;
2525
private $flattenException;
2626

27-
public function __construct(int $retryCount, string $exceptionMessage = null, FlattenException $flattenException = null)
27+
public function __construct(int $retryCount, string $exceptionMessage = null, FlattenException $flattenException = null, \DateTimeTimmutable $redeliveredAt = new \DateTimeImmutable())
2828
{
2929
$this->retryCount = $retryCount;
3030
$this->exceptionMessage = $exceptionMessage;
3131
$this->flattenException = $flattenException;
32-
$this->redeliveredAt = new \DateTimeImmutable();
32+
$this->redeliveredAt = $redeliveredAt;
3333
}
3434

3535
public static function getRetryCountFromEnvelope(Envelope $envelope): int

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy