Skip to content

Commit 72e350a

Browse files
Use constant to call event name
1 parent 39c2350 commit 72e350a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doctrine/events.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,9 @@ a Doctrine entity listener in your application:
266266
// ...
267267
use App\Entity\User;
268268
use Doctrine\Bundle\DoctrineBundle\Attribute\AsEntityListener;
269+
use Doctrine\ORM\Events;
269270
270-
#[AsEntityListener(event: 'postUpdate', method: 'postUpdate', entity: User::class)]
271+
#[AsEntityListener(event: Events::postUpdate, method: 'postUpdate', entity: User::class)]
271272
class UserChangedNotifier
272273
{
273274
// ...

0 commit comments

Comments
 (0)