Telegram WebHook logger injection fix.

This commit is contained in:
Alexey Skobkin 2017-11-05 16:20:35 +03:00
parent 0915bbc9d1
commit 47e5e3d8c5

View file

@ -2,8 +2,8 @@
namespace Skobkin\Bundle\PointToolsBundle\Controller\Telegram; namespace Skobkin\Bundle\PointToolsBundle\Controller\Telegram;
use Psr\Log\LoggerInterface;
use Skobkin\Bundle\PointToolsBundle\Service\Telegram\IncomingUpdateDispatcher; use Skobkin\Bundle\PointToolsBundle\Service\Telegram\IncomingUpdateDispatcher;
use Symfony\Bridge\Monolog\Logger;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\{JsonResponse, Request, Response}; use Symfony\Component\HttpFoundation\{JsonResponse, Request, Response};
use unreal4u\TelegramAPI\Telegram\Types\Update; use unreal4u\TelegramAPI\Telegram\Types\Update;
@ -25,7 +25,7 @@ class WebHookController extends AbstractController
$this->debug = $debug; $this->debug = $debug;
} }
public function receiveUpdateAction(Request $request, string $token, IncomingUpdateDispatcher $updateDispatcher, Logger $logger): Response public function receiveUpdateAction(Request $request, string $token, IncomingUpdateDispatcher $updateDispatcher, LoggerInterface $logger): Response
{ {
if ($token !== $savedToken = $this->telegramToken) { if ($token !== $savedToken = $this->telegramToken) {
throw $this->createNotFoundException(); throw $this->createNotFoundException();