Skip to content

Commit 6d60b9d

Browse files
Merge branch '6.3' into 6.4
* 6.3: [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] Simplify code [Messenger] Fix graceful exit [Messenger] Fix DoctrineOpenTransactionLoggerMiddleware [Translation] Add missing return type [Validator] add missing catalan translations
2 parents e28fc27 + be37ead commit 6d60b9d

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
@@ -24,6 +24,8 @@
2424
*/
2525
class DoctrineOpenTransactionLoggerMiddleware extends AbstractDoctrineMiddleware
2626
{
27+
private bool $isHandling = false;
28+
2729
public function __construct(
2830
ManagerRegistry $managerRegistry,
2931
string $entityManagerName = null,
@@ -34,6 +36,12 @@ public function __construct(
3436

3537
protected function handleForManager(EntityManagerInterface $entityManager, Envelope $envelope, StackInterface $stack): Envelope
3638
{
39+
if ($this->isHandling) {
40+
return $stack->next()->handle($envelope, $stack);
41+
}
42+
43+
$this->isHandling = true;
44+
3745
try {
3846
return $stack->next()->handle($envelope, $stack);
3947
} finally {
@@ -42,6 +50,7 @@ protected function handleForManager(EntityManagerInterface $entityManager, Envel
4250
'message' => $envelope->getMessage(),
4351
]);
4452
}
53+
$this->isHandling = false;
4554
}
4655
}
4756
}

0 commit comments

Comments
 (0)