mirror of
https://github.com/friendica/friendica
synced 2025-01-19 11:39:47 +00:00
Remove Dice rules for unused $devLogger service
This commit is contained in:
parent
0869140756
commit
27fa4c0cdf
3 changed files with 2 additions and 20 deletions
|
@ -305,8 +305,8 @@ abstract class DI
|
|||
public static function flushLogger()
|
||||
{
|
||||
$flushDice = self::$dice
|
||||
->addRule(LoggerInterface::class, self::$dice->getRule(LoggerInterface::class))
|
||||
->addRule('$devLogger', self::$dice->getRule('$devLogger'));
|
||||
->addRule(LoggerInterface::class, self::$dice->getRule(LoggerInterface::class));
|
||||
|
||||
static::init($flushDice);
|
||||
}
|
||||
|
||||
|
|
|
@ -180,12 +180,6 @@ return (function(string $basepath, array $getVars, array $serverVars, array $coo
|
|||
\Friendica\Core\Logger\Capability\IHaveCallIntrospections::IGNORE_CLASS_LIST,
|
||||
],
|
||||
],
|
||||
'$devLogger' => [
|
||||
'instanceOf' => \Friendica\Core\Logger\Factory\StreamLogger::class,
|
||||
'call' => [
|
||||
['createDev', [], Dice::CHAIN_CALL],
|
||||
],
|
||||
],
|
||||
\Friendica\Core\Cache\Capability\ICanCache::class => [
|
||||
'instanceOf' => \Friendica\Core\Cache\Factory\Cache::class,
|
||||
'call' => [
|
||||
|
|
|
@ -118,18 +118,6 @@ class DependencyCheckTest extends FixtureTestCase
|
|||
self::assertInstanceOf(LoggerInterface::class, $logger);
|
||||
}
|
||||
|
||||
public function testDevLogger()
|
||||
{
|
||||
/** @var IManageConfigValues $config */
|
||||
$config = $this->dice->create(IManageConfigValues::class);
|
||||
$config->set('system', 'dlogfile', $this->root->url() . '/friendica.log');
|
||||
|
||||
/** @var LoggerInterface $logger */
|
||||
$logger = $this->dice->create('$devLogger', ['dev']);
|
||||
|
||||
self::assertInstanceOf(LoggerInterface::class, $logger);
|
||||
}
|
||||
|
||||
public function testCache()
|
||||
{
|
||||
/** @var ICanCache $cache */
|
||||
|
|
Loading…
Add table
Reference in a new issue