Skip to content

Conversation

@blued-gear
Copy link
Collaborator

@blued-gear blued-gear commented Jan 22, 2026

This is the only place in the codebase where I found an opened transaction without an accompanying rollback.

Might fix #1846


$this->entityManager->commit();
} catch (\Exception $e) {
$this->entityManager->rollback();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this also need a $this->managerRegistry->resetManager();? As this is a savepoint (nested transaction), I'm not sure.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is not strictly necessary, as this is the end of the method and the entitymanager will be disposed afterwards anyways...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also if you catched the error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is thrown right after this, so it should not make a difference

@blued-gear blued-gear enabled auto-merge (squash) January 25, 2026 19:12
@blued-gear blued-gear merged commit 61ada48 into main Jan 25, 2026
8 checks passed
@blued-gear blued-gear deleted the fix/end_transaction_properly_in_deleteuserhandler branch January 25, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HandleMessageMiddleware might try to create a transaction within a transation

3 participants