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::
255
255
}
256
256
}
257
257
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
259
259
a Doctrine entity listener in your application:
260
260
261
261
.. code-block :: php
@@ -265,9 +265,10 @@ a Doctrine entity listener in your application:
265
265
266
266
// ...
267
267
use App\Entity\User;
268
- use Doctrine\Bundle\DoctrineBundle\Attribute\AsDoctrineListener;
268
+ use Doctrine\Bundle\DoctrineBundle\Attribute\AsEntityListener;
269
+ use Doctrine\ORM\Events;
269
270
270
- #[AsDoctrineListener (event: ' postUpdate', method: 'postUpdate', entity: User::class)]
271
+ #[AsEntityListener (event: Events:: postUpdate, method: 'postUpdate', entity: User::class)]
271
272
class UserChangedNotifier
272
273
{
273
274
// ...
You can’t perform that action at this time.
0 commit comments