diff --git a/src/Command.php b/src/Command.php index d1be3a5..7ddb7f4 100644 --- a/src/Command.php +++ b/src/Command.php @@ -8,7 +8,6 @@ use PDOException; use Throwable; use Yiisoft\Db\Driver\Pdo\AbstractPdoCommand; -use Yiisoft\Db\Driver\Pdo\PdoConnectionInterface; use Yiisoft\Db\Exception\ConvertException; use Yiisoft\Db\QueryBuilder\AbstractQueryBuilder; use Yiisoft\Db\QueryBuilder\QueryBuilderInterface; @@ -136,7 +135,9 @@ protected function internalExecute(?string $rawSql): void && $this->db->getTransaction() === null ) { $this->db->transaction( - fn (PdoConnectionInterface $db) => $this->internalExecute($rawSql), + function () use ($rawSql): void { + $this->internalExecute($rawSql); + }, $this->isolationLevel ); } else {