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
EntityListener not called since 2.2.0 under prod env only #1249
Comments
This might very well be relevant #1196. Can you check if reverting those changes fixes your issue? |
Hi @ostrolucky , i confirm, by reverting the two commits it works. Here is the repository with the revert commits: https://github.com/Software-For-Asset-Management/DoctrineBundle/tree/master |
Reproducer would be more useful. I'm unable to reproduce the issue. Tried with 2.2.0, under prod, with prePersist, with |
Indeed, I've reproduced this now |
@zubov-ruslan how exactly did you produce this diff in the screenshot? So in one So far I can reproduce the missing case. But I cannot get it to show |
@dmaicher it happens when you run |
We decided to rollback the change which caused this issue. We released 2.2.1 which should fix your issue. |
@dmaicher Did you be able to reproduce? |
Crucial part for reproducing is not defining |
@ostrolucky I've changed the listener definition from annotations to services, but everything still works. Just difference is a new service listener appears in the container. |
bug is only in prod mode, with warmed up cache, since that's where feature works |
I've reproduced this. When entity listeners declared using services config they are added to metadata using event manager in |
Since |
I would really suggest to give us a feedback and try the suggested changes if you don't want us to break your application again in next release. |
I try to find a moment to reproduce it in coming days |
Hi @ossinkine i've made some tests, i confirm that it doesnt work when changing |
Hello,
Since the release of
doctrine-bundle:2.2.0
, we are facing a strange issue with our EntityListeners not called only when symfony run under prod env. Note, It works normally ondev
andtest
env.To give you more context, our EntityListener is registered on a MappedSuperClasss and not directly on the final Entity class. But we never had an issue with this before the 2.2.0 release.
Here is how we register our EntityListener (the service is registered inside a vendor managed by us):
Here is the
DealFlowListener
:The mappedsuperclass,
DealFlow
:And the
DealFlow
final entity:Also, when i run
bin/console --env=prod debug:container DealFlowListener
on production, the service appears and it's registered into the container :For now we have fix our
composer.json
to doctrine-bundle 2.1.2 and it works.Our environment :
Our
composer.json
:The text was updated successfully, but these errors were encountered: