From 63ee2e46cb2ee6923d2fb1a54ce38a85971f9459 Mon Sep 17 00:00:00 2001 From: Sherin Bloemendaal Date: Mon, 17 Feb 2025 15:40:38 +0100 Subject: [PATCH] Add deprecation notice for propertyName and propertyScope in initializer (Symfony 6.4) --- components/var_exporter.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/var_exporter.rst b/components/var_exporter.rst index 46471dca1d9..cb935c22da4 100644 --- a/components/var_exporter.rst +++ b/components/var_exporter.rst @@ -285,6 +285,12 @@ possible to initialize properties one-by-one:: // Then you can add more logic for the other properties }); +.. deprecated:: 6.4 + + The use of ``propertyName`` and ``propertyScope`` in the initializer function + is deprecated since Symfony 6.4 and will be removed in Symfony 7.0. + The initializer should now handle the entire object initialization at once. + Ghost objects unfortunately can't work with abstract classes or internal PHP classes. Nevertheless, the VarExporter component covers this need with the help of :ref:`Virtual Proxies `.