|
13 | 13 |
|
14 | 14 | use Monolog\Processor\ProcessorInterface; |
15 | 15 | use Monolog\ResettableInterface; |
16 | | -use Predis; |
17 | | -use Redis; |
18 | 16 | use Symfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategy; |
19 | 17 | use Symfony\Bridge\Monolog\Processor\TokenProcessor; |
20 | 18 | use Symfony\Bridge\Monolog\Processor\WebProcessor; |
@@ -318,23 +316,23 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler |
318 | 316 | if (isset($handler['redis']['id'])) { |
319 | 317 | $clientId = $handler['redis']['id']; |
320 | 318 | } elseif ('redis' === $handler['type']) { |
321 | | - if (!class_exists(Redis::class)) { |
| 319 | + if (!class_exists(\Redis::class)) { |
322 | 320 | throw new \RuntimeException('The \Redis class is not available.'); |
323 | 321 | } |
324 | 322 |
|
325 | | - $client = new Definition('\Redis'); |
| 323 | + $client = new Definition(\Redis::class); |
326 | 324 | $client->addMethodCall('connect', array($handler['redis']['host'], $handler['redis']['port'])); |
327 | 325 | $client->addMethodCall('auth', array($handler['redis']['password'])); |
328 | 326 | $client->addMethodCall('select', array($handler['redis']['database'])); |
329 | 327 | $client->setPublic(false); |
330 | 328 | $clientId = uniqid('monolog.redis.client.', true); |
331 | 329 | $container->setDefinition($clientId, $client); |
332 | 330 | } else { |
333 | | - if (!class_exists(Predis\Client::class)) { |
| 331 | + if (!class_exists(\Predis\Client::class)) { |
334 | 332 | throw new \RuntimeException('The \Predis\Client class is not available.'); |
335 | 333 | } |
336 | 334 |
|
337 | | - $client = new Definition('\Predis\Client'); |
| 335 | + $client = new Definition(\Predis\Client::class); |
338 | 336 | $client->setArguments(array( |
339 | 337 | $handler['redis']['host'], |
340 | 338 | )); |
|
0 commit comments