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 --------------------- vendor/doctrine/dbal/src/Driver/PDO/Exception.php | 30 ----- .../doctrine/dbal/src/Driver/PDO/MySQL/Driver.php | 76 ------------ vendor/doctrine/dbal/src/Driver/PDO/OCI/Driver.php | 61 ---------- .../doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php | 113 ----------------- vendor/doctrine/dbal/src/Driver/PDO/Result.php | 110 ----------------- .../dbal/src/Driver/PDO/SQLSrv/Connection.php | 29 ----- .../doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php | 108 ----------------- .../dbal/src/Driver/PDO/SQLSrv/Statement.php | 46 ------- .../doctrine/dbal/src/Driver/PDO/SQLite/Driver.php | 55 --------- vendor/doctrine/dbal/src/Driver/PDO/Statement.php | 80 ------------- 11 files changed, 841 deletions(-) delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/Connection.php delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/Exception.php delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/OCI/Driver.php delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/Result.php delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Statement.php delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php delete mode 100644 vendor/doctrine/dbal/src/Driver/PDO/Statement.php (limited to 'vendor/doctrine/dbal/src/Driver/PDO') 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; - } -} diff --git a/vendor/doctrine/dbal/src/Driver/PDO/Exception.php b/vendor/doctrine/dbal/src/Driver/PDO/Exception.php deleted file mode 100644 index fbb8125..0000000 --- a/vendor/doctrine/dbal/src/Driver/PDO/Exception.php +++ /dev/null @@ -1,30 +0,0 @@ -errorInfo !== null) { - [$sqlState, $code] = $exception->errorInfo; - - $code ??= 0; - } else { - $code = $exception->getCode(); - $sqlState = null; - } - - return new self($exception->getMessage(), $sqlState, $code, $exception); - } -} diff --git a/vendor/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php b/vendor/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php deleted file mode 100644 index 963fef0..0000000 --- a/vendor/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php +++ /dev/null @@ -1,76 +0,0 @@ -constructPdoDsn($safeParams), - $params['user'] ?? '', - $params['password'] ?? '', - $driverOptions, - ); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - - return new Connection($pdo); - } - - /** - * Constructs the MySQL PDO DSN. - * - * @param mixed[] $params - */ - private function constructPdoDsn(array $params): string - { - $dsn = 'mysql:'; - if (isset($params['host']) && $params['host'] !== '') { - $dsn .= 'host=' . $params['host'] . ';'; - } - - if (isset($params['port'])) { - $dsn .= 'port=' . $params['port'] . ';'; - } - - if (isset($params['dbname'])) { - $dsn .= 'dbname=' . $params['dbname'] . ';'; - } - - if (isset($params['unix_socket'])) { - $dsn .= 'unix_socket=' . $params['unix_socket'] . ';'; - } - - if (isset($params['charset'])) { - $dsn .= 'charset=' . $params['charset'] . ';'; - } - - return $dsn; - } -} diff --git a/vendor/doctrine/dbal/src/Driver/PDO/OCI/Driver.php b/vendor/doctrine/dbal/src/Driver/PDO/OCI/Driver.php deleted file mode 100644 index 4c02de1..0000000 --- a/vendor/doctrine/dbal/src/Driver/PDO/OCI/Driver.php +++ /dev/null @@ -1,61 +0,0 @@ -constructPdoDsn($params), - $params['user'] ?? '', - $params['password'] ?? '', - $driverOptions, - ); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - - return new Connection($pdo); - } - - /** - * Constructs the Oracle PDO DSN. - * - * @param mixed[] $params - */ - private function constructPdoDsn(array $params): string - { - $dsn = 'oci:dbname=' . $this->getEasyConnectString($params); - - if (isset($params['charset'])) { - $dsn .= ';charset=' . $params['charset']; - } - - return $dsn; - } -} diff --git a/vendor/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php b/vendor/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php deleted file mode 100644 index a267e84..0000000 --- a/vendor/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php +++ /dev/null @@ -1,113 +0,0 @@ -constructPdoDsn($safeParams), - $params['user'] ?? '', - $params['password'] ?? '', - $driverOptions, - ); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - - if ( - ! isset($driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES]) - || $driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES] === true - ) { - $pdo->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true); - } - - $connection = new Connection($pdo); - - /* defining client_encoding via SET NAMES to avoid inconsistent DSN support - * - passing client_encoding via the 'options' param breaks pgbouncer support - */ - if (isset($params['charset'])) { - $connection->exec('SET NAMES \'' . $params['charset'] . '\''); - } - - return $connection; - } - - /** - * Constructs the Postgres PDO DSN. - * - * @param array $params - */ - private function constructPdoDsn(array $params): string - { - $dsn = 'pgsql:'; - - if (isset($params['host']) && $params['host'] !== '') { - $dsn .= 'host=' . $params['host'] . ';'; - } - - if (isset($params['port']) && $params['port'] !== '') { - $dsn .= 'port=' . $params['port'] . ';'; - } - - if (isset($params['dbname'])) { - $dsn .= 'dbname=' . $params['dbname'] . ';'; - } - - if (isset($params['sslmode'])) { - $dsn .= 'sslmode=' . $params['sslmode'] . ';'; - } - - if (isset($params['sslrootcert'])) { - $dsn .= 'sslrootcert=' . $params['sslrootcert'] . ';'; - } - - if (isset($params['sslcert'])) { - $dsn .= 'sslcert=' . $params['sslcert'] . ';'; - } - - if (isset($params['sslkey'])) { - $dsn .= 'sslkey=' . $params['sslkey'] . ';'; - } - - if (isset($params['sslcrl'])) { - $dsn .= 'sslcrl=' . $params['sslcrl'] . ';'; - } - - if (isset($params['application_name'])) { - $dsn .= 'application_name=' . $params['application_name'] . ';'; - } - - if (isset($params['gssencmode'])) { - $dsn .= 'gssencmode=' . $params['gssencmode'] . ';'; - } - - return $dsn; - } -} diff --git a/vendor/doctrine/dbal/src/Driver/PDO/Result.php b/vendor/doctrine/dbal/src/Driver/PDO/Result.php deleted file mode 100644 index 1a844d1..0000000 --- a/vendor/doctrine/dbal/src/Driver/PDO/Result.php +++ /dev/null @@ -1,110 +0,0 @@ -fetch(PDO::FETCH_NUM); - } - - public function fetchAssociative(): array|false - { - return $this->fetch(PDO::FETCH_ASSOC); - } - - public function fetchOne(): mixed - { - return $this->fetch(PDO::FETCH_COLUMN); - } - - /** - * {@inheritDoc} - */ - public function fetchAllNumeric(): array - { - return $this->fetchAll(PDO::FETCH_NUM); - } - - /** - * {@inheritDoc} - */ - public function fetchAllAssociative(): array - { - return $this->fetchAll(PDO::FETCH_ASSOC); - } - - /** - * {@inheritDoc} - */ - public function fetchFirstColumn(): array - { - return $this->fetchAll(PDO::FETCH_COLUMN); - } - - public function rowCount(): int - { - try { - return $this->statement->rowCount(); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } - - public function columnCount(): int - { - try { - return $this->statement->columnCount(); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } - - public function free(): void - { - $this->statement->closeCursor(); - } - - /** - * @psalm-param PDO::FETCH_* $mode - * - * @throws Exception - */ - private function fetch(int $mode): mixed - { - try { - return $this->statement->fetch($mode); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } - - /** - * @psalm-param PDO::FETCH_* $mode - * - * @return list - * - * @throws Exception - */ - private function fetchAll(int $mode): array - { - try { - return $this->statement->fetchAll($mode); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } -} diff --git a/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php b/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php deleted file mode 100644 index 78ba7f8..0000000 --- a/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php +++ /dev/null @@ -1,29 +0,0 @@ -connection->prepare($sql), - ); - } - - public function getNativeConnection(): PDO - { - return $this->connection->getNativeConnection(); - } -} diff --git a/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php b/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php deleted file mode 100644 index a3cae97..0000000 --- a/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php +++ /dev/null @@ -1,108 +0,0 @@ - $value) { - if (is_int($option)) { - $driverOptions[$option] = $value; - } else { - $dsnOptions[$option] = $value; - } - } - } - - if (! empty($params['persistent'])) { - $driverOptions[PDO::ATTR_PERSISTENT] = true; - } - - $safeParams = $params; - unset($safeParams['password']); - - try { - $pdo = new PDO( - $this->constructDsn($safeParams, $dsnOptions), - $params['user'] ?? '', - $params['password'] ?? '', - $driverOptions, - ); - } catch (\PDOException $exception) { - throw PDOException::new($exception); - } - - return new Connection(new PDOConnection($pdo)); - } - - /** - * Constructs the Sqlsrv PDO DSN. - * - * @param mixed[] $params - * @param string[] $connectionOptions - * - * @throws Exception - */ - private function constructDsn(array $params, array $connectionOptions): string - { - $dsn = 'sqlsrv:server='; - - if (isset($params['host'])) { - $dsn .= $params['host']; - - if (isset($params['port'])) { - $dsn .= ',' . $params['port']; - } - } elseif (isset($params['port'])) { - throw PortWithoutHost::new(); - } - - if (isset($params['dbname'])) { - $connectionOptions['Database'] = $params['dbname']; - } - - if (isset($params['MultipleActiveResultSets'])) { - $connectionOptions['MultipleActiveResultSets'] = $params['MultipleActiveResultSets'] ? 'true' : 'false'; - } - - return $dsn . $this->getConnectionOptionsDsn($connectionOptions); - } - - /** - * Converts a connection options array to the DSN - * - * @param string[] $connectionOptions - */ - private function getConnectionOptionsDsn(array $connectionOptions): string - { - $connectionOptionsDsn = ''; - - foreach ($connectionOptions as $paramName => $paramValue) { - $connectionOptionsDsn .= sprintf(';%s=%s', $paramName, $paramValue); - } - - return $connectionOptionsDsn; - } -} diff --git a/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Statement.php b/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Statement.php deleted file mode 100644 index 44cecc9..0000000 --- a/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Statement.php +++ /dev/null @@ -1,46 +0,0 @@ -statement->bindParamWithDriverOptions( - $param, - $value, - $type, - PDO::SQLSRV_ENCODING_BINARY, - ); - break; - - case ParameterType::ASCII: - $this->statement->bindParamWithDriverOptions( - $param, - $value, - ParameterType::STRING, - PDO::SQLSRV_ENCODING_SYSTEM, - ); - break; - - default: - $this->statement->bindValue($param, $value, $type); - } - } -} diff --git a/vendor/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php b/vendor/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php deleted file mode 100644 index 74194a5..0000000 --- a/vendor/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php +++ /dev/null @@ -1,55 +0,0 @@ -constructPdoDsn(array_intersect_key($params, ['path' => true, 'memory' => true])), - $params['user'] ?? '', - $params['password'] ?? '', - $params['driverOptions'] ?? [], - ); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - - return new Connection($pdo); - } - - /** - * Constructs the Sqlite PDO DSN. - * - * @param array $params - */ - private function constructPdoDsn(array $params): string - { - $dsn = 'sqlite:'; - if (isset($params['path'])) { - $dsn .= $params['path']; - } elseif (isset($params['memory'])) { - $dsn .= ':memory:'; - } - - return $dsn; - } -} diff --git a/vendor/doctrine/dbal/src/Driver/PDO/Statement.php b/vendor/doctrine/dbal/src/Driver/PDO/Statement.php deleted file mode 100644 index 4f0e070..0000000 --- a/vendor/doctrine/dbal/src/Driver/PDO/Statement.php +++ /dev/null @@ -1,80 +0,0 @@ -convertParamType($type); - - try { - $this->stmt->bindValue($param, $value, $pdoType); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } - - /** - * @internal Driver options can be only specified by a PDO-based driver. - * - * @throws ExceptionInterface - */ - public function bindParamWithDriverOptions( - string|int $param, - mixed &$variable, - ParameterType $type, - mixed $driverOptions, - ): void { - $pdoType = $this->convertParamType($type); - - try { - $this->stmt->bindParam($param, $variable, $pdoType, 0, $driverOptions); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - } - - public function execute(): Result - { - try { - $this->stmt->execute(); - } catch (PDOException $exception) { - throw Exception::new($exception); - } - - return new Result($this->stmt); - } - - /** - * Converts DBAL parameter type to PDO parameter type - * - * @psalm-return PDO::PARAM_* - */ - private function convertParamType(ParameterType $type): int - { - return match ($type) { - ParameterType::NULL => PDO::PARAM_NULL, - ParameterType::INTEGER => PDO::PARAM_INT, - ParameterType::STRING, - ParameterType::ASCII => PDO::PARAM_STR, - ParameterType::BINARY, - ParameterType::LARGE_OBJECT => PDO::PARAM_LOB, - ParameterType::BOOLEAN => PDO::PARAM_BOOL, - }; - } -} -- cgit v1.2.3