File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ First, define a PHP class that handles the ``postUpdate`` Doctrine event::
255255 }
256256 }
257257
258- Then, add the ``#[AsDoctrineListener ] `` attribute to the class to enable it as
258+ Then, add the ``#[AsEntityListener ] `` attribute to the class to enable it as
259259a Doctrine entity listener in your application:
260260
261261 .. code-block :: php
@@ -265,9 +265,10 @@ a Doctrine entity listener in your application:
265265
266266 // ...
267267 use App\Entity\User;
268- use Doctrine\Bundle\DoctrineBundle\Attribute\AsDoctrineListener;
268+ use Doctrine\Bundle\DoctrineBundle\Attribute\AsEntityListener;
269+ use Doctrine\ORM\Events;
269270
270- #[AsDoctrineListener (event: ' postUpdate', method: 'postUpdate', entity: User::class)]
271+ #[AsEntityListener (event: Events:: postUpdate, method: 'postUpdate', entity: User::class)]
271272 class UserChangedNotifier
272273 {
273274 // ...
You can’t perform that action at this time.
0 commit comments