You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->redeliveredAt = $redeliveredAt ?? new \DateTimeImmutable();
34
+
if (null !== $redeliveredAt) {
35
+
trigger_deprecation('symfony/messenger', '5.2', sprintf('Using the "$redeliveredAt" as 4th argument of the "%s::__construct()" is deprecated, pass "$redeliveredAt" as second argument instead.', self::class));
36
+
}
31
37
32
-
if (null !== $exceptionMessage) {
38
+
if ($exceptionMessageinstanceof \DateTimeInterface) {
39
+
// In Symfony 6.0, the second argument will be $redeliveredAt
40
+
$this->redeliveredAt = $exceptionMessage;
41
+
if (null !== $redeliveredAt) {
42
+
thrownew \LogicException('It is deprecated to specify a redeliveredAt as 4th argument. The correct way is to specify redeliveredAt as the second argument. Using both is not allowed.');
43
+
}
44
+
} elseif (null !== $exceptionMessage) {
33
45
trigger_deprecation('symfony/messenger', '5.2', sprintf('Using the "$exceptionMessage" parameter in the "%s" class is deprecated, use the "%s" class instead.', self::class, ErrorDetailsStamp::class));
46
+
$this->exceptionMessage = $exceptionMessage;
34
47
}
35
-
$this->exceptionMessage = $exceptionMessage;
36
48
37
49
if (null !== $flattenException) {
38
50
trigger_deprecation('symfony/messenger', '5.2', sprintf('Using the "$flattenException" parameter in the "%s" class is deprecated, use the "%s" class instead.', self::class, ErrorDetailsStamp::class));
$this->expectDeprecation('Since symfony/messenger 5.2: Using the "$redeliveredAt" as 4th argument of the "Symfony\Component\Messenger\Stamp\RedeliveryStamp::__construct()" is deprecated, pass "$redeliveredAt" as second argument instead.');
48
+
$redeliveredAt = new \DateTimeImmutable('+2minutes');
$this->expectDeprecation('Since symfony/messenger 5.2: Using the "$redeliveredAt" as 4th argument of the "Symfony\Component\Messenger\Stamp\RedeliveryStamp::__construct()" is deprecated, pass "$redeliveredAt" as second argument instead.');
59
+
$redeliveredAt = new \DateTimeImmutable('+2minutes');
0 commit comments