-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Doctrine subscriber is deprecated #2704
Comments
Same here, but in different context
|
Any possible updates on this? |
Waiting for any update too |
This is not deprecated in Doctrine itself. However, Symfony has deprecated registering Doctrine subscribers because they cannot be lazy-loaded (contrary to Symfony subscribers, the Doctrine ones require instantiating the object to get the list of subscribed events). In https://packagist.org/packages/stof/doctrine-extensions-bundle, I already updated the way listeners are registered to be compatible with this lazy-loading (include tests that will ensure that the explicit registration is in sync with the library subscriber). |
Just found my answer in the documentation : https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/doc/symfony.md#doctrine-extension-listener-services Needed to update the config in |
@LaurentSanson I get
how did you solve it? |
@mcanepa , You could just remove the call to annotation reader that you've set in your config file, or better option, use the @stof 's bundle properly and in his
It should works just fine |
@LaurentSanson I did both: In config/services.yaml I removed
and instead of using
I used config/stof_doctrine_extensions.yaml
now TimestampableEntity trait works but only for POST operation, it fails on PUT. I get
|
I think you can get rid of the calling of timestampable in your |
Environment
Package
show
Doctrine packages
show
PHP version
Subject
Minimal repository with the bug
Steps to reproduce
Expected results
Actual results
The text was updated successfully, but these errors were encountered: