Skip to content

[EasyDoctrine] Clear deferred entity events on flush exceptions#1792

Open
zeromodule wants to merge 3 commits into
masterfrom
feature/easy-doctrine-clear-entity-event-dispatcher-on-flush-exception
Open

[EasyDoctrine] Clear deferred entity events on flush exceptions#1792
zeromodule wants to merge 3 commits into
masterfrom
feature/easy-doctrine-clear-entity-event-dispatcher-on-flush-exception

Conversation

@zeromodule
Copy link
Copy Markdown
Contributor

@zeromodule zeromodule commented Apr 22, 2026

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes

This change prevents deferred entity events from surviving a failed Doctrine flush().
Without it, long-running workers could dispatch stale events from a previous failed message during a later successful flush(). The fix ensures deferred state is cleared on flush() exceptions.

- Clear deferred entity events on flush exceptions
- Remove stale deleted entities from the pool in the dispatcher
@eonx-space-to-github-reviews
Copy link
Copy Markdown

- Clear deferred entity events on flush exceptions
- Remove stale deleted entities from the pool in the dispatcher
- Clear deferred entity events on flush exceptions
- Remove stale deleted entities from the pool in the dispatcher
Copy link
Copy Markdown
Contributor

@akl-95 akl-95 left a comment

Choose a reason for hiding this comment

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

Great job on the code review. ✅ Code approved!

Secure code in this PR has been written to best practice standards and covers the following as a minimum. Please ticket if coded this way (also tick if not relevant to this code change):

  • Protect from Injection attacks
  • Protect data with proper input validation, and protect against buffer overflows, pointers/shared data
  • Protect with appropriate encryption and cryptography (E.g. Appropriate hashing, symmetric encryption used, ciphers) if applicable
  • Protect against XSS and CSRF
  • Ensure that pages, data access etc, are written with appropriate access control authorisation and authentication requirements
  • Ensure all important errors and business logic cases are handled
  • Ensure forwards and redirects are handled
  • Ensure no sensitive data is exposed and appropriate logging in place as required

See procedure for more details: PROC-010 Secure Coding Practices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants