From 05e38eadbeb3de19e5b26003c2b401e00bb71df4 Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 18 Oct 2026 00:08:23 +0200 Subject: =?UTF-8?q?sortie=20de=20vendor=20du=20d=C3=A9p=C3=B4t,=20oubli=20?= =?UTF-8?q?dans=20config-template.ini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/doctrine/dbal/src/Driver/PDO/Connection.php | 133 --------------------- 1 file changed, 133 deletions(-) delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/Connection.php (limited to 'vendor/doctrine/dbal/src/Driver/PDO/Connection.php') diff --git a/vendor/doctrine/dbal/src/Driver/PDO/Connection.php b/vendor/doctrine/dbal/src/Driver/PDO/Connection.php deleted file mode 100644 index b1faca1..0000000 --- a/vendor/doctrine/dbal/src/Driver/PDO/Connection.php +++ /dev/null @@ -1,133 +0,0 @@ -setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - } - - public function exec(string $sql): int - { - try { - $result = $this->connection->exec($sql); - - assert($result !== false); - - return $result; - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } - - public function getServerVersion(): string - { - return $this->connection->getAttribute(PDO::ATTR_SERVER_VERSION); - } - - public function prepare(string $sql): Statement - { - try { - $stmt = $this->connection->prepare($sql); - assert($stmt instanceof PDOStatement); - - return new Statement($stmt); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } - - public function query(string $sql): Result - { - try { - $stmt = $this->connection->query($sql); - assert($stmt instanceof PDOStatement); - - return new Result($stmt); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } - - public function quote(string $value): string - { - return $this->connection->quote($value); - } - - public function lastInsertId(): int|string - { - try { - $value = $this->connection->lastInsertId(); - } catch (PDOException $exception) { - assert($exception->errorInfo !== null); - [$sqlState] = $exception->errorInfo; - - // if the PDO driver does not support this capability, PDO::lastInsertId() triggers an IM001 SQLSTATE - // see https://www.php.net/manual/en/pdo.lastinsertid.php - if ($sqlState === 'IM001') { - throw IdentityColumnsNotSupported::new(); - } - - // PDO PGSQL throws a 'lastval is not yet defined in this session' error when no identity value is - // available, with SQLSTATE 55000 'Object Not In Prerequisite State' - if ($sqlState === '55000' && $this->connection->getAttribute(PDO::ATTR_DRIVER_NAME) === 'pgsql') { - throw NoIdentityValue::new($exception); - } - - throw Exception::new($exception); - } - - // pdo_mysql & pdo_sqlite return '0', pdo_sqlsrv returns '' or false depending on the PHP version - if ($value === '0' || $value === '' || $value === false) { - throw NoIdentityValue::new(); - } - - return $value; - } - - public function beginTransaction(): void - { - try { - $this->connection->beginTransaction(); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } - - public function commit(): void - { - try { - $this->connection->commit(); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } - - public function rollBack(): void - { - try { - $this->connection->rollBack(); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } - - public function getNativeConnection(): PDO - { - return $this->connection; - } -} -- cgit v1.2.3