@@ -272,7 +272,8 @@ with the ``doctrine.orm.entity_listener`` tag:
272272 entity_manager : ' custom'
273273
274274 # by default, Symfony looks for a method called after the event (e.g. postUpdate())
275- # but you can configure a custom method name with the 'method' option
275+ # if it doesn't exist, it tries to execute the '__invoke()' method, but you can
276+ # configure a custom method name with the 'method' option
276277 method : ' checkUserChanges'
277278
278279 .. code-block :: xml
@@ -291,7 +292,8 @@ with the ``doctrine.orm.entity_listener`` tag:
291292 * 'entity_manager': define it if the listener is not associated to the
292293 * default entity manager
293294 * 'method': by default, Symfony looks for a method called after the event (e.g. postUpdate())
294- * but you can configure a custom method name with the 'method' option
295+ * if it doesn't exist, it tries to execute the '__invoke()' method, but
296+ * you can configure a custom method name with the 'method' option
295297 -->
296298 <tag name =" doctrine.orm.entity_listener"
297299 event =" postUpdate"
@@ -321,8 +323,9 @@ with the ``doctrine.orm.entity_listener`` tag:
321323 // you can also associate an entity listener to a specific entity manager
322324 'entity_manager' => 'custom',
323325
324- // by default, Symfony looks for a method called after the event (e.g. postUpdate()),
325- // but you can configure a custom method name with the 'method' option
326+ // by default, Symfony looks for a method called after the event (e.g. postUpdate())
327+ // if it doesn't exist, it tries to execute the '__invoke()' method, but you can
328+ // configure a custom method name with the 'method' option
326329 'method' => 'checkUserChanges',
327330 ])
328331 ;
0 commit comments