From 7fcf6874e310eafa3679d9f2d05e0a48e8a3eace Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 28 Jan 2021 14:24:46 +0200 Subject: [PATCH] deprecation msg --- application/Espo/Core/Utils/Config.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/application/Espo/Core/Utils/Config.php b/application/Espo/Core/Utils/Config.php index 5227b7d60e..f2d3e57716 100644 --- a/application/Espo/Core/Utils/Config.php +++ b/application/Espo/Core/Utils/Config.php @@ -35,6 +35,7 @@ use Espo\Core\{ }; use StdClass; +use E_USER_DEPRECATED; /** * Access to the application config parameters. @@ -71,7 +72,7 @@ class Config /** * A path to the config file. - * + * * @todo Move to ConfigData. */ public function getConfigPath() : string @@ -141,7 +142,7 @@ class Config } /** - * @deprecated since version 6.2.0 + * @deprecated Since v6.2.0. */ public function set($name, $value = null, bool $dontMarkDirty = false) { @@ -167,7 +168,7 @@ class Config } /** - * @deprecated since version 6.2.0 + * @deprecated Since v6.2.0. */ public function remove(string $name) : bool { @@ -183,10 +184,15 @@ class Config } /** - * @deprecated since version 6.2.0 + * @deprecated Since v6.2.0. */ public function save() { + trigger_error( + "Config::save is deprecated. Use `Espo\Core\Utils\Config\ConfigWriter` to save the config.", + E_USER_DEPRECATED + ); + $values = $this->changedData; if (!isset($values[$this->cacheTimestamp])) {