doctrine / DoctrineMongoDBBundle

Integrates Doctrine MongoDB ODM with Symfony
http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/index.html
MIT License
377 stars 231 forks source link

Deprecate `#[AsDocumentListener]` parameters `$method` and `$lazy` (not working) #825

Closed GromNaN closed 6 months ago

GromNaN commented 6 months ago

If you use the TestAttributeListener as it was, in a project, it will throw an exception:

Attempted to call an undefined method named "prePersist" of class "TestAttributeListener". Did you mean to call "onPrePersist"?

Only the event name is used when injected into the manager.

lazy and method have no effect.