[DoctrineBridge] Trigger a proper error when injection a service containing the entity manager in a doctrine listener #31636
Labels
DoctrineBridge
DX
DX = Developer eXperience (anything that improves the experience of using Symfony)
Description
This is mainly for DX but I think if we throw a proper message when injecting a service that contains the entity manager into a doctrine listener (because this is not working) and the only errors we get is some flush errors that are linked but not really the root cause.
Example
Today something like this is thrown by Doctrine directly:
Maybe we could throw an special error like this one:
Tell me if this is this has more it's place into doctrinebundle.
The text was updated successfully, but these errors were encountered: