Skip to content

Commit 9949cfd

Browse files
committed
bug #12600 [Doctrine] Don't mention invokable listeners in 4.3 (javiereguiluz)
This PR was merged into the 4.3 branch. Discussion ---------- [Doctrine] Don't mention invokable listeners in 4.3 This feature was added in 4.4. See https://symfony.com/blog/new-in-symfony-4-4-simpler-event-listeners#invokable-doctrine-entity-listeners Beware mergers: this must be reverted in 4.4 while merging ... and a `.. versionadded:: 4.4` directive must be added ... and removed later in master. Commits ------- fae64fc [Doctrine] Don't mention invokable listeners in 4.3
2 parents c2f93ef + fae64fc commit 9949cfd

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

doctrine/events.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,7 @@ 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-
# 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
275+
# but you can configure a custom method name with the 'method' option
277276
method: 'checkUserChanges'
278277
279278
.. code-block:: xml
@@ -292,8 +291,7 @@ with the ``doctrine.orm.entity_listener`` tag:
292291
* 'entity_manager': define it if the listener is not associated to the
293292
* default entity manager
294293
* 'method': by default, Symfony looks for a method called after the event (e.g. postUpdate())
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
294+
* but you can configure a custom method name with the 'method' option
297295
-->
298296
<tag name="doctrine.orm.entity_listener"
299297
event="postUpdate"
@@ -323,9 +321,8 @@ with the ``doctrine.orm.entity_listener`` tag:
323321
// you can also associate an entity listener to a specific entity manager
324322
'entity_manager' => 'custom',
325323
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
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
329326
'method' => 'checkUserChanges',
330327
])
331328
;

0 commit comments

Comments
 (0)