From 68035a95e400a4a6ee5be75f9aa11bbf3ecf6c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 16 Aug 2023 12:15:59 +0800 Subject: [PATCH] qqq --- Connection.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Connection.php b/Connection.php index 4a3bf01..df6b574 100644 --- a/Connection.php +++ b/Connection.php @@ -23,10 +23,12 @@ use Kiri\Di\Context; use Kiri\Pool\Pool; use Kiri\Events\EventProvider; use Kiri\Exception\NotFindClassException; +use Monolog\Logger; use PDO; use Psr\Log\LoggerInterface; use ReflectionException; use Kiri\Server\Events\OnAfterRequest; +use Kiri\Di\Inject\Container; /** * Class Connection @@ -80,10 +82,15 @@ class Connection extends Component /** - * @param Pool $connections - * @param LoggerInterface $logger + * @var Logger */ - public function __construct(public Pool $connections, public LoggerInterface $logger) + #[Container(LoggerInterface::class)] + protected Logger $logger; + + /** + * @param Pool $connections + */ + public function __construct(public Pool $connections) { parent::__construct(); }