]> git.mxchange.org Git - friendica.git/commitdiff
Soft deprecate AddonLoader and ICanLoadAddons
authorArt4 <art4@wlabs.de>
Thu, 15 May 2025 13:15:52 +0000 (13:15 +0000)
committerArt4 <art4@wlabs.de>
Thu, 15 May 2025 13:15:52 +0000 (13:15 +0000)
src/Core/Addon/Capability/ICanLoadAddons.php
src/Core/Addon/Model/AddonLoader.php
static/dependencies.config.php

index 993c431497ac5a0c0b4c786e793da9199699825e..63978462d3cf75d8cfa2dc53a00be88316acbf32 100644 (file)
@@ -9,12 +9,16 @@ namespace Friendica\Core\Addon\Capability;
 
 /**
  * Interface for loading Addons specific content
+ *
+ * @deprecated 2025.02 Use implementation of `\Friendica\Core\Addon\AddonHelper` instead.
  */
 interface ICanLoadAddons
 {
        /**
         * Returns a merged config array of all active addons for a given config-name
         *
+        * @deprecated 2025.02 Use `\Friendica\Core\Addon\AddonHelper::getAddonDependencyConfig()` instead.
+        *
         * @param string $configName The config-name (config-file at the static directory, like 'hooks' => '{addon}/static/hooks.config.php)
         *
         * @return array the merged array
index a608a66e3d845c3a20e473e805f2191efdfa2276..4e0da1c80b3c53489367f091c89d0d54c50fabc5 100644 (file)
@@ -14,6 +14,9 @@ use Friendica\Core\Logger\Factory\LoggerFactory;
 use Friendica\Util\Strings;
 use Psr\Log\LoggerInterface;
 
+/**
+ * @deprecated 2025.02 Use implementation of `\Friendica\Core\Addon\AddonHelper` instead.
+ */
 class AddonLoader implements ICanLoadAddons
 {
        const STATIC_PATH = 'static';
@@ -28,7 +31,9 @@ class AddonLoader implements ICanLoadAddons
                $this->config   = $config;
        }
 
-       /** {@inheritDoc} */
+       /**
+        * @deprecated 2025.02 Use `\Friendica\Core\Addon\AddonHelper::getAddonDependencyConfig()` instead.
+        */
        public function getActiveAddonConfig(string $configName): array
        {
                $addons       = array_keys(array_filter($this->config->get('addons') ?? []));
index 04e2dd2aeed84c1fc90e7a2b195beb5c104074da..1ce02a2411b657463cc66c63be312b1bd762f91c 100644 (file)
@@ -39,7 +39,6 @@ return (function(string $basepath, array $getVars, array $serverVars, array $coo
                        'instanceOf' => \Friendica\Core\Addon\Model\AddonLoader::class,
                        'constructParams' => [
                                $basepath,
-                               [Dice::INSTANCE => Dice::SELF],
                        ],
                ],
                \Friendica\Core\Addon\AddonHelper::class => [