Skip to content

Commit

Permalink
Merge branch '6.3' into 6.4
Browse files Browse the repository at this point in the history
* 6.3:
  [6.3] Remove unused test fixture
  [5.4] Remove unused test fixtures
  [Dotent] Add PHPDoc for `$overrideExistingVars`
  [SecurityBundle] Fix missing login-link element in xsd schema
  [Validator] Add missing Chinese translations #51934
  [Serializer] Fix using `DateIntervalNormalizer` with union types
  [Validator] fix: add missing translations for for Thai (th)
  fix #52273 [doctrine-messenger] DB table locks on messenger_messages with many failures
  [Serializer] Handle defaultContext for DateTimeNormalizer
  declare constructor argument as optional for backwards compatibility
  [CI] Add step to verify symfony/deprecation-contracts requirements
  • Loading branch information
fabpot committed Oct 26, 2023
2 parents 4343641 + a0a8860 commit 984c48b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
7 changes: 4 additions & 3 deletions Exception/DelayedMessageHandlingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ class DelayedMessageHandlingException extends RuntimeException implements Wrappe
{
use WrappedExceptionsTrait;

private Envelope $envelope;
private array $exceptions;
private ?Envelope $envelope;

public function __construct(array $exceptions, Envelope $envelope)
public function __construct(array $exceptions, Envelope $envelope = null)
{
$this->envelope = $envelope;

Expand Down Expand Up @@ -55,7 +56,7 @@ public function getExceptions(): array
return $this->exceptions;
}

public function getEnvelope(): Envelope
public function getEnvelope(): ?Envelope
{
return $this->envelope;
}
Expand Down
21 changes: 0 additions & 21 deletions Tests/Stamp/StringErrorCodeException.php

This file was deleted.

2 changes: 1 addition & 1 deletion Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ private function ack(): bool
$receiver->reject($envelope);
}

if ($e instanceof HandlerFailedException || $e instanceof DelayedMessageHandlingException) {
if ($e instanceof HandlerFailedException || ($e instanceof DelayedMessageHandlingException && null !== $e->getEnvelope())) {
$envelope = $e->getEnvelope();
}

Expand Down

0 comments on commit 984c48b

Please sign in to comment.