[PR #8237] Add two new events: initializePersistentCollection and initializeProxy #10872

Open
opened 2026-01-22 16:08:58 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/8237

State: closed
Merged: No


This pull request adds two new events so that they can be observed from userland. The two new events are

  • initializeProxy: called each time a proxy is initialized
  • initializePersistentCollection: called each time a persistent collection is initialized.

The use case behind this PR is to provide an hook to be able to detect n+1. See n-plus-one-detector

**Original Pull Request:** https://github.com/doctrine/orm/pull/8237 **State:** closed **Merged:** No --- This pull request adds two new events so that they can be observed from userland. The two new events are - `initializeProxy`: called each time a proxy is initialized - `initializePersistentCollection`: called each time a persistent collection is initialized. The use case behind this PR is to provide an hook to be able to detect n+1. See [n-plus-one-detector](https://github.com/danydev/doctrine-n-plus-one-detector)
admin added the pull-request label 2026-01-22 16:08:58 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#10872