]> git.mxchange.org Git - friendica.git/commitdiff
deprecations should be muted trigger_error calls
authorArt4 <art4@wlabs.de>
Sat, 1 Feb 2025 09:21:00 +0000 (09:21 +0000)
committerArt4 <art4@wlabs.de>
Sat, 1 Feb 2025 09:21:00 +0000 (09:21 +0000)
doc/Developers-Intro.md

index 99e84739d08955e0cc6461576f0b50f611ada333..8540109f85a236fe0638a7909915556e75ed5467 100644 (file)
@@ -210,9 +210,9 @@ If the deprecated code is no longer used inside Friendica or the official addons
 The code MUST NOT be deleted.
 Starting from the next release, it MUST be stay for at least 5 months.
 Hard deprecated code COULD remain longer than 5 months, depending on when a release appears.
-Addon developer MUST NOT consider that they have more than 5 months to adjust their code.
+Addon developer SHOULD NOT consider that they have more than 5 months to adjust their code.
 
-Hard deprecation code means that the code triggers an `E_USER_DEPRECATION` error if it is called.
+Hard deprecation code means that the code triggers a muted `E_USER_DEPRECATION` error if it is called.
 For instance with the deprecated class `Friendica\Core\Logger` the call of every method should trigger an error:
 
 ```php
@@ -224,7 +224,7 @@ For instance with the deprecated class `Friendica\Core\Logger` the call of every
 class Logger {
        public static function info(string $message, array $context = [])
        {
-               trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.05 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+               @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.05 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
 
                self::getInstance()->info($message, $context);
        }
@@ -233,7 +233,7 @@ class Logger {
 }
 ```
 
-This way the maintainer or users of addons will be notified that the addon will stop working in one of the next releases.
+This way the maintainer or users of addons will be notified in the logs that the addon will stop working in one of the next releases.
 The addon maintainer now has at least 5 months or at least one release to fix the deprecations.
 
 Please note that the deprecation message contains the release that will be released next.