mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-09 00:24:27 +02:00
Soft deprecate AddonLoader and ICanLoadAddons
This commit is contained in:
parent
203e9642d5
commit
1428085c4b
3 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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') ?? []));
|
||||
|
|
|
@ -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 => [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue