Skip to content

Commit be37ead

Browse files
Merge branch '5.4' into 6.3
* 5.4: [Form] Fix merging params & files when "multiple" is enabled [HttpFoundation] Do not swallow trailing `=` in cookie value Handle Sendinblue error responses without a message key [Serializer] Fix collecting only first missing constructor argument [Messenger] Fix DoctrineOpenTransactionLoggerMiddleware [Translation] Add missing return type [Validator] add missing catalan translations
2 parents 0428c76 + fb159f6 commit be37ead

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Messenger/DoctrineOpenTransactionLoggerMiddleware.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
class DoctrineOpenTransactionLoggerMiddleware extends AbstractDoctrineMiddleware
2727
{
2828
private $logger;
29+
/** @var bool */
30+
private $isHandling = false;
2931

3032
public function __construct(ManagerRegistry $managerRegistry, string $entityManagerName = null, LoggerInterface $logger = null)
3133
{
@@ -36,6 +38,12 @@ public function __construct(ManagerRegistry $managerRegistry, string $entityMana
3638

3739
protected function handleForManager(EntityManagerInterface $entityManager, Envelope $envelope, StackInterface $stack): Envelope
3840
{
41+
if ($this->isHandling) {
42+
return $stack->next()->handle($envelope, $stack);
43+
}
44+
45+
$this->isHandling = true;
46+
3947
try {
4048
return $stack->next()->handle($envelope, $stack);
4149
} finally {
@@ -44,6 +52,7 @@ protected function handleForManager(EntityManagerInterface $entityManager, Envel
4452
'message' => $envelope->getMessage(),
4553
]);
4654
}
55+
$this->isHandling = false;
4756
}
4857
}
4958
}

0 commit comments

Comments
 (0)