mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 08:14:25 +02:00
Deprecate providing LoggerInterface via addon strategies
This commit is contained in:
parent
47db6de393
commit
e5416ca4a9
1 changed files with 15 additions and 0 deletions
|
@ -10,7 +10,9 @@ namespace Friendica\Core\Addon\Model;
|
|||
use Friendica\Core\Addon\Capability\ICanLoadAddons;
|
||||
use Friendica\Core\Addon\Exception\AddonInvalidConfigFileException;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\Logger\Factory\LoggerFactory;
|
||||
use Friendica\Util\Strings;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class AddonLoader implements ICanLoadAddons
|
||||
{
|
||||
|
@ -48,6 +50,19 @@ class AddonLoader implements ICanLoadAddons
|
|||
throw new AddonInvalidConfigFileException('Error loading config file ' . $configFile);
|
||||
}
|
||||
|
||||
if ($configName === 'strategies') {
|
||||
foreach ($config as $classname => $rule) {
|
||||
if ($classname === LoggerInterface::class) {
|
||||
@trigger_error(sprintf(
|
||||
'Providing a strategy for `%s` is deprecated since 2025.02, please provide an implementation for `%s` via `dependency.config.php` instead in %s addon.',
|
||||
LoggerInterface::class,
|
||||
LoggerFactory::class,
|
||||
$addonName,
|
||||
), \E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$returnConfig = array_merge_recursive($returnConfig, $config);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue