[PR #12151] [CLOSED] Added support for an external ListenersInvoker. #13519

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

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/12151
Author: @sicet7
Created: 8/26/2025
Status: Closed

Base: 3.6.xHead: allow-listener-dependency-injection


📝 Commits (1)

  • 8e17cbe Added support for an external ListenersInvoker.

📊 Changes

3 files changed (+50 additions, -5 deletions)

View changed files

📝 src/Configuration.php (+17 -0)
📝 src/Event/ListenersInvoker.php (+17 -5)
src/Event/ListenersInvokerInterface.php (+16 -0)

📄 Description

Hello

I ran into a hard time trying to implement Dependency Injection on listeners in the Doctrine ORM i use for my own project,
but i found a solution, so i thought i would share it upstream 🙂

It is made so that you can on your configuration can provide a object implementing a new interface and through that you are able to make your own code that runs the listeners.

I am still doing some local testing of this feature on my personal project.

If this feature is not needed/wanted upstream feel free to close this PR, No Hard Feelings 🙂

Hope this helps 🙂


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/12151 **Author:** [@sicet7](https://github.com/sicet7) **Created:** 8/26/2025 **Status:** ❌ Closed **Base:** `3.6.x` ← **Head:** `allow-listener-dependency-injection` --- ### 📝 Commits (1) - [`8e17cbe`](https://github.com/doctrine/orm/commit/8e17cbe0fb26c05c6b7f944e5237fbfb8b8db712) Added support for an external ListenersInvoker. ### 📊 Changes **3 files changed** (+50 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/Configuration.php` (+17 -0) 📝 `src/Event/ListenersInvoker.php` (+17 -5) ➕ `src/Event/ListenersInvokerInterface.php` (+16 -0) </details> ### 📄 Description Hello I ran into a hard time trying to implement Dependency Injection on listeners in the Doctrine ORM i use for my own project, but i found a solution, so i thought i would share it upstream :slightly_smiling_face: It is made so that you can on your configuration can provide a object implementing a new interface and through that you are able to make your own code that runs the listeners. I am still doing some local testing of this feature on my personal project. If this feature is not needed/wanted upstream feel free to close this PR, No Hard Feelings :slightly_smiling_face: Hope this helps :slightly_smiling_face: --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:17:22 +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#13519