Deprecated EventSubscriberInterface, use AsDoctrineListener
markitosgv opened this issue · 4 comments
Since symfony/doctrine-bridge 6.3: Registering "xxxxSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute.
Is there any update for this?
Thanks for pointing this feature. It was introduced by doctrine/DoctrineBundle#1561, renamed in doctrine/DoctrineBundle#1592 and the EventSubscriberInterface
was deprecated in doctrine/DoctrineBundle#1664.
I'll work on it.
@markitosgv You can use #[AsDocumentListener]
from the DoctrineMongoDBBundle
.
I opened a PR to deprecate the EventSubscriberInterface
, so we can remove it in 5.0.
The deprecation message comes from symfony/doctrine-bridge
. The name of the referenced attribute should be removed or depend on if ORM or ODM are used.
I opened a PR on symfony bridge to update the deprecation message symfony/symfony#53184 and update the doc to show usage of the new attribute #817