mirror of
https://github.com/friendica/friendica
synced 2025-01-19 20:19:46 +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()
|
public static function flushLogger()
|
||||||
{
|
{
|
||||||
$flushDice = self::$dice
|
$flushDice = self::$dice
|
||||||
->addRule(LoggerInterface::class, self::$dice->getRule(LoggerInterface::class))
|
->addRule(LoggerInterface::class, self::$dice->getRule(LoggerInterface::class));
|
||||||
->addRule('$devLogger', self::$dice->getRule('$devLogger'));
|
|
||||||
static::init($flushDice);
|
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,
|
\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 => [
|
\Friendica\Core\Cache\Capability\ICanCache::class => [
|
||||||
'instanceOf' => \Friendica\Core\Cache\Factory\Cache::class,
|
'instanceOf' => \Friendica\Core\Cache\Factory\Cache::class,
|
||||||
'call' => [
|
'call' => [
|
||||||
|
|
|
@ -118,18 +118,6 @@ class DependencyCheckTest extends FixtureTestCase
|
||||||
self::assertInstanceOf(LoggerInterface::class, $logger);
|
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()
|
public function testCache()
|
||||||
{
|
{
|
||||||
/** @var ICanCache $cache */
|
/** @var ICanCache $cache */
|
||||||
|
|
Loading…
Add table
Reference in a new issue