-
-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[doc] Registering the entity listener on the entity is still required #1548
Comments
You didn't specify |
Okay, it wasn't clear to me, that the |
stollr
added a commit
to stollr/doctrine-bundle
that referenced
this issue
Jul 14, 2022
I have created a tiny PR to add a sentence to make this more clear. |
ostrolucky
pushed a commit
that referenced
this issue
Jul 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the documentation it's said that
I have installed doctrine/orm 2.12.3 and Doctrine bundle 2.7.0. But in my case the following service definition was not sufficient to get the listener working:
I had to add
@ORM\EntityListeners({"AppBundle\EventListener\EntityListener\ReversalInvoiceListener"})
to the entity. Or is there anything else missing on my definition?Without the annotation in the entity, the
$metadata->entityListeners
array was empty, so thatListenersInvoker::getSubscribedSystems
returned 4 instead of 5, which means that the bit for the listener invokation was missing.So either the documentation is not clear or there is a bug in the code.
The text was updated successfully, but these errors were encountered: