From 77769de09eb2e1f2571d8b1c372e2d2e617087ea Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 27 Jun 2023 16:29:12 +0200 Subject: [PATCH] [Doctrine] Deprecate Doctrine lifecycle subscribers --- doctrine/events.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doctrine/events.rst b/doctrine/events.rst index 53a3dc5b32e..3a2c66cceac 100644 --- a/doctrine/events.rst +++ b/doctrine/events.rst @@ -110,6 +110,11 @@ define a callback for the ``prePersist`` Doctrine event: Doctrine Lifecycle Listeners ---------------------------- +.. deprecated:: 6.3 + + Lifecycle subscribers are deprecated starting from Symfony 6.3 and will be + removed in Symfony 7.0. Use lifecycle listeners instead. + Lifecycle listeners are defined as PHP classes that listen to a single Doctrine event on all the application entities. For example, suppose that you want to update some search index whenever a new entity is persisted in the database. To