diff --git a/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php b/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php index cebffa565c0..b1270846512 100644 --- a/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php +++ b/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php @@ -68,16 +68,16 @@ public function getCacheKey() /** * Generates the real cache key from query, params, types and connection parameters. * - * @param string $query + * @param string $sql * @param mixed[] $params * @param int[]|string[] $types * @param mixed[] $connectionParams * * @return string[] */ - public function generateCacheKeys($query, $params, $types, array $connectionParams = []) + public function generateCacheKeys($sql, $params, $types, array $connectionParams = []) { - $realCacheKey = 'query=' . $query . + $realCacheKey = 'query=' . $sql . '¶ms=' . serialize($params) . '&types=' . serialize($types) . '&connectionParams=' . hash('sha256', serialize($connectionParams)); diff --git a/lib/Doctrine/DBAL/Connection.php b/lib/Doctrine/DBAL/Connection.php index 2e1965d43be..6d5a0e43a2e 100644 --- a/lib/Doctrine/DBAL/Connection.php +++ b/lib/Doctrine/DBAL/Connection.php @@ -542,50 +542,50 @@ public function setFetchMode($fetchMode) * Prepares and executes an SQL query and returns the first row of the result * as an associative array. * - * @param string $statement The SQL query. - * @param mixed[] $params The query parameters. - * @param int[]|string[] $types The query parameter types. + * @param string $sql The query SQL + * @param mixed[] $params The query parameters + * @param int[]|string[] $types The query parameter types * * @return mixed[]|false False is returned if no rows are found. * * @throws DBALException */ - public function fetchAssoc($statement, array $params = [], array $types = []) + public function fetchAssoc($sql, array $params = [], array $types = []) { - return $this->executeQuery($statement, $params, $types)->fetch(FetchMode::ASSOCIATIVE); + return $this->executeQuery($sql, $params, $types)->fetch(FetchMode::ASSOCIATIVE); } /** * Prepares and executes an SQL query and returns the first row of the result * as a numerically indexed array. * - * @param string $statement The SQL query to be executed. - * @param mixed[] $params The prepared statement params. - * @param int[]|string[] $types The query parameter types. + * @param string $sql The query SQL + * @param mixed[] $params The query parameters + * @param int[]|string[] $types The query parameter types * * @return mixed[]|false False is returned if no rows are found. */ - public function fetchArray($statement, array $params = [], array $types = []) + public function fetchArray($sql, array $params = [], array $types = []) { - return $this->executeQuery($statement, $params, $types)->fetch(FetchMode::NUMERIC); + return $this->executeQuery($sql, $params, $types)->fetch(FetchMode::NUMERIC); } /** * Prepares and executes an SQL query and returns the value of a single column * of the first row of the result. * - * @param string $statement The SQL query to be executed. - * @param mixed[] $params The prepared statement params. - * @param int $column The 0-indexed column number to retrieve. - * @param int[]|string[] $types The query parameter types. + * @param string $sql The query SQL + * @param mixed[] $params The query parameters + * @param int $column The 0-indexed column number to retrieve + * @param int[]|string[] $types The query parameter types * * @return mixed|false False is returned if no rows are found. * * @throws DBALException */ - public function fetchColumn($statement, array $params = [], $column = 0, array $types = []) + public function fetchColumn($sql, array $params = [], $column = 0, array $types = []) { - return $this->executeQuery($statement, $params, $types)->fetchColumn($column); + return $this->executeQuery($sql, $params, $types)->fetchColumn($column); } /** @@ -643,16 +643,16 @@ private function addIdentifierCondition( * * Table expression and columns are not escaped and are not safe for user-input. * - * @param string $tableExpression The expression of the table on which to delete. - * @param mixed[] $identifier The deletion criteria. An associative array containing column-value pairs. - * @param int[]|string[] $types The types of identifiers. + * @param string $table The expression of the table on which to delete. + * @param mixed[] $identifier The deletion criteria. An associative array containing column-value pairs. + * @param int[]|string[] $types The types of identifiers. * * @return int The number of affected rows. * * @throws DBALException * @throws InvalidArgumentException */ - public function delete($tableExpression, array $identifier, array $types = []) + public function delete($table, array $identifier, array $types = []) { if (empty($identifier)) { throw InvalidArgumentException::fromEmptyCriteria(); @@ -663,7 +663,7 @@ public function delete($tableExpression, array $identifier, array $types = []) $this->addIdentifierCondition($identifier, $columns, $values, $conditions); return $this->executeUpdate( - 'DELETE FROM ' . $tableExpression . ' WHERE ' . implode(' AND ', $conditions), + 'DELETE FROM ' . $table . ' WHERE ' . implode(' AND ', $conditions), $values, is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types ); @@ -714,16 +714,16 @@ public function getTransactionIsolation() * * Table expression and columns are not escaped and are not safe for user-input. * - * @param string $tableExpression The expression of the table to update quoted or unquoted. - * @param mixed[] $data An associative array containing column-value pairs. - * @param mixed[] $identifier The update criteria. An associative array containing column-value pairs. - * @param int[]|string[] $types Types of the merged $data and $identifier arrays in that order. + * @param string $table The expression of the table to update quoted or unquoted. + * @param mixed[] $data An associative array containing column-value pairs. + * @param mixed[] $identifier The update criteria. An associative array containing column-value pairs. + * @param int[]|string[] $types Types of the merged $data and $identifier arrays in that order. * * @return int The number of affected rows. * * @throws DBALException */ - public function update($tableExpression, array $data, array $identifier, array $types = []) + public function update($table, array $data, array $identifier, array $types = []) { $columns = $values = $conditions = $set = []; @@ -739,7 +739,7 @@ public function update($tableExpression, array $data, array $identifier, array $ $types = $this->extractTypeValues($columns, $types); } - $sql = 'UPDATE ' . $tableExpression . ' SET ' . implode(', ', $set) + $sql = 'UPDATE ' . $table . ' SET ' . implode(', ', $set) . ' WHERE ' . implode(' AND ', $conditions); return $this->executeUpdate($sql, $values, $types); @@ -750,18 +750,18 @@ public function update($tableExpression, array $data, array $identifier, array $ * * Table expression and columns are not escaped and are not safe for user-input. * - * @param string $tableExpression The expression of the table to insert data into, quoted or unquoted. - * @param mixed[] $data An associative array containing column-value pairs. - * @param int[]|string[] $types Types of the inserted data. + * @param string $table The expression of the table to insert data into, quoted or unquoted. + * @param mixed[] $data An associative array containing column-value pairs. + * @param int[]|string[] $types Types of the inserted data. * * @return int The number of affected rows. * * @throws DBALException */ - public function insert($tableExpression, array $data, array $types = []) + public function insert($table, array $data, array $types = []) { if (empty($data)) { - return $this->executeUpdate('INSERT INTO ' . $tableExpression . ' () VALUES ()'); + return $this->executeUpdate('INSERT INTO ' . $table . ' () VALUES ()'); } $columns = []; @@ -775,7 +775,7 @@ public function insert($tableExpression, array $data, array $types = []) } return $this->executeUpdate( - 'INSERT INTO ' . $tableExpression . ' (' . implode(', ', $columns) . ')' . + 'INSERT INTO ' . $table . ' (' . implode(', ', $columns) . ')' . ' VALUES (' . implode(', ', $set) . ')', $values, is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types @@ -849,18 +849,18 @@ public function fetchAll($sql, array $params = [], $types = []) /** * Prepares an SQL statement. * - * @param string $statement The SQL statement to prepare. + * @param string $sql The SQL statement to prepare. * * @return Statement The prepared statement. * * @throws DBALException */ - public function prepare($statement) + public function prepare($sql) { try { - $stmt = new Statement($statement, $this); + $stmt = new Statement($sql, $this); } catch (Throwable $ex) { - throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $statement); + throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $sql); } $stmt->setFetchMode($this->defaultFetchMode); @@ -874,7 +874,7 @@ public function prepare($statement) * If the query is parametrized, a prepared statement is used. * If an SQLLogger is configured, the execution is logged. * - * @param string $query The SQL query to execute. + * @param string $sql The SQL query to execute. * @param mixed[] $params The parameters to bind to the query, if any. * @param int[]|string[] $types The types the previous parameters are in. * @param QueryCacheProfile|null $qcp The query cache profile, optional. @@ -883,24 +883,24 @@ public function prepare($statement) * * @throws DBALException */ - public function executeQuery($query, array $params = [], $types = [], ?QueryCacheProfile $qcp = null) + public function executeQuery($sql, array $params = [], $types = [], ?QueryCacheProfile $qcp = null) { if ($qcp !== null) { - return $this->executeCacheQuery($query, $params, $types, $qcp); + return $this->executeCacheQuery($sql, $params, $types, $qcp); } $connection = $this->getWrappedConnection(); $logger = $this->_config->getSQLLogger(); if ($logger) { - $logger->startQuery($query, $params, $types); + $logger->startQuery($sql, $params, $types); } try { if ($params) { - [$query, $params, $types] = SQLParserUtils::expandListParameters($query, $params, $types); + [$sql, $params, $types] = SQLParserUtils::expandListParameters($sql, $params, $types); - $stmt = $connection->prepare($query); + $stmt = $connection->prepare($sql); if ($types) { $this->_bindTypedValues($stmt, $params, $types); $stmt->execute(); @@ -908,10 +908,10 @@ public function executeQuery($query, array $params = [], $types = [], ?QueryCach $stmt->execute($params); } } else { - $stmt = $connection->query($query); + $stmt = $connection->query($sql); } } catch (Throwable $ex) { - throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $query, $this->resolveParams($params, $types)); + throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $sql, $this->resolveParams($params, $types)); } $stmt->setFetchMode($this->defaultFetchMode); @@ -926,7 +926,7 @@ public function executeQuery($query, array $params = [], $types = [], ?QueryCach /** * Executes a caching query. * - * @param string $query The SQL query to execute. + * @param string $sql The SQL query to execute. * @param mixed[] $params The parameters to bind to the query, if any. * @param int[]|string[] $types The types the previous parameters are in. * @param QueryCacheProfile $qcp The query cache profile. @@ -935,7 +935,7 @@ public function executeQuery($query, array $params = [], $types = [], ?QueryCach * * @throws CacheException */ - public function executeCacheQuery($query, $params, $types, QueryCacheProfile $qcp) + public function executeCacheQuery($sql, $params, $types, QueryCacheProfile $qcp) { $resultCache = $qcp->getResultCacheDriver() ?? $this->_config->getResultCacheImpl(); @@ -946,7 +946,7 @@ public function executeCacheQuery($query, $params, $types, QueryCacheProfile $qc $connectionParams = $this->getParams(); unset($connectionParams['platform']); - [$cacheKey, $realKey] = $qcp->generateCacheKeys($query, $params, $types, $connectionParams); + [$cacheKey, $realKey] = $qcp->generateCacheKeys($sql, $params, $types, $connectionParams); // fetch the row pointers entry $data = $resultCache->fetch($cacheKey); @@ -961,7 +961,7 @@ public function executeCacheQuery($query, $params, $types, QueryCacheProfile $qc } if (! isset($stmt)) { - $stmt = new ResultCacheStatement($this->executeQuery($query, $params, $types), $resultCache, $cacheKey, $realKey, $qcp->getLifetime()); + $stmt = new ResultCacheStatement($this->executeQuery($sql, $params, $types), $resultCache, $cacheKey, $realKey, $qcp->getLifetime()); } $stmt->setFetchMode($this->defaultFetchMode); @@ -973,7 +973,7 @@ public function executeCacheQuery($query, $params, $types, QueryCacheProfile $qc * Executes an, optionally parametrized, SQL query and returns the result, * applying a given projection/transformation function on each row of the result. * - * @param string $query The SQL query to execute. + * @param string $sql The SQL query to execute. * @param mixed[] $params The parameters, if any. * @param Closure $function The transformation function that is applied on each row. * The function receives a single parameter, an array, that @@ -981,10 +981,10 @@ public function executeCacheQuery($query, $params, $types, QueryCacheProfile $qc * * @return mixed[] The projected result of the query. */ - public function project($query, array $params, Closure $function) + public function project($sql, array $params, Closure $function) { $result = []; - $stmt = $this->executeQuery($query, $params); + $stmt = $this->executeQuery($sql, $params); while ($row = $stmt->fetch()) { $result[] = $function($row); @@ -1034,7 +1034,7 @@ public function query() * * This method supports PDO binding types as well as DBAL mapping types. * - * @param string $query The SQL query. + * @param string $sql The SQL query. * @param array $params The query parameters. * @param array $types The parameter types. * @@ -1042,20 +1042,20 @@ public function query() * * @throws DBALException */ - public function executeUpdate($query, array $params = [], array $types = []) + public function executeUpdate($sql, array $params = [], array $types = []) { $connection = $this->getWrappedConnection(); $logger = $this->_config->getSQLLogger(); if ($logger) { - $logger->startQuery($query, $params, $types); + $logger->startQuery($sql, $params, $types); } try { if ($params) { - [$query, $params, $types] = SQLParserUtils::expandListParameters($query, $params, $types); + [$sql, $params, $types] = SQLParserUtils::expandListParameters($sql, $params, $types); - $stmt = $connection->prepare($query); + $stmt = $connection->prepare($sql); if ($types) { $this->_bindTypedValues($stmt, $params, $types); @@ -1066,10 +1066,10 @@ public function executeUpdate($query, array $params = [], array $types = []) $result = $stmt->rowCount(); } else { - $result = $connection->exec($query); + $result = $connection->exec($sql); } } catch (Throwable $ex) { - throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $query, $this->resolveParams($params, $types)); + throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $sql, $this->resolveParams($params, $types)); } if ($logger) { @@ -1082,25 +1082,25 @@ public function executeUpdate($query, array $params = [], array $types = []) /** * Executes an SQL statement and return the number of affected rows. * - * @param string $statement + * @param string $sql * * @return int The number of affected rows. * * @throws DBALException */ - public function exec($statement) + public function exec($sql) { $connection = $this->getWrappedConnection(); $logger = $this->_config->getSQLLogger(); if ($logger) { - $logger->startQuery($statement); + $logger->startQuery($sql); } try { - $result = $connection->exec($statement); + $result = $connection->exec($sql); } catch (Throwable $ex) { - throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $statement); + throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $sql); } if ($logger) { @@ -1146,13 +1146,13 @@ public function errorInfo() * because the underlying database may not even support the notion of AUTO_INCREMENT/IDENTITY * columns or sequences. * - * @param string|null $seqName Name of the sequence object from which the ID should be returned. + * @param string|null $name Name of the sequence object from which the ID should be returned. * * @return string A string representation of the last inserted ID. */ - public function lastInsertId($seqName = null) + public function lastInsertId($name = null) { - return $this->getWrappedConnection()->lastInsertId($seqName); + return $this->getWrappedConnection()->lastInsertId($name); } /** diff --git a/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php b/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php index 9362bc0c636..29d494354a3 100644 --- a/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php +++ b/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php @@ -223,11 +223,11 @@ protected function chooseConnectionConfiguration($connectionName, $params) /** * {@inheritDoc} */ - public function executeUpdate($query, array $params = [], array $types = []) + public function executeUpdate($sql, array $params = [], array $types = []) { $this->connect('master'); - return parent::executeUpdate($query, $params, $types); + return parent::executeUpdate($sql, $params, $types); } /** @@ -263,11 +263,11 @@ public function rollBack() /** * {@inheritDoc} */ - public function delete($tableName, array $identifier, array $types = []) + public function delete($table, array $identifier, array $types = []) { $this->connect('master'); - return parent::delete($tableName, $identifier, $types); + return parent::delete($table, $identifier, $types); } /** @@ -286,31 +286,31 @@ public function close() /** * {@inheritDoc} */ - public function update($tableName, array $data, array $identifier, array $types = []) + public function update($table, array $data, array $identifier, array $types = []) { $this->connect('master'); - return parent::update($tableName, $data, $identifier, $types); + return parent::update($table, $data, $identifier, $types); } /** * {@inheritDoc} */ - public function insert($tableName, array $data, array $types = []) + public function insert($table, array $data, array $types = []) { $this->connect('master'); - return parent::insert($tableName, $data, $types); + return parent::insert($table, $data, $types); } /** * {@inheritDoc} */ - public function exec($statement) + public function exec($sql) { $this->connect('master'); - return parent::exec($statement); + return parent::exec($sql); } /** @@ -372,10 +372,10 @@ public function query() /** * {@inheritDoc} */ - public function prepare($statement) + public function prepare($sql) { $this->connect('master'); - return parent::prepare($statement); + return parent::prepare($sql); } } diff --git a/lib/Doctrine/DBAL/Driver/Connection.php b/lib/Doctrine/DBAL/Driver/Connection.php index 1574581c2ad..ea66c97effb 100644 --- a/lib/Doctrine/DBAL/Driver/Connection.php +++ b/lib/Doctrine/DBAL/Driver/Connection.php @@ -15,11 +15,11 @@ interface Connection /** * Prepares a statement for execution and returns a Statement object. * - * @param string $prepareString + * @param string $sql * * @return Statement */ - public function prepare($prepareString); + public function prepare($sql); /** * Executes an SQL statement, returning a result set as a Statement object. @@ -41,11 +41,11 @@ public function quote($input, $type = ParameterType::STRING); /** * Executes an SQL statement and return the number of affected rows. * - * @param string $statement + * @param string $sql * * @return int */ - public function exec($statement); + public function exec($sql); /** * Returns the ID of the last inserted row or sequence value. diff --git a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php index 493efb7716a..4d54f120b92 100644 --- a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php +++ b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php @@ -120,9 +120,9 @@ public function quote($input, $type = ParameterType::STRING) /** * {@inheritdoc} */ - public function exec($statement) + public function exec($sql) { - $stmt = @db2_exec($this->conn, $statement); + $stmt = @db2_exec($this->conn, $sql); if ($stmt === false) { throw new DB2Exception(db2_stmt_errormsg()); diff --git a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php index 302e759af2c..ac9212e115d 100644 --- a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php +++ b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php @@ -103,31 +103,31 @@ public function bindValue($param, $value, $type = ParameterType::STRING) /** * {@inheritdoc} */ - public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null) + public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null) { - assert(is_int($column)); + assert(is_int($param)); switch ($type) { case ParameterType::INTEGER: - $this->bind($column, $variable, DB2_PARAM_IN, DB2_LONG); + $this->bind($param, $variable, DB2_PARAM_IN, DB2_LONG); break; case ParameterType::LARGE_OBJECT: - if (isset($this->lobs[$column])) { - [, $handle] = $this->lobs[$column]; + if (isset($this->lobs[$param])) { + [, $handle] = $this->lobs[$param]; fclose($handle); } $handle = $this->createTemporaryFile(); $path = stream_get_meta_data($handle)['uri']; - $this->bind($column, $path, DB2_PARAM_FILE, DB2_BINARY); + $this->bind($param, $path, DB2_PARAM_FILE, DB2_BINARY); - $this->lobs[$column] = [&$variable, $handle]; + $this->lobs[$param] = [&$variable, $handle]; break; default: - $this->bind($column, $variable, DB2_PARAM_IN, DB2_CHAR); + $this->bind($param, $variable, DB2_PARAM_IN, DB2_CHAR); break; } diff --git a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php index ae9b4fef7a7..c34302f34e4 100644 --- a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php +++ b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php @@ -128,9 +128,9 @@ public function requiresQueryForServerVersion() /** * {@inheritdoc} */ - public function prepare($prepareString) + public function prepare($sql) { - return new MysqliStatement($this->conn, $prepareString); + return new MysqliStatement($this->conn, $sql); } /** @@ -157,9 +157,9 @@ public function quote($input, $type = ParameterType::STRING) /** * {@inheritdoc} */ - public function exec($statement) + public function exec($sql) { - if ($this->conn->query($statement) === false) { + if ($this->conn->query($sql) === false) { throw new MysqliException($this->conn->error, $this->conn->sqlstate, $this->conn->errno); } diff --git a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php index be852c1873a..4a8d96c8384 100644 --- a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php +++ b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php @@ -101,16 +101,16 @@ public function __construct(mysqli $conn, $prepareString) /** * {@inheritdoc} */ - public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null) + public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null) { - assert(is_int($column)); + assert(is_int($param)); if (! isset(self::$_paramTypeMap[$type])) { throw new MysqliException(sprintf("Unknown type: '%s'", $type)); } - $this->_bindedValues[$column] =& $variable; - $this->types[$column - 1] = self::$_paramTypeMap[$type]; + $this->_bindedValues[$param] =& $variable; + $this->types[$param - 1] = self::$_paramTypeMap[$type]; return true; } @@ -179,7 +179,7 @@ public function execute($params = null) // Bind row values _after_ storing the result. Otherwise, if mysqli is compiled with libmysql, // it will have to allocate as much memory as it may be needed for the given column type - // (e.g. for a LONGBLOB field it's 4 gigabytes) + // (e.g. for a LONGBLOB column it's 4 gigabytes) // @link https://bugs.php.net/bug.php?id=51386#1270673122 // // Make sure that the values are bound after each execution. Otherwise, if closeCursor() has been diff --git a/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php b/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php index eb31ace09e5..bacaa372b54 100644 --- a/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php +++ b/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php @@ -104,9 +104,9 @@ public function requiresQueryForServerVersion() /** * {@inheritdoc} */ - public function prepare($prepareString) + public function prepare($sql) { - return new OCI8Statement($this->dbh, $prepareString, $this); + return new OCI8Statement($this->dbh, $sql, $this); } /** @@ -140,9 +140,9 @@ public function quote($value, $type = ParameterType::STRING) /** * {@inheritdoc} */ - public function exec($statement) + public function exec($sql) { - $stmt = $this->prepare($statement); + $stmt = $this->prepare($sql); $stmt->execute(); return $stmt->rowCount(); diff --git a/lib/Doctrine/DBAL/Driver/PDOConnection.php b/lib/Doctrine/DBAL/Driver/PDOConnection.php index 7c38b4398e5..588afab5bb6 100644 --- a/lib/Doctrine/DBAL/Driver/PDOConnection.php +++ b/lib/Doctrine/DBAL/Driver/PDOConnection.php @@ -36,10 +36,10 @@ public function __construct($dsn, $user = null, $password = null, ?array $option /** * {@inheritdoc} */ - public function exec($statement) + public function exec($sql) { try { - $result = parent::exec($statement); + $result = parent::exec($sql); assert($result !== false); return $result; @@ -57,15 +57,15 @@ public function getServerVersion() } /** - * @param string $prepareString + * @param string $sql * @param array $driverOptions * * @return \PDOStatement */ - public function prepare($prepareString, $driverOptions = []) + public function prepare($sql, $driverOptions = []) { try { - $statement = parent::prepare($prepareString, $driverOptions); + $statement = parent::prepare($sql, $driverOptions); assert($statement instanceof \PDOStatement); return $statement; diff --git a/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php b/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php index 8d6521ff56c..fe58c752952 100644 --- a/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php +++ b/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php @@ -14,7 +14,7 @@ class Statement extends PDOStatement /** * {@inheritdoc} */ - public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null) + public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null) { if ( ($type === ParameterType::LARGE_OBJECT || $type === ParameterType::BINARY) @@ -23,7 +23,7 @@ public function bindParam($column, &$variable, $type = ParameterType::STRING, $l $driverOptions = PDO::SQLSRV_ENCODING_BINARY; } - return parent::bindParam($column, $variable, $type, $length, $driverOptions); + return parent::bindParam($param, $variable, $type, $length, $driverOptions); } /** diff --git a/lib/Doctrine/DBAL/Driver/PDOStatement.php b/lib/Doctrine/DBAL/Driver/PDOStatement.php index e0e8b66cccd..158f7c923af 100644 --- a/lib/Doctrine/DBAL/Driver/PDOStatement.php +++ b/lib/Doctrine/DBAL/Driver/PDOStatement.php @@ -87,7 +87,7 @@ public function bindValue($param, $value, $type = ParameterType::STRING) } /** - * @param mixed $column + * @param mixed $param * @param mixed $variable * @param int $type * @param int|null $length @@ -95,12 +95,12 @@ public function bindValue($param, $value, $type = ParameterType::STRING) * * @return bool */ - public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null) + public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null) { $type = $this->convertParamType($type); try { - return parent::bindParam($column, $variable, $type, ...array_slice(func_get_args(), 3)); + return parent::bindParam($param, $variable, $type, ...array_slice(func_get_args(), 3)); } catch (\PDOException $exception) { throw new PDOException($exception); } diff --git a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php index 10e284efd78..3a2e0b58996 100644 --- a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php +++ b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php @@ -108,9 +108,9 @@ public function errorInfo() /** * {@inheritdoc} */ - public function exec($statement) + public function exec($sql) { - if (sasql_real_query($this->connection, $statement) === false) { + if (sasql_real_query($this->connection, $sql) === false) { throw SQLAnywhereException::fromSQLAnywhereError($this->connection); } @@ -144,9 +144,9 @@ public function lastInsertId($name = null) /** * {@inheritdoc} */ - public function prepare($prepareString) + public function prepare($sql) { - return new SQLAnywhereStatement($this->connection, $prepareString); + return new SQLAnywhereStatement($this->connection, $sql); } /** diff --git a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php index 45e414acfde..fe96fe2592f 100644 --- a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php +++ b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php @@ -92,9 +92,9 @@ public function __construct($conn, $sql) * * @throws SQLAnywhereException */ - public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null) + public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null) { - assert(is_int($column)); + assert(is_int($param)); switch ($type) { case ParameterType::INTEGER: @@ -116,9 +116,9 @@ public function bindParam($column, &$variable, $type = ParameterType::STRING, $l throw new SQLAnywhereException('Unknown type: ' . $type); } - $this->boundValues[$column] =& $variable; + $this->boundValues[$param] =& $variable; - if (! sasql_stmt_bind_param_ex($this->stmt, $column - 1, $variable, $type, $variable === null)) { + if (! sasql_stmt_bind_param_ex($this->stmt, $param - 1, $variable, $type, $variable === null)) { throw SQLAnywhereException::fromSQLAnywhereError($this->conn, $this->stmt); } diff --git a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php index 7200c71eecf..e3fef63f14d 100644 --- a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php +++ b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php @@ -114,9 +114,9 @@ public function quote($value, $type = ParameterType::STRING) /** * {@inheritDoc} */ - public function exec($statement) + public function exec($sql) { - $stmt = sqlsrv_query($this->conn, $statement); + $stmt = sqlsrv_query($this->conn, $sql); if ($stmt === false) { throw SQLSrvException::fromSqlSrvErrors(); diff --git a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php index 9687b5c0fbb..e784da21eca 100644 --- a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php +++ b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php @@ -167,14 +167,14 @@ public function bindValue($param, $value, $type = ParameterType::STRING) /** * {@inheritdoc} */ - public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null) + public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null) { - if (! is_numeric($column)) { + if (! is_numeric($param)) { throw new SQLSrvException('sqlsrv does not support named parameters to queries, use question mark (?) placeholders instead.'); } - $this->variables[$column] =& $variable; - $this->types[$column] = $type; + $this->variables[$param] =& $variable; + $this->types[$param] = $type; // unset the statement resource if it exists as the new one will need to be bound to the new variable $this->stmt = null; diff --git a/lib/Doctrine/DBAL/Driver/Statement.php b/lib/Doctrine/DBAL/Driver/Statement.php index 3e483428980..be2e5d315fb 100644 --- a/lib/Doctrine/DBAL/Driver/Statement.php +++ b/lib/Doctrine/DBAL/Driver/Statement.php @@ -44,7 +44,7 @@ public function bindValue($param, $value, $type = ParameterType::STRING); * of stored procedures that return data as output parameters, and some also as input/output * parameters that both send in data and are updated to receive it. * - * @param int|string $column Parameter identifier. For a prepared statement using named placeholders, + * @param int|string $param Parameter identifier. For a prepared statement using named placeholders, * this will be a parameter name of the form :name. For a prepared statement using * question mark placeholders, this will be the 1-indexed position of the parameter. * @param mixed $variable Name of the PHP variable to bind to the SQL statement parameter. @@ -56,7 +56,7 @@ public function bindValue($param, $value, $type = ParameterType::STRING); * * @return bool TRUE on success or FALSE on failure. */ - public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null); + public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null); /** * Fetches the SQLSTATE associated with the last operation on the statement handle. diff --git a/lib/Doctrine/DBAL/Id/TableGenerator.php b/lib/Doctrine/DBAL/Id/TableGenerator.php index a3f7c12dd94..3a3b2caaee8 100644 --- a/lib/Doctrine/DBAL/Id/TableGenerator.php +++ b/lib/Doctrine/DBAL/Id/TableGenerator.php @@ -82,19 +82,19 @@ public function __construct(Connection $conn, $generatorTableName = 'sequences') /** * Generates the next unused value for the given sequence name. * - * @param string $sequenceName + * @param string $sequence * * @return int * * @throws DBALException */ - public function nextValue($sequenceName) + public function nextValue($sequence) { - if (isset($this->sequences[$sequenceName])) { - $value = $this->sequences[$sequenceName]['value']; - $this->sequences[$sequenceName]['value']++; - if ($this->sequences[$sequenceName]['value'] >= $this->sequences[$sequenceName]['max']) { - unset($this->sequences[$sequenceName]); + if (isset($this->sequences[$sequence])) { + $value = $this->sequences[$sequence]['value']; + $this->sequences[$sequence]['value']++; + if ($this->sequences[$sequence]['value'] >= $this->sequences[$sequence]['max']) { + unset($this->sequences[$sequence]); } return $value; @@ -107,7 +107,7 @@ public function nextValue($sequenceName) $sql = 'SELECT sequence_value, sequence_increment_by' . ' FROM ' . $platform->appendLockHint($this->generatorTableName, LockMode::PESSIMISTIC_WRITE) . ' WHERE sequence_name = ? ' . $platform->getWriteLockSQL(); - $stmt = $this->conn->executeQuery($sql, [$sequenceName]); + $stmt = $this->conn->executeQuery($sql, [$sequence]); $row = $stmt->fetch(FetchMode::ASSOCIATIVE); if ($row !== false) { @@ -119,7 +119,7 @@ public function nextValue($sequenceName) assert(is_int($value)); if ($row['sequence_increment_by'] > 1) { - $this->sequences[$sequenceName] = [ + $this->sequences[$sequence] = [ 'value' => $value, 'max' => $row['sequence_value'] + $row['sequence_increment_by'], ]; @@ -128,7 +128,7 @@ public function nextValue($sequenceName) $sql = 'UPDATE ' . $this->generatorTableName . ' ' . 'SET sequence_value = sequence_value + sequence_increment_by ' . 'WHERE sequence_name = ? AND sequence_value = ?'; - $rows = $this->conn->executeUpdate($sql, [$sequenceName, $row['sequence_value']]); + $rows = $this->conn->executeUpdate($sql, [$sequence, $row['sequence_value']]); if ($rows !== 1) { throw new DBALException('Race-condition detected while updating sequence. Aborting generation'); @@ -136,7 +136,7 @@ public function nextValue($sequenceName) } else { $this->conn->insert( $this->generatorTableName, - ['sequence_name' => $sequenceName, 'sequence_value' => 1, 'sequence_increment_by' => 1] + ['sequence_name' => $sequence, 'sequence_value' => 1, 'sequence_increment_by' => 1] ); $value = 1; } diff --git a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index f0a4af8e1b0..093550cfcdf 100644 --- a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -179,47 +179,47 @@ public function getEventManager() /** * Returns the SQL snippet that declares a boolean column. * - * @param mixed[] $columnDef + * @param mixed[] $column * * @return string */ - abstract public function getBooleanTypeDeclarationSQL(array $columnDef); + abstract public function getBooleanTypeDeclarationSQL(array $column); /** * Returns the SQL snippet that declares a 4 byte integer column. * - * @param mixed[] $columnDef + * @param mixed[] $column * * @return string */ - abstract public function getIntegerTypeDeclarationSQL(array $columnDef); + abstract public function getIntegerTypeDeclarationSQL(array $column); /** * Returns the SQL snippet that declares an 8 byte integer column. * - * @param mixed[] $columnDef + * @param mixed[] $column * * @return string */ - abstract public function getBigIntTypeDeclarationSQL(array $columnDef); + abstract public function getBigIntTypeDeclarationSQL(array $column); /** * Returns the SQL snippet that declares a 2 byte integer column. * - * @param mixed[] $columnDef + * @param mixed[] $column * * @return string */ - abstract public function getSmallIntTypeDeclarationSQL(array $columnDef); + abstract public function getSmallIntTypeDeclarationSQL(array $column); /** * Returns the SQL snippet that declares common properties of an integer column. * - * @param mixed[] $columnDef + * @param mixed[] $column * * @return string */ - abstract protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef); + abstract protected function _getCommonIntegerTypeDeclarationSQL(array $column); /** * Lazy load Doctrine Type Mappings. @@ -248,92 +248,92 @@ private function initializeAllDoctrineTypeMappings() /** * Returns the SQL snippet used to declare a VARCHAR column type. * - * @param mixed[] $field + * @param mixed[] $column * * @return string */ - public function getVarcharTypeDeclarationSQL(array $field) + public function getVarcharTypeDeclarationSQL(array $column) { - if (! isset($field['length'])) { - $field['length'] = $this->getVarcharDefaultLength(); + if (! isset($column['length'])) { + $column['length'] = $this->getVarcharDefaultLength(); } - $fixed = $field['fixed'] ?? false; + $fixed = $column['fixed'] ?? false; $maxLength = $fixed ? $this->getCharMaxLength() : $this->getVarcharMaxLength(); - if ($field['length'] > $maxLength) { - return $this->getClobTypeDeclarationSQL($field); + if ($column['length'] > $maxLength) { + return $this->getClobTypeDeclarationSQL($column); } - return $this->getVarcharTypeDeclarationSQLSnippet($field['length'], $fixed); + return $this->getVarcharTypeDeclarationSQLSnippet($column['length'], $fixed); } /** * Returns the SQL snippet used to declare a BINARY/VARBINARY column type. * - * @param mixed[] $field The column definition. + * @param mixed[] $column The column definition. * * @return string */ - public function getBinaryTypeDeclarationSQL(array $field) + public function getBinaryTypeDeclarationSQL(array $column) { - if (! isset($field['length'])) { - $field['length'] = $this->getBinaryDefaultLength(); + if (! isset($column['length'])) { + $column['length'] = $this->getBinaryDefaultLength(); } - $fixed = $field['fixed'] ?? false; + $fixed = $column['fixed'] ?? false; $maxLength = $this->getBinaryMaxLength(); - if ($field['length'] > $maxLength) { + if ($column['length'] > $maxLength) { if ($maxLength > 0) { @trigger_error(sprintf( - 'Binary field length %d is greater than supported by the platform (%d). Reduce the field length or use a BLOB field instead.', - $field['length'], + 'Binary column length %d is greater than supported by the platform (%d). Reduce the column length or use a BLOB column instead.', + $column['length'], $maxLength ), E_USER_DEPRECATED); } - return $this->getBlobTypeDeclarationSQL($field); + return $this->getBlobTypeDeclarationSQL($column); } - return $this->getBinaryTypeDeclarationSQLSnippet($field['length'], $fixed); + return $this->getBinaryTypeDeclarationSQLSnippet($column['length'], $fixed); } /** - * Returns the SQL snippet to declare a GUID/UUID field. + * Returns the SQL snippet to declare a GUID/UUID column. * * By default this maps directly to a CHAR(36) and only maps to more * special datatypes when the underlying databases support this datatype. * - * @param mixed[] $field + * @param mixed[] $column * * @return string */ - public function getGuidTypeDeclarationSQL(array $field) + public function getGuidTypeDeclarationSQL(array $column) { - $field['length'] = 36; - $field['fixed'] = true; + $column['length'] = 36; + $column['fixed'] = true; - return $this->getVarcharTypeDeclarationSQL($field); + return $this->getVarcharTypeDeclarationSQL($column); } /** - * Returns the SQL snippet to declare a JSON field. + * Returns the SQL snippet to declare a JSON column. * * By default this maps directly to a CLOB and only maps to more * special datatypes when the underlying databases support this datatype. * - * @param mixed[] $field + * @param mixed[] $column * * @return string */ - public function getJsonTypeDeclarationSQL(array $field) + public function getJsonTypeDeclarationSQL(array $column) { - return $this->getClobTypeDeclarationSQL($field); + return $this->getClobTypeDeclarationSQL($column); } /** @@ -367,20 +367,20 @@ protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) /** * Returns the SQL snippet used to declare a CLOB column type. * - * @param mixed[] $field + * @param mixed[] $column * * @return string */ - abstract public function getClobTypeDeclarationSQL(array $field); + abstract public function getClobTypeDeclarationSQL(array $column); /** * Returns the SQL Snippet used to declare a BLOB column type. * - * @param mixed[] $field + * @param mixed[] $column * * @return string */ - abstract public function getBlobTypeDeclarationSQL(array $field); + abstract public function getBlobTypeDeclarationSQL(array $column); /** * Gets the name of the platform. @@ -574,7 +574,7 @@ public function getSqlCommentEndString() } /** - * Gets the maximum length of a char field. + * Gets the maximum length of a char column. */ public function getCharMaxLength(): int { @@ -582,7 +582,7 @@ public function getCharMaxLength(): int } /** - * Gets the maximum length of a varchar field. + * Gets the maximum length of a varchar column. * * @return int */ @@ -592,7 +592,7 @@ public function getVarcharMaxLength() } /** - * Gets the default length of a varchar field. + * Gets the default length of a varchar column. * * @return int */ @@ -602,7 +602,7 @@ public function getVarcharDefaultLength() } /** - * Gets the maximum length of a binary field. + * Gets the maximum length of a binary column. * * @return int */ @@ -612,7 +612,7 @@ public function getBinaryMaxLength() } /** - * Gets the default length of a binary field. + * Gets the default length of a binary column. * * @return int */ @@ -722,7 +722,7 @@ public function getSumExpression($column) // scalar functions /** - * Returns the SQL snippet to get the md5 sum of a field. + * Returns the SQL snippet to get the md5 sum of a column. * * Note: Not SQL92, but common functionality. * @@ -736,7 +736,7 @@ public function getMd5Expression($column) } /** - * Returns the SQL snippet to get the length of a text field. + * Returns the SQL snippet to get the length of a text column. * * @param string $column * @@ -760,7 +760,7 @@ public function getSqrtExpression($column) } /** - * Returns the SQL snippet to round a numeric field to the number of decimals specified. + * Returns the SQL snippet to round a numeric column to the number of decimals specified. * * @param string $column * @param int $decimals @@ -2175,69 +2175,69 @@ protected function _getAlterTableIndexForeignKeySQL(TableDiff $diff) } /** - * Gets declaration of a number of fields in bulk. + * Gets declaration of a number of columns in bulk. * - * @param mixed[][] $fields A multidimensional associative array. - * The first dimension determines the field name, while the second - * dimension is keyed with the name of the properties - * of the field being declared as array indexes. Currently, the types - * of supported field properties are as follows: + * @param mixed[][] $columns A multidimensional associative array. + * The first dimension determines the column name, while the second + * dimension is keyed with the name of the properties + * of the column being declared as array indexes. Currently, the types + * of supported column properties are as follows: * * length * Integer value that determines the maximum length of the text - * field. If this argument is missing the field should be + * column. If this argument is missing the column should be * declared to have the longest length allowed by the DBMS. * * default - * Text value to be used as default for this field. + * Text value to be used as default for this column. * * notnull - * Boolean flag that indicates whether this field is constrained + * Boolean flag that indicates whether this column is constrained * to not be set to null. * charset - * Text value with the default CHARACTER SET for this field. + * Text value with the default CHARACTER SET for this column. * collation - * Text value with the default COLLATION for this field. + * Text value with the default COLLATION for this column. * unique * unique constraint * * @return string */ - public function getColumnDeclarationListSQL(array $fields) + public function getColumnDeclarationListSQL(array $columns) { - $queryFields = []; + $declarations = []; - foreach ($fields as $fieldName => $field) { - $queryFields[] = $this->getColumnDeclarationSQL($fieldName, $field); + foreach ($columns as $name => $column) { + $declarations[] = $this->getColumnDeclarationSQL($name, $column); } - return implode(', ', $queryFields); + return implode(', ', $declarations); } /** * Obtains DBMS specific SQL code portion needed to declare a generic type - * field to be used in statements like CREATE TABLE. + * column to be used in statements like CREATE TABLE. * - * @param string $name The name the field to be declared. - * @param mixed[] $field An associative array with the name of the properties - * of the field being declared as array indexes. Currently, the types - * of supported field properties are as follows: + * @param string $name The name the column to be declared. + * @param mixed[] $column An associative array with the name of the properties + * of the column being declared as array indexes. Currently, the types + * of supported column properties are as follows: * * length * Integer value that determines the maximum length of the text - * field. If this argument is missing the field should be + * column. If this argument is missing the column should be * declared to have the longest length allowed by the DBMS. * * default - * Text value to be used as default for this field. + * Text value to be used as default for this column. * * notnull - * Boolean flag that indicates whether this field is constrained + * Boolean flag that indicates whether this column is constrained * to not be set to null. * charset - * Text value with the default CHARACTER SET for this field. + * Text value with the default CHARACTER SET for this column. * collation - * Text value with the default COLLATION for this field. + * Text value with the default COLLATION for this column. * unique * unique constraint * check @@ -2247,76 +2247,76 @@ public function getColumnDeclarationListSQL(array $fields) * * @return string DBMS specific SQL code portion that should be used to declare the column. */ - public function getColumnDeclarationSQL($name, array $field) + public function getColumnDeclarationSQL($name, array $column) { - if (isset($field['columnDefinition'])) { - $columnDef = $this->getCustomTypeDeclarationSQL($field); + if (isset($column['columnDefinition'])) { + $declaration = $this->getCustomTypeDeclarationSQL($column); } else { - $default = $this->getDefaultValueDeclarationSQL($field); + $default = $this->getDefaultValueDeclarationSQL($column); - $charset = isset($field['charset']) && $field['charset'] ? - ' ' . $this->getColumnCharsetDeclarationSQL($field['charset']) : ''; + $charset = isset($column['charset']) && $column['charset'] ? + ' ' . $this->getColumnCharsetDeclarationSQL($column['charset']) : ''; - $collation = isset($field['collation']) && $field['collation'] ? - ' ' . $this->getColumnCollationDeclarationSQL($field['collation']) : ''; + $collation = isset($column['collation']) && $column['collation'] ? + ' ' . $this->getColumnCollationDeclarationSQL($column['collation']) : ''; - $notnull = isset($field['notnull']) && $field['notnull'] ? ' NOT NULL' : ''; + $notnull = isset($column['notnull']) && $column['notnull'] ? ' NOT NULL' : ''; - $unique = isset($field['unique']) && $field['unique'] ? + $unique = isset($column['unique']) && $column['unique'] ? ' ' . $this->getUniqueFieldDeclarationSQL() : ''; - $check = isset($field['check']) && $field['check'] ? - ' ' . $field['check'] : ''; + $check = isset($column['check']) && $column['check'] ? + ' ' . $column['check'] : ''; - $typeDecl = $field['type']->getSQLDeclaration($field, $this); - $columnDef = $typeDecl . $charset . $default . $notnull . $unique . $check . $collation; + $typeDecl = $column['type']->getSQLDeclaration($column, $this); + $declaration = $typeDecl . $charset . $default . $notnull . $unique . $check . $collation; - if ($this->supportsInlineColumnComments() && isset($field['comment']) && $field['comment'] !== '') { - $columnDef .= ' ' . $this->getInlineColumnCommentSQL($field['comment']); + if ($this->supportsInlineColumnComments() && isset($column['comment']) && $column['comment'] !== '') { + $declaration .= ' ' . $this->getInlineColumnCommentSQL($column['comment']); } } - return $name . ' ' . $columnDef; + return $name . ' ' . $declaration; } /** * Returns the SQL snippet that declares a floating point column of arbitrary precision. * - * @param mixed[] $columnDef + * @param mixed[] $column * * @return string */ - public function getDecimalTypeDeclarationSQL(array $columnDef) + public function getDecimalTypeDeclarationSQL(array $column) { - $columnDef['precision'] = ! isset($columnDef['precision']) || empty($columnDef['precision']) - ? 10 : $columnDef['precision']; - $columnDef['scale'] = ! isset($columnDef['scale']) || empty($columnDef['scale']) - ? 0 : $columnDef['scale']; + $column['precision'] = ! isset($column['precision']) || empty($column['precision']) + ? 10 : $column['precision']; + $column['scale'] = ! isset($column['scale']) || empty($column['scale']) + ? 0 : $column['scale']; - return 'NUMERIC(' . $columnDef['precision'] . ', ' . $columnDef['scale'] . ')'; + return 'NUMERIC(' . $column['precision'] . ', ' . $column['scale'] . ')'; } /** * Obtains DBMS specific SQL code portion needed to set a default value * declaration to be used in statements like CREATE TABLE. * - * @param mixed[] $field The field definition array. + * @param mixed[] $column The column definition array. * * @return string DBMS specific SQL code portion needed to set a default value. */ - public function getDefaultValueDeclarationSQL($field) + public function getDefaultValueDeclarationSQL($column) { - if (! isset($field['default'])) { - return empty($field['notnull']) ? ' DEFAULT NULL' : ''; + if (! isset($column['default'])) { + return empty($column['notnull']) ? ' DEFAULT NULL' : ''; } - $default = $field['default']; + $default = $column['default']; - if (! isset($field['type'])) { + if (! isset($column['type'])) { return " DEFAULT '" . $default . "'"; } - $type = $field['type']; + $type = $column['type']; if ($type instanceof Types\PhpIntegerMappingType) { return ' DEFAULT ' . $default; @@ -2352,16 +2352,16 @@ public function getDefaultValueDeclarationSQL($field) public function getCheckDeclarationSQL(array $definition) { $constraints = []; - foreach ($definition as $field => $def) { + foreach ($definition as $column => $def) { if (is_string($def)) { $constraints[] = 'CHECK (' . $def . ')'; } else { if (isset($def['min'])) { - $constraints[] = 'CHECK (' . $field . ' >= ' . $def['min'] . ')'; + $constraints[] = 'CHECK (' . $column . ' >= ' . $def['min'] . ')'; } if (isset($def['max'])) { - $constraints[] = 'CHECK (' . $field . ' <= ' . $def['max'] . ')'; + $constraints[] = 'CHECK (' . $column . ' <= ' . $def['max'] . ')'; } } } @@ -2421,16 +2421,16 @@ public function getIndexDeclarationSQL($name, Index $index) /** * Obtains SQL code portion needed to create a custom column, - * e.g. when a field has the "columnDefinition" keyword. + * e.g. when a column has the "columnDefinition" keyword. * Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate. * - * @param mixed[] $columnDef + * @param mixed[] $column * * @return string */ - public function getCustomTypeDeclarationSQL(array $columnDef) + public function getCustomTypeDeclarationSQL(array $column) { - return $columnDef['columnDefinition']; + return $column['columnDefinition']; } /** @@ -2495,10 +2495,10 @@ public function getTemporaryTableName($tableName) /** * Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint - * of a field declaration to be used in statements like CREATE TABLE. + * of a column declaration to be used in statements like CREATE TABLE. * * @return string DBMS specific SQL code portion needed to set the FOREIGN KEY constraint - * of a field declaration. + * of a column declaration. */ public function getForeignKeyDeclarationSQL(ForeignKeyConstraint $foreignKey) { @@ -2557,7 +2557,7 @@ public function getForeignKeyReferentialActionSQL($action) /** * Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint - * of a field declaration to be used in statements like CREATE TABLE. + * of a column declaration to be used in statements like CREATE TABLE. * * @return string * @@ -2592,10 +2592,10 @@ public function getForeignKeyBaseDeclarationSQL(ForeignKeyConstraint $foreignKey /** * Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint - * of a field declaration to be used in statements like CREATE TABLE. + * of a column declaration to be used in statements like CREATE TABLE. * * @return string DBMS specific SQL code portion needed to set the UNIQUE constraint - * of a field declaration. + * of a column declaration. */ public function getUniqueFieldDeclarationSQL() { @@ -2604,12 +2604,12 @@ public function getUniqueFieldDeclarationSQL() /** * Obtains DBMS specific SQL code portion needed to set the CHARACTER SET - * of a field declaration to be used in statements like CREATE TABLE. + * of a column declaration to be used in statements like CREATE TABLE. * * @param string $charset The name of the charset. * * @return string DBMS specific SQL code portion needed to set the CHARACTER SET - * of a field declaration. + * of a column declaration. */ public function getColumnCharsetDeclarationSQL($charset) { @@ -2618,12 +2618,12 @@ public function getColumnCharsetDeclarationSQL($charset) /** * Obtains DBMS specific SQL code portion needed to set the COLLATION - * of a field declaration to be used in statements like CREATE TABLE. + * of a column declaration to be used in statements like CREATE TABLE. * * @param string $collation The name of the collation. * * @return string DBMS specific SQL code portion needed to set the COLLATION - * of a field declaration. + * of a column declaration. */ public function getColumnCollationDeclarationSQL($collation) { @@ -2875,13 +2875,13 @@ public function getListViewsSQL($database) * requests may be impossible. * * @param string $table - * @param string $currentDatabase + * @param string $database * * @return string * * @throws DBALException If not supported on this platform. */ - public function getListTableIndexesSQL($table, $currentDatabase = null) + public function getListTableIndexesSQL($table, $database = null) { throw DBALException::notSupported(__METHOD__); } @@ -2938,13 +2938,13 @@ public function getDropSequenceSQL($sequence) } /** - * @param string $sequenceName + * @param string $sequence * * @return string * * @throws DBALException If not supported on this platform. */ - public function getSequenceNextValSQL($sequenceName) + public function getSequenceNextValSQL($sequence) { throw DBALException::notSupported(__METHOD__); } @@ -2978,68 +2978,68 @@ public function getSetTransactionIsolationSQL($level) } /** - * Obtains DBMS specific SQL to be used to create datetime fields in + * Obtains DBMS specific SQL to be used to create datetime columns in * statements like CREATE TABLE. * - * @param mixed[] $fieldDeclaration + * @param mixed[] $column * * @return string * * @throws DBALException If not supported on this platform. */ - public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTypeDeclarationSQL(array $column) { throw DBALException::notSupported(__METHOD__); } /** - * Obtains DBMS specific SQL to be used to create datetime with timezone offset fields. + * Obtains DBMS specific SQL to be used to create datetime with timezone offset columns. * - * @param mixed[] $fieldDeclaration + * @param mixed[] $column * * @return string */ - public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTzTypeDeclarationSQL(array $column) { - return $this->getDateTimeTypeDeclarationSQL($fieldDeclaration); + return $this->getDateTimeTypeDeclarationSQL($column); } /** - * Obtains DBMS specific SQL to be used to create date fields in statements + * Obtains DBMS specific SQL to be used to create date columns in statements * like CREATE TABLE. * - * @param mixed[] $fieldDeclaration + * @param mixed[] $column * * @return string * * @throws DBALException If not supported on this platform. */ - public function getDateTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTypeDeclarationSQL(array $column) { throw DBALException::notSupported(__METHOD__); } /** - * Obtains DBMS specific SQL to be used to create time fields in statements + * Obtains DBMS specific SQL to be used to create time columns in statements * like CREATE TABLE. * - * @param mixed[] $fieldDeclaration + * @param mixed[] $column * * @return string * * @throws DBALException If not supported on this platform. */ - public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getTimeTypeDeclarationSQL(array $column) { throw DBALException::notSupported(__METHOD__); } /** - * @param mixed[] $fieldDeclaration + * @param mixed[] $column * * @return string */ - public function getFloatDeclarationSQL(array $fieldDeclaration) + public function getFloatDeclarationSQL(array $column) { return 'DOUBLE PRECISION'; } diff --git a/lib/Doctrine/DBAL/Platforms/DB2Platform.php b/lib/Doctrine/DBAL/Platforms/DB2Platform.php index 297e43ced6a..427519a7e3d 100644 --- a/lib/Doctrine/DBAL/Platforms/DB2Platform.php +++ b/lib/Doctrine/DBAL/Platforms/DB2Platform.php @@ -47,22 +47,22 @@ public function getBinaryDefaultLength() /** * {@inheritDoc} */ - public function getVarcharTypeDeclarationSQL(array $field) + public function getVarcharTypeDeclarationSQL(array $column) { // for IBM DB2, the CHAR max length is less than VARCHAR default length - if (! isset($field['length']) && ! empty($field['fixed'])) { - $field['length'] = $this->getCharMaxLength(); + if (! isset($column['length']) && ! empty($column['fixed'])) { + $column['length'] = $this->getCharMaxLength(); } - return parent::getVarcharTypeDeclarationSQL($field); + return parent::getVarcharTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getBlobTypeDeclarationSQL(array $field) + public function getBlobTypeDeclarationSQL(array $column) { - // todo blob(n) with $field['length']; + // todo blob(n) with $column['length']; return 'BLOB(1M)'; } @@ -124,9 +124,9 @@ protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) /** * {@inheritDoc} */ - public function getClobTypeDeclarationSQL(array $field) + public function getClobTypeDeclarationSQL(array $column) { - // todo clob(n) with $field['length']; + // todo clob(n) with $column['length']; return 'CLOB(1M)'; } @@ -141,7 +141,7 @@ public function getName() /** * {@inheritDoc} */ - public function getBooleanTypeDeclarationSQL(array $columnDef) + public function getBooleanTypeDeclarationSQL(array $column) { return 'SMALLINT'; } @@ -149,34 +149,34 @@ public function getBooleanTypeDeclarationSQL(array $columnDef) /** * {@inheritDoc} */ - public function getIntegerTypeDeclarationSQL(array $columnDef) + public function getIntegerTypeDeclarationSQL(array $column) { - return 'INTEGER' . $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + return 'INTEGER' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getBigIntTypeDeclarationSQL(array $columnDef) + public function getBigIntTypeDeclarationSQL(array $column) { - return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getSmallIntTypeDeclarationSQL(array $columnDef) + public function getSmallIntTypeDeclarationSQL(array $column) { - return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + protected function _getCommonIntegerTypeDeclarationSQL(array $column) { $autoinc = ''; - if (! empty($columnDef['autoincrement'])) { + if (! empty($column['autoincrement'])) { $autoinc = ' GENERATED BY DEFAULT AS IDENTITY'; } @@ -230,9 +230,9 @@ public function getDateDiffExpression($date1, $date2) /** * {@inheritDoc} */ - public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTypeDeclarationSQL(array $column) { - if (isset($fieldDeclaration['version']) && $fieldDeclaration['version'] === true) { + if (isset($column['version']) && $column['version'] === true) { return 'TIMESTAMP(0) WITH DEFAULT'; } @@ -242,7 +242,7 @@ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getDateTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTypeDeclarationSQL(array $column) { return 'DATE'; } @@ -250,7 +250,7 @@ public function getDateTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getTimeTypeDeclarationSQL(array $column) { return 'TIME'; } @@ -340,7 +340,7 @@ public function getListViewsSQL($database) /** * {@inheritDoc} */ - public function getListTableIndexesSQL($table, $currentDatabase = null) + public function getListTableIndexesSQL($table, $database = null) { $table = $this->quoteStringLiteral($table); @@ -750,19 +750,19 @@ protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName) /** * {@inheritDoc} */ - public function getDefaultValueDeclarationSQL($field) + public function getDefaultValueDeclarationSQL($column) { - if (! empty($field['autoincrement'])) { + if (! empty($column['autoincrement'])) { return ''; } - if (isset($field['version']) && $field['version']) { - if ((string) $field['type'] !== 'DateTime') { - $field['default'] = '1'; + if (isset($column['version']) && $column['version']) { + if ((string) $column['type'] !== 'DateTime') { + $column['default'] = '1'; } } - return parent::getDefaultValueDeclarationSQL($field); + return parent::getDefaultValueDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php b/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php index 78d44e3948c..f4d178b42cd 100644 --- a/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php @@ -72,7 +72,7 @@ public function getDateDiffExpression($date1, $date2) /** * {@inheritDoc} */ - public function getBooleanTypeDeclarationSQL(array $field) + public function getBooleanTypeDeclarationSQL(array $column) { return 'BOOLEAN'; } @@ -80,18 +80,18 @@ public function getBooleanTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getIntegerTypeDeclarationSQL(array $field) + public function getIntegerTypeDeclarationSQL(array $column) { - return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + protected function _getCommonIntegerTypeDeclarationSQL(array $column) { $autoinc = ''; - if (! empty($columnDef['autoincrement'])) { + if (! empty($column['autoincrement'])) { $autoinc = ' AUTO_INCREMENT'; } @@ -101,17 +101,17 @@ protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) /** * {@inheritDoc} */ - public function getBigIntTypeDeclarationSQL(array $field) + public function getBigIntTypeDeclarationSQL(array $column) { - return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getSmallIntTypeDeclarationSQL(array $field) + public function getSmallIntTypeDeclarationSQL(array $column) { - return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** @@ -155,7 +155,7 @@ protected function initializeDoctrineTypeMappings() /** * {@inheritDoc} */ - public function getClobTypeDeclarationSQL(array $field) + public function getClobTypeDeclarationSQL(array $column) { return 'TEXT'; } @@ -163,7 +163,7 @@ public function getClobTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getBlobTypeDeclarationSQL(array $field) + public function getBlobTypeDeclarationSQL(array $column) { return 'BLOB'; } @@ -451,9 +451,9 @@ protected function getDropPrimaryKeySQL($table) /** * {@inheritDoc} */ - public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTypeDeclarationSQL(array $column) { - if (isset($fieldDeclaration['version']) && $fieldDeclaration['version'] === true) { + if (isset($column['version']) && $column['version'] === true) { return 'TIMESTAMP'; } @@ -463,7 +463,7 @@ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getTimeTypeDeclarationSQL(array $column) { return 'TIME'; } @@ -471,7 +471,7 @@ public function getTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getDateTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTypeDeclarationSQL(array $column) { return 'DATE'; } diff --git a/lib/Doctrine/DBAL/Platforms/MariaDb1027Platform.php b/lib/Doctrine/DBAL/Platforms/MariaDb1027Platform.php index 03b59e2322e..32a7c065abf 100644 --- a/lib/Doctrine/DBAL/Platforms/MariaDb1027Platform.php +++ b/lib/Doctrine/DBAL/Platforms/MariaDb1027Platform.php @@ -16,7 +16,7 @@ final class MariaDb1027Platform extends MySqlPlatform * * @link https://mariadb.com/kb/en/library/json-data-type/ */ - public function getJsonTypeDeclarationSQL(array $field): string + public function getJsonTypeDeclarationSQL(array $column): string { return 'LONGTEXT'; } diff --git a/lib/Doctrine/DBAL/Platforms/MySQL57Platform.php b/lib/Doctrine/DBAL/Platforms/MySQL57Platform.php index 1db7d6689b7..5ef44b2e366 100644 --- a/lib/Doctrine/DBAL/Platforms/MySQL57Platform.php +++ b/lib/Doctrine/DBAL/Platforms/MySQL57Platform.php @@ -22,7 +22,7 @@ public function hasNativeJsonType() /** * {@inheritdoc} */ - public function getJsonTypeDeclarationSQL(array $field) + public function getJsonTypeDeclarationSQL(array $column) { return 'JSON'; } diff --git a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php index efda7ee0017..65a9a9b4682 100644 --- a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php @@ -149,16 +149,16 @@ public function getListTableConstraintsSQL($table) * Two approaches to listing the table indexes. The information_schema is * preferred, because it doesn't cause problems with SQL keywords such as "order" or "table". */ - public function getListTableIndexesSQL($table, $currentDatabase = null) + public function getListTableIndexesSQL($table, $database = null) { - if ($currentDatabase) { - $currentDatabase = $this->quoteStringLiteral($currentDatabase); - $table = $this->quoteStringLiteral($table); + if ($database) { + $database = $this->quoteStringLiteral($database); + $table = $this->quoteStringLiteral($table); return 'SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name,' . ' SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type' . ' FROM information_schema.STATISTICS WHERE TABLE_NAME = ' . $table . - ' AND TABLE_SCHEMA = ' . $currentDatabase . + ' AND TABLE_SCHEMA = ' . $database . ' ORDER BY SEQ_IN_INDEX ASC'; } @@ -246,10 +246,10 @@ protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) * * {@inheritDoc} */ - public function getClobTypeDeclarationSQL(array $field) + public function getClobTypeDeclarationSQL(array $column) { - if (! empty($field['length']) && is_numeric($field['length'])) { - $length = $field['length']; + if (! empty($column['length']) && is_numeric($column['length'])) { + $length = $column['length']; if ($length <= static::LENGTH_LIMIT_TINYTEXT) { return 'TINYTEXT'; @@ -270,9 +270,9 @@ public function getClobTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTypeDeclarationSQL(array $column) { - if (isset($fieldDeclaration['version']) && $fieldDeclaration['version'] === true) { + if (isset($column['version']) && $column['version'] === true) { return 'TIMESTAMP'; } @@ -282,7 +282,7 @@ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getDateTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTypeDeclarationSQL(array $column) { return 'DATE'; } @@ -290,7 +290,7 @@ public function getDateTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getTimeTypeDeclarationSQL(array $column) { return 'TIME'; } @@ -298,21 +298,21 @@ public function getTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getBooleanTypeDeclarationSQL(array $field) + public function getBooleanTypeDeclarationSQL(array $column) { return 'TINYINT(1)'; } /** * Obtain DBMS specific SQL code portion needed to set the COLLATION - * of a field declaration to be used in statements like CREATE TABLE. + * of a column declaration to be used in statements like CREATE TABLE. * * @deprecated Deprecated since version 2.5, Use {@link self::getColumnCollationDeclarationSQL()} instead. * * @param string $collation name of the collation * * @return string DBMS specific SQL code portion needed to set the COLLATION - * of a field declaration. + * of a column declaration. */ public function getCollationFieldDeclaration($collation) { @@ -470,14 +470,14 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options /** * {@inheritdoc} */ - public function getDefaultValueDeclarationSQL($field) + public function getDefaultValueDeclarationSQL($column) { - // Unset the default value if the given field definition does not allow default values. - if ($field['type'] instanceof TextType || $field['type'] instanceof BlobType) { - $field['default'] = null; + // Unset the default value if the given column definition does not allow default values. + if ($column['type'] instanceof TextType || $column['type'] instanceof BlobType) { + $column['default'] = null; } - return parent::getDefaultValueDeclarationSQL($field); + return parent::getDefaultValueDeclarationSQL($column); } /** @@ -903,41 +903,41 @@ protected function getCreateIndexSQLFlags(Index $index) /** * {@inheritDoc} */ - public function getIntegerTypeDeclarationSQL(array $field) + public function getIntegerTypeDeclarationSQL(array $column) { - return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getBigIntTypeDeclarationSQL(array $field) + public function getBigIntTypeDeclarationSQL(array $column) { - return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getSmallIntTypeDeclarationSQL(array $field) + public function getSmallIntTypeDeclarationSQL(array $column) { - return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritdoc} */ - public function getFloatDeclarationSQL(array $field) + public function getFloatDeclarationSQL(array $column) { - return 'DOUBLE PRECISION' . $this->getUnsignedDeclaration($field); + return 'DOUBLE PRECISION' . $this->getUnsignedDeclaration($column); } /** * {@inheritdoc} */ - public function getDecimalTypeDeclarationSQL(array $columnDef) + public function getDecimalTypeDeclarationSQL(array $column) { - return parent::getDecimalTypeDeclarationSQL($columnDef) . $this->getUnsignedDeclaration($columnDef); + return parent::getDecimalTypeDeclarationSQL($column) . $this->getUnsignedDeclaration($column); } /** @@ -955,14 +955,14 @@ private function getUnsignedDeclaration(array $columnDef) /** * {@inheritDoc} */ - protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + protected function _getCommonIntegerTypeDeclarationSQL(array $column) { $autoinc = ''; - if (! empty($columnDef['autoincrement'])) { + if (! empty($column['autoincrement'])) { $autoinc = ' AUTO_INCREMENT'; } - return $this->getUnsignedDeclaration($columnDef) . $autoinc; + return $this->getUnsignedDeclaration($column) . $autoinc; } /** @@ -1147,10 +1147,10 @@ public function getDropTemporaryTableSQL($table) * * {@inheritDoc} */ - public function getBlobTypeDeclarationSQL(array $field) + public function getBlobTypeDeclarationSQL(array $column) { - if (! empty($field['length']) && is_numeric($field['length'])) { - $length = $field['length']; + if (! empty($column['length']) && is_numeric($column['length'])) { + $length = $column['length']; if ($length <= static::LENGTH_LIMIT_TINYBLOB) { return 'TINYBLOB'; diff --git a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php index 279b47d91b1..097bc15f28f 100644 --- a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -222,9 +222,9 @@ private function getSequenceCacheSQL(Sequence $sequence) /** * {@inheritDoc} */ - public function getSequenceNextValSQL($sequenceName) + public function getSequenceNextValSQL($sequence) { - return 'SELECT ' . $sequenceName . '.nextval FROM DUAL'; + return 'SELECT ' . $sequence . '.nextval FROM DUAL'; } /** @@ -259,7 +259,7 @@ protected function _getTransactionIsolationLevelSQL($level) /** * {@inheritDoc} */ - public function getBooleanTypeDeclarationSQL(array $field) + public function getBooleanTypeDeclarationSQL(array $column) { return 'NUMBER(1)'; } @@ -267,7 +267,7 @@ public function getBooleanTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getIntegerTypeDeclarationSQL(array $field) + public function getIntegerTypeDeclarationSQL(array $column) { return 'NUMBER(10)'; } @@ -275,7 +275,7 @@ public function getIntegerTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getBigIntTypeDeclarationSQL(array $field) + public function getBigIntTypeDeclarationSQL(array $column) { return 'NUMBER(20)'; } @@ -283,7 +283,7 @@ public function getBigIntTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getSmallIntTypeDeclarationSQL(array $field) + public function getSmallIntTypeDeclarationSQL(array $column) { return 'NUMBER(5)'; } @@ -291,7 +291,7 @@ public function getSmallIntTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTypeDeclarationSQL(array $column) { return 'TIMESTAMP(0)'; } @@ -299,7 +299,7 @@ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTzTypeDeclarationSQL(array $column) { return 'TIMESTAMP(0) WITH TIME ZONE'; } @@ -307,7 +307,7 @@ public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getDateTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTypeDeclarationSQL(array $column) { return 'DATE'; } @@ -315,7 +315,7 @@ public function getDateTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getTimeTypeDeclarationSQL(array $column) { return 'DATE'; } @@ -323,7 +323,7 @@ public function getTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + protected function _getCommonIntegerTypeDeclarationSQL(array $column) { return ''; } @@ -356,7 +356,7 @@ public function getBinaryMaxLength() /** * {@inheritDoc} */ - public function getClobTypeDeclarationSQL(array $field) + public function getClobTypeDeclarationSQL(array $column) { return 'CLOB'; } @@ -419,7 +419,7 @@ protected function _getCreateTableSQL($table, array $columns, array $options = [ * * @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaOracleReader.html */ - public function getListTableIndexesSQL($table, $currentDatabase = null) + public function getListTableIndexesSQL($table, $database = null) { $table = $this->normalizeIdentifier($table); $table = $this->quoteStringLiteral($table->getName()); @@ -923,26 +923,26 @@ public function getAlterTableSQL(TableDiff $diff) /** * {@inheritdoc} */ - public function getColumnDeclarationSQL($name, array $field) + public function getColumnDeclarationSQL($name, array $column) { - if (isset($field['columnDefinition'])) { - $columnDef = $this->getCustomTypeDeclarationSQL($field); + if (isset($column['columnDefinition'])) { + $columnDef = $this->getCustomTypeDeclarationSQL($column); } else { - $default = $this->getDefaultValueDeclarationSQL($field); + $default = $this->getDefaultValueDeclarationSQL($column); $notnull = ''; - if (isset($field['notnull'])) { - $notnull = $field['notnull'] ? ' NOT NULL' : ' NULL'; + if (isset($column['notnull'])) { + $notnull = $column['notnull'] ? ' NOT NULL' : ' NULL'; } - $unique = isset($field['unique']) && $field['unique'] ? + $unique = isset($column['unique']) && $column['unique'] ? ' ' . $this->getUniqueFieldDeclarationSQL() : ''; - $check = isset($field['check']) && $field['check'] ? - ' ' . $field['check'] : ''; + $check = isset($column['check']) && $column['check'] ? + ' ' . $column['check'] : ''; - $typeDecl = $field['type']->getSQLDeclaration($field, $this); + $typeDecl = $column['type']->getSQLDeclaration($column, $this); $columnDef = $typeDecl . $default . $notnull . $unique . $check; } @@ -1205,7 +1205,7 @@ protected function getReservedKeywordsClass() /** * {@inheritDoc} */ - public function getBlobTypeDeclarationSQL(array $field) + public function getBlobTypeDeclarationSQL(array $column) { return 'BLOB'; } diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php b/lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php index a00e4fe2429..e886c9387d9 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php @@ -14,7 +14,7 @@ class PostgreSQL92Platform extends PostgreSQL91Platform /** * {@inheritdoc} */ - public function getJsonTypeDeclarationSQL(array $field) + public function getJsonTypeDeclarationSQL(array $column) { return 'JSON'; } @@ -22,13 +22,13 @@ public function getJsonTypeDeclarationSQL(array $field) /** * {@inheritdoc} */ - public function getSmallIntTypeDeclarationSQL(array $field) + public function getSmallIntTypeDeclarationSQL(array $column) { - if (! empty($field['autoincrement'])) { + if (! empty($column['autoincrement'])) { return 'SMALLSERIAL'; } - return parent::getSmallIntTypeDeclarationSQL($field); + return parent::getSmallIntTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php b/lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php index fb559dea2ac..c17020f7439 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php @@ -12,9 +12,9 @@ class PostgreSQL94Platform extends PostgreSQL92Platform /** * {@inheritdoc} */ - public function getJsonTypeDeclarationSQL(array $field) + public function getJsonTypeDeclarationSQL(array $column) { - if (! empty($field['jsonb'])) { + if (! empty($column['jsonb'])) { return 'JSONB'; } diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php index f7fd003d0ba..be02d8a5e17 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -346,7 +346,7 @@ public function getListTableConstraintsSQL($table) * * @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaPgsqlReader.html */ - public function getListTableIndexesSQL($table, $currentDatabase = null) + public function getListTableIndexesSQL($table, $database = null) { return 'SELECT quote_ident(relname) as relname, pg_index.indisunique, pg_index.indisprimary, pg_index.indkey, pg_index.indrelid, @@ -927,9 +927,9 @@ public function convertFromBoolean($item) /** * {@inheritDoc} */ - public function getSequenceNextValSQL($sequenceName) + public function getSequenceNextValSQL($sequence) { - return "SELECT NEXTVAL('" . $sequenceName . "')"; + return "SELECT NEXTVAL('" . $sequence . "')"; } /** @@ -944,7 +944,7 @@ public function getSetTransactionIsolationSQL($level) /** * {@inheritDoc} */ - public function getBooleanTypeDeclarationSQL(array $field) + public function getBooleanTypeDeclarationSQL(array $column) { return 'BOOLEAN'; } @@ -952,9 +952,9 @@ public function getBooleanTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getIntegerTypeDeclarationSQL(array $field) + public function getIntegerTypeDeclarationSQL(array $column) { - if (! empty($field['autoincrement'])) { + if (! empty($column['autoincrement'])) { return 'SERIAL'; } @@ -964,9 +964,9 @@ public function getIntegerTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getBigIntTypeDeclarationSQL(array $field) + public function getBigIntTypeDeclarationSQL(array $column) { - if (! empty($field['autoincrement'])) { + if (! empty($column['autoincrement'])) { return 'BIGSERIAL'; } @@ -976,7 +976,7 @@ public function getBigIntTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getSmallIntTypeDeclarationSQL(array $field) + public function getSmallIntTypeDeclarationSQL(array $column) { return 'SMALLINT'; } @@ -984,7 +984,7 @@ public function getSmallIntTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getGuidTypeDeclarationSQL(array $field) + public function getGuidTypeDeclarationSQL(array $column) { return 'UUID'; } @@ -992,7 +992,7 @@ public function getGuidTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTypeDeclarationSQL(array $column) { return 'TIMESTAMP(0) WITHOUT TIME ZONE'; } @@ -1000,7 +1000,7 @@ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTzTypeDeclarationSQL(array $column) { return 'TIMESTAMP(0) WITH TIME ZONE'; } @@ -1008,7 +1008,7 @@ public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getDateTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTypeDeclarationSQL(array $column) { return 'DATE'; } @@ -1016,7 +1016,7 @@ public function getDateTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getTimeTypeDeclarationSQL(array $column) { return 'TIME(0) WITHOUT TIME ZONE'; } @@ -1034,7 +1034,7 @@ public function getGuidExpression() /** * {@inheritDoc} */ - protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + protected function _getCommonIntegerTypeDeclarationSQL(array $column) { return ''; } @@ -1059,7 +1059,7 @@ protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed) /** * {@inheritDoc} */ - public function getClobTypeDeclarationSQL(array $field) + public function getClobTypeDeclarationSQL(array $column) { return 'TEXT'; } @@ -1204,7 +1204,7 @@ protected function getReservedKeywordsClass() /** * {@inheritDoc} */ - public function getBlobTypeDeclarationSQL(array $field) + public function getBlobTypeDeclarationSQL(array $column) { return 'BYTEA'; } @@ -1212,23 +1212,23 @@ public function getBlobTypeDeclarationSQL(array $field) /** * {@inheritdoc} */ - public function getDefaultValueDeclarationSQL($field) + public function getDefaultValueDeclarationSQL($column) { - if ($this->isSerialField($field)) { + if ($this->isSerialColumn($column)) { return ''; } - return parent::getDefaultValueDeclarationSQL($field); + return parent::getDefaultValueDeclarationSQL($column); } /** - * @param mixed[] $field + * @param mixed[] $column */ - private function isSerialField(array $field): bool + private function isSerialColumn(array $column): bool { - return isset($field['type'], $field['autoincrement']) - && $field['autoincrement'] === true - && $this->isNumericType($field['type']); + return isset($column['type'], $column['autoincrement']) + && $column['autoincrement'] === true + && $this->isNumericType($column['type']); } /** diff --git a/lib/Doctrine/DBAL/Platforms/SQLAnywhere12Platform.php b/lib/Doctrine/DBAL/Platforms/SQLAnywhere12Platform.php index dd73ef736ad..63563582c09 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLAnywhere12Platform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLAnywhere12Platform.php @@ -42,7 +42,7 @@ public function getDateTimeTzFormatString() /** * {@inheritdoc} */ - public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTzTypeDeclarationSQL(array $column) { return 'TIMESTAMP WITH TIME ZONE'; } @@ -70,9 +70,9 @@ public function getListSequencesSQL($database) /** * {@inheritdoc} */ - public function getSequenceNextValSQL($sequenceName) + public function getSequenceNextValSQL($sequence) { - return 'SELECT ' . $sequenceName . '.NEXTVAL'; + return 'SELECT ' . $sequence . '.NEXTVAL'; } /** diff --git a/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php b/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php index bde1a8313fa..a2e9383e8cb 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php @@ -298,11 +298,11 @@ protected function getAlterTableChangeColumnClause(ColumnDiff $columnDiff) /** * {@inheritdoc} */ - public function getBigIntTypeDeclarationSQL(array $columnDef) + public function getBigIntTypeDeclarationSQL(array $column) { - $columnDef['integer_type'] = 'BIGINT'; + $column['integer_type'] = 'BIGINT'; - return $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + return $this->_getCommonIntegerTypeDeclarationSQL($column); } /** @@ -324,7 +324,7 @@ public function getBinaryMaxLength() /** * {@inheritdoc} */ - public function getBlobTypeDeclarationSQL(array $field) + public function getBlobTypeDeclarationSQL(array $column) { return 'LONG BINARY'; } @@ -337,9 +337,9 @@ public function getBlobTypeDeclarationSQL(array $field) * Otherwise by just omitting the NOT NULL clause, * SQL Anywhere will declare them NOT NULL nonetheless. */ - public function getBooleanTypeDeclarationSQL(array $columnDef) + public function getBooleanTypeDeclarationSQL(array $column) { - $nullClause = isset($columnDef['notnull']) && (bool) $columnDef['notnull'] === false ? ' NULL' : ''; + $nullClause = isset($column['notnull']) && (bool) $column['notnull'] === false ? ' NULL' : ''; return 'BIT' . $nullClause; } @@ -347,7 +347,7 @@ public function getBooleanTypeDeclarationSQL(array $columnDef) /** * {@inheritdoc} */ - public function getClobTypeDeclarationSQL(array $field) + public function getClobTypeDeclarationSQL(array $column) { return 'TEXT'; } @@ -499,7 +499,7 @@ public function getDateTimeFormatString() /** * {@inheritdoc} */ - public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTypeDeclarationSQL(array $column) { return 'DATETIME'; } @@ -515,7 +515,7 @@ public function getDateTimeTzFormatString() /** * {@inheritdoc} */ - public function getDateTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTypeDeclarationSQL(array $column) { return 'DATE'; } @@ -678,7 +678,7 @@ public function getGuidExpression() /** * {@inheritdoc} */ - public function getGuidTypeDeclarationSQL(array $field) + public function getGuidTypeDeclarationSQL(array $column) { return 'UNIQUEIDENTIFIER'; } @@ -695,11 +695,11 @@ public function getIndexDeclarationSQL($name, Index $index) /** * {@inheritdoc} */ - public function getIntegerTypeDeclarationSQL(array $columnDef) + public function getIntegerTypeDeclarationSQL(array $column) { - $columnDef['integer_type'] = 'INT'; + $column['integer_type'] = 'INT'; - return $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + return $this->_getCommonIntegerTypeDeclarationSQL($column); } /** @@ -874,7 +874,7 @@ public function getListTableForeignKeysSQL($table) /** * {@inheritdoc} */ - public function getListTableIndexesSQL($table, $currentDatabase = null) + public function getListTableIndexesSQL($table, $database = null) { $user = ''; @@ -1039,11 +1039,11 @@ public function getSetTransactionIsolationSQL($level) /** * {@inheritdoc} */ - public function getSmallIntTypeDeclarationSQL(array $columnDef) + public function getSmallIntTypeDeclarationSQL(array $column) { - $columnDef['integer_type'] = 'SMALLINT'; + $column['integer_type'] = 'SMALLINT'; - return $this->_getCommonIntegerTypeDeclarationSQL($columnDef); + return $this->_getCommonIntegerTypeDeclarationSQL($column); } /** @@ -1116,7 +1116,7 @@ public function getTimeFormatString() /** * {@inheritdoc} */ - public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getTimeTypeDeclarationSQL(array $column) { return 'TIME'; } @@ -1236,12 +1236,12 @@ public function supportsIdentityColumns() /** * {@inheritdoc} */ - protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + protected function _getCommonIntegerTypeDeclarationSQL(array $column) { - $unsigned = ! empty($columnDef['unsigned']) ? 'UNSIGNED ' : ''; - $autoincrement = ! empty($columnDef['autoincrement']) ? ' IDENTITY' : ''; + $unsigned = ! empty($column['unsigned']) ? 'UNSIGNED ' : ''; + $autoincrement = ! empty($column['autoincrement']) ? ' IDENTITY' : ''; - return $unsigned . $columnDef['integer_type'] . $autoincrement; + return $unsigned . $column['integer_type'] . $autoincrement; } /** diff --git a/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php b/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php index 1026a934f00..4b2c11bc33f 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php @@ -29,7 +29,7 @@ public function supportsLimitOffset() /** * {@inheritDoc} */ - public function getClobTypeDeclarationSQL(array $field) + public function getClobTypeDeclarationSQL(array $column) { return 'VARCHAR(MAX)'; } diff --git a/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php b/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php index 3a3cac3145c..e6744546121 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php @@ -23,7 +23,7 @@ public function getListTablesSQL() /** * {@inheritDoc} */ - public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTypeDeclarationSQL(array $column) { // 3 - microseconds precision length // http://msdn.microsoft.com/en-us/library/ms187819.aspx @@ -33,7 +33,7 @@ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getDateTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTypeDeclarationSQL(array $column) { return 'DATE'; } @@ -41,7 +41,7 @@ public function getDateTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getTimeTypeDeclarationSQL(array $column) { return 'TIME(0)'; } @@ -49,7 +49,7 @@ public function getTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTzTypeDeclarationSQL(array $column) { return 'DATETIMEOFFSET(6)'; } diff --git a/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php b/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php index 4aa29f5ffb6..337d0f1ecf3 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php @@ -68,9 +68,9 @@ public function getListSequencesSQL($database) /** * {@inheritdoc} */ - public function getSequenceNextValSQL($sequenceName) + public function getSequenceNextValSQL($sequence) { - return 'SELECT NEXT VALUE FOR ' . $sequenceName; + return 'SELECT NEXT VALUE FOR ' . $sequence; } /** diff --git a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php index d4da5e0d386..effbd77040d 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php @@ -963,7 +963,7 @@ public function getListTableForeignKeysSQL($table, $database = null) /** * {@inheritDoc} */ - public function getListTableIndexesSQL($table, $currentDatabase = null) + public function getListTableIndexesSQL($table, $database = null) { return "SELECT idx.name AS key_name, col.name AS column_name, @@ -1161,31 +1161,31 @@ public function getSetTransactionIsolationSQL($level) /** * {@inheritDoc} */ - public function getIntegerTypeDeclarationSQL(array $field) + public function getIntegerTypeDeclarationSQL(array $column) { - return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'INT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getBigIntTypeDeclarationSQL(array $field) + public function getBigIntTypeDeclarationSQL(array $column) { - return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getSmallIntTypeDeclarationSQL(array $field) + public function getSmallIntTypeDeclarationSQL(array $column) { - return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getGuidTypeDeclarationSQL(array $field) + public function getGuidTypeDeclarationSQL(array $column) { return 'UNIQUEIDENTIFIER'; } @@ -1217,7 +1217,7 @@ public function getBinaryMaxLength() /** * {@inheritDoc} */ - public function getClobTypeDeclarationSQL(array $field) + public function getClobTypeDeclarationSQL(array $column) { return 'VARCHAR(MAX)'; } @@ -1225,15 +1225,15 @@ public function getClobTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + protected function _getCommonIntegerTypeDeclarationSQL(array $column) { - return ! empty($columnDef['autoincrement']) ? ' IDENTITY' : ''; + return ! empty($column['autoincrement']) ? ' IDENTITY' : ''; } /** * {@inheritDoc} */ - public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTypeDeclarationSQL(array $column) { return 'DATETIME'; } @@ -1241,7 +1241,7 @@ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getDateTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTypeDeclarationSQL(array $column) { return 'DATETIME'; } @@ -1249,7 +1249,7 @@ public function getDateTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getTimeTypeDeclarationSQL(array $column) { return 'DATETIME'; } @@ -1257,7 +1257,7 @@ public function getTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getBooleanTypeDeclarationSQL(array $field) + public function getBooleanTypeDeclarationSQL(array $column) { return 'BIT'; } @@ -1607,7 +1607,7 @@ public function getTruncateTableSQL($tableName, $cascade = false) /** * {@inheritDoc} */ - public function getBlobTypeDeclarationSQL(array $field) + public function getBlobTypeDeclarationSQL(array $column) { return 'VARBINARY(MAX)'; } @@ -1617,23 +1617,23 @@ public function getBlobTypeDeclarationSQL(array $field) * * Modifies column declaration order as it differs in Microsoft SQL Server. */ - public function getColumnDeclarationSQL($name, array $field) + public function getColumnDeclarationSQL($name, array $column) { - if (isset($field['columnDefinition'])) { - $columnDef = $this->getCustomTypeDeclarationSQL($field); + if (isset($column['columnDefinition'])) { + $columnDef = $this->getCustomTypeDeclarationSQL($column); } else { - $collation = isset($field['collation']) && $field['collation'] ? - ' ' . $this->getColumnCollationDeclarationSQL($field['collation']) : ''; + $collation = isset($column['collation']) && $column['collation'] ? + ' ' . $this->getColumnCollationDeclarationSQL($column['collation']) : ''; - $notnull = isset($field['notnull']) && $field['notnull'] ? ' NOT NULL' : ''; + $notnull = isset($column['notnull']) && $column['notnull'] ? ' NOT NULL' : ''; - $unique = isset($field['unique']) && $field['unique'] ? + $unique = isset($column['unique']) && $column['unique'] ? ' ' . $this->getUniqueFieldDeclarationSQL() : ''; - $check = isset($field['check']) && $field['check'] ? - ' ' . $field['check'] : ''; + $check = isset($column['check']) && $column['check'] ? + ' ' . $column['check'] : ''; - $typeDecl = $field['type']->getSQLDeclaration($field, $this); + $typeDecl = $column['type']->getSQLDeclaration($column, $this); $columnDef = $typeDecl . $collation . $notnull . $unique . $check; } diff --git a/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php b/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php index 04c1fe50b57..65c48ac9333 100644 --- a/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php @@ -201,7 +201,7 @@ public function prefersIdentityColumns() /** * {@inheritDoc} */ - public function getBooleanTypeDeclarationSQL(array $field) + public function getBooleanTypeDeclarationSQL(array $column) { return 'BOOLEAN'; } @@ -209,71 +209,71 @@ public function getBooleanTypeDeclarationSQL(array $field) /** * {@inheritDoc} */ - public function getIntegerTypeDeclarationSQL(array $field) + public function getIntegerTypeDeclarationSQL(array $column) { - return 'INTEGER' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'INTEGER' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getBigIntTypeDeclarationSQL(array $field) + public function getBigIntTypeDeclarationSQL(array $column) { - // SQLite autoincrement is implicit for INTEGER PKs, but not for BIGINT fields. - if (! empty($field['autoincrement'])) { - return $this->getIntegerTypeDeclarationSQL($field); + // SQLite autoincrement is implicit for INTEGER PKs, but not for BIGINT columns + if (! empty($column['autoincrement'])) { + return $this->getIntegerTypeDeclarationSQL($column); } - return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'BIGINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** - * @param array $field + * @param array $column * * @return string */ - public function getTinyIntTypeDeclarationSql(array $field) + public function getTinyIntTypeDeclarationSql(array $column) { - // SQLite autoincrement is implicit for INTEGER PKs, but not for TINYINT fields. - if (! empty($field['autoincrement'])) { - return $this->getIntegerTypeDeclarationSQL($field); + // SQLite autoincrement is implicit for INTEGER PKs, but not for TINYINT columns + if (! empty($column['autoincrement'])) { + return $this->getIntegerTypeDeclarationSQL($column); } - return 'TINYINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'TINYINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getSmallIntTypeDeclarationSQL(array $field) + public function getSmallIntTypeDeclarationSQL(array $column) { - // SQLite autoincrement is implicit for INTEGER PKs, but not for SMALLINT fields. - if (! empty($field['autoincrement'])) { - return $this->getIntegerTypeDeclarationSQL($field); + // SQLite autoincrement is implicit for INTEGER PKs, but not for SMALLINT columns + if (! empty($column['autoincrement'])) { + return $this->getIntegerTypeDeclarationSQL($column); } - return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'SMALLINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** - * @param array $field + * @param array $column * * @return string */ - public function getMediumIntTypeDeclarationSql(array $field) + public function getMediumIntTypeDeclarationSql(array $column) { - // SQLite autoincrement is implicit for INTEGER PKs, but not for MEDIUMINT fields. - if (! empty($field['autoincrement'])) { - return $this->getIntegerTypeDeclarationSQL($field); + // SQLite autoincrement is implicit for INTEGER PKs, but not for MEDIUMINT columns + if (! empty($column['autoincrement'])) { + return $this->getIntegerTypeDeclarationSQL($column); } - return 'MEDIUMINT' . $this->_getCommonIntegerTypeDeclarationSQL($field); + return 'MEDIUMINT' . $this->_getCommonIntegerTypeDeclarationSQL($column); } /** * {@inheritDoc} */ - public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTimeTypeDeclarationSQL(array $column) { return 'DATETIME'; } @@ -281,7 +281,7 @@ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getDateTypeDeclarationSQL(array $fieldDeclaration) + public function getDateTypeDeclarationSQL(array $column) { return 'DATE'; } @@ -289,7 +289,7 @@ public function getDateTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getTimeTypeDeclarationSQL(array $column) { return 'TIME'; } @@ -297,14 +297,14 @@ public function getTimeTypeDeclarationSQL(array $fieldDeclaration) /** * {@inheritDoc} */ - protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) + protected function _getCommonIntegerTypeDeclarationSQL(array $column) { // sqlite autoincrement is only possible for the primary key - if (! empty($columnDef['autoincrement'])) { + if (! empty($column['autoincrement'])) { return ' PRIMARY KEY AUTOINCREMENT'; } - return ! empty($columnDef['unsigned']) ? ' UNSIGNED' : ''; + return ! empty($column['unsigned']) ? ' UNSIGNED' : ''; } /** @@ -430,7 +430,7 @@ public function getBinaryDefaultLength() /** * {@inheritDoc} */ - public function getClobTypeDeclarationSQL(array $field) + public function getClobTypeDeclarationSQL(array $column) { return 'CLOB'; } @@ -451,7 +451,7 @@ public function getListTableConstraintsSQL($table) /** * {@inheritDoc} */ - public function getListTableColumnsSQL($table, $currentDatabase = null) + public function getListTableColumnsSQL($table, $database = null) { $table = str_replace('.', '__', $table); @@ -461,7 +461,7 @@ public function getListTableColumnsSQL($table, $currentDatabase = null) /** * {@inheritDoc} */ - public function getListTableIndexesSQL($table, $currentDatabase = null) + public function getListTableIndexesSQL($table, $database = null) { $table = str_replace('.', '__', $table); @@ -740,7 +740,7 @@ protected function doModifyLimitQuery($query, $limit, $offset) /** * {@inheritDoc} */ - public function getBlobTypeDeclarationSQL(array $field) + public function getBlobTypeDeclarationSQL(array $column) { return 'BLOB'; } @@ -1013,22 +1013,23 @@ private function getSimpleAlterTableSQL(TableDiff $diff) continue; } - $field = array_merge(['unique' => null, 'autoincrement' => null, 'default' => null], $column->toArray()); - $type = $field['type']; + $definition = array_merge(['unique' => null, 'autoincrement' => null, 'default' => null], $column->toArray()); + $type = $definition['type']; + switch (true) { - case isset($field['columnDefinition']) || $field['autoincrement'] || $field['unique']: - case $type instanceof Types\DateTimeType && $field['default'] === $this->getCurrentTimestampSQL(): - case $type instanceof Types\DateType && $field['default'] === $this->getCurrentDateSQL(): - case $type instanceof Types\TimeType && $field['default'] === $this->getCurrentTimeSQL(): + case isset($definition['columnDefinition']) || $definition['autoincrement'] || $definition['unique']: + case $type instanceof Types\DateTimeType && $definition['default'] === $this->getCurrentTimestampSQL(): + case $type instanceof Types\DateType && $definition['default'] === $this->getCurrentDateSQL(): + case $type instanceof Types\TimeType && $definition['default'] === $this->getCurrentTimeSQL(): return false; } - $field['name'] = $column->getQuotedName($this); - if ($type instanceof Types\StringType && $field['length'] === null) { - $field['length'] = 255; + $definition['name'] = $column->getQuotedName($this); + if ($type instanceof Types\StringType && $definition['length'] === null) { + $definition['length'] = 255; } - $sql[] = 'ALTER TABLE ' . $table->getQuotedName($this) . ' ADD COLUMN ' . $this->getColumnDeclarationSQL($field['name'], $field); + $sql[] = 'ALTER TABLE ' . $table->getQuotedName($this) . ' ADD COLUMN ' . $this->getColumnDeclarationSQL($definition['name'], $definition); } if (! $this->onSchemaAlterTable($diff, $tableSql)) { diff --git a/lib/Doctrine/DBAL/Portability/Connection.php b/lib/Doctrine/DBAL/Portability/Connection.php index 266b8ad095b..96f8190fb70 100644 --- a/lib/Doctrine/DBAL/Portability/Connection.php +++ b/lib/Doctrine/DBAL/Portability/Connection.php @@ -100,9 +100,9 @@ public function getFetchCase() /** * {@inheritdoc} */ - public function executeQuery($query, array $params = [], $types = [], ?QueryCacheProfile $qcp = null) + public function executeQuery($sql, array $params = [], $types = [], ?QueryCacheProfile $qcp = null) { - $stmt = new Statement(parent::executeQuery($query, $params, $types, $qcp), $this); + $stmt = new Statement(parent::executeQuery($sql, $params, $types, $qcp), $this); $stmt->setFetchMode($this->defaultFetchMode); return $stmt; @@ -113,9 +113,9 @@ public function executeQuery($query, array $params = [], $types = [], ?QueryCach * * @return Statement */ - public function prepare($statement) + public function prepare($sql) { - $stmt = new Statement(parent::prepare($statement), $this); + $stmt = new Statement(parent::prepare($sql), $this); $stmt->setFetchMode($this->defaultFetchMode); return $stmt; diff --git a/lib/Doctrine/DBAL/Portability/Statement.php b/lib/Doctrine/DBAL/Portability/Statement.php index 624327a96b9..9e39bbf7a21 100644 --- a/lib/Doctrine/DBAL/Portability/Statement.php +++ b/lib/Doctrine/DBAL/Portability/Statement.php @@ -47,11 +47,11 @@ public function __construct($stmt, Connection $conn) /** * {@inheritdoc} */ - public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null) + public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null) { assert($this->stmt instanceof DriverStatement); - return $this->stmt->bindParam($column, $variable, $type, $length); + return $this->stmt->bindParam($param, $variable, $type, $length); } /** diff --git a/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php b/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php index e062a6fde7b..1b0c1df9f4d 100644 --- a/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php +++ b/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php @@ -209,7 +209,7 @@ public function gte($x, $y) /** * Creates an IS NULL expression with the given arguments. * - * @param string $x The field in string format to be restricted by IS NULL. + * @param string $x The expression to be restricted by IS NULL. * * @return string */ @@ -221,7 +221,7 @@ public function isNull($x) /** * Creates an IS NOT NULL expression with the given arguments. * - * @param string $x The field in string format to be restricted by IS NOT NULL. + * @param string $x The expression to be restricted by IS NOT NULL. * * @return string */ @@ -274,7 +274,7 @@ public function in($x, $y) /** * Creates a NOT IN () comparison expression with the given arguments. * - * @param string $x The field in string format to be inspected by NOT IN() comparison. + * @param string $x The expression to be inspected by NOT IN() comparison. * @param string|string[] $y The placeholder or the array of values to be used by NOT IN() comparison. * * @return string diff --git a/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php b/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php index 1d7f1eec73a..f4c0474a0c2 100644 --- a/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php @@ -145,7 +145,7 @@ public function listSequences($database = null) * Lists the columns for a given table. * * In contrast to other libraries and to the old version of Doctrine, - * this column definition does try to contain the 'primary' field for + * this column definition does try to contain the 'primary' column for * the reason that it is not portable across different RDBMS. Use * {@see listTableIndexes($tableName)} to retrieve the primary key * of a table. Where a RDBMS specifies more details, these are held @@ -192,15 +192,15 @@ public function listTableIndexes($table) * * The usage of a string $tableNames is deprecated. Pass a one-element array instead. * - * @param string|string[] $tableNames + * @param string|string[] $names * * @return bool */ - public function tablesExist($tableNames) + public function tablesExist($names) { - $tableNames = array_map('strtolower', (array) $tableNames); + $names = array_map('strtolower', (array) $names); - return count($tableNames) === count(array_intersect($tableNames, array_map('strtolower', $this->listTableNames()))); + return count($names) === count(array_intersect($names, array_map('strtolower', $this->listTableNames()))); } /** @@ -264,21 +264,21 @@ public function listTables() } /** - * @param string $tableName + * @param string $name * * @return Table */ - public function listTableDetails($tableName) + public function listTableDetails($name) { - $columns = $this->listTableColumns($tableName); + $columns = $this->listTableColumns($name); $foreignKeys = []; if ($this->_platform->supportsForeignKeyConstraints()) { - $foreignKeys = $this->listTableForeignKeys($tableName); + $foreignKeys = $this->listTableForeignKeys($name); } - $indexes = $this->listTableIndexes($tableName); + $indexes = $this->listTableIndexes($name); - return new Table($tableName, $columns, $indexes, $foreignKeys); + return new Table($name, $columns, $indexes, $foreignKeys); } /** @@ -334,13 +334,13 @@ public function dropDatabase($database) /** * Drops the given table. * - * @param string $tableName The name of the table to drop. + * @param string $name The name of the table to drop. * * @return void */ - public function dropTable($tableName) + public function dropTable($name) { - $this->_execSql($this->_platform->getDropTableSQL($tableName)); + $this->_execSql($this->_platform->getDropTableSQL($name)); } /** diff --git a/lib/Doctrine/DBAL/Schema/Column.php b/lib/Doctrine/DBAL/Schema/Column.php index be9399a3b07..e33f285108b 100644 --- a/lib/Doctrine/DBAL/Schema/Column.php +++ b/lib/Doctrine/DBAL/Schema/Column.php @@ -59,12 +59,12 @@ class Column extends AbstractAsset /** * Creates a new Column. * - * @param string $columnName + * @param string $name * @param mixed[] $options */ - public function __construct($columnName, Type $type, array $options = []) + public function __construct($name, Type $type, array $options = []) { - $this->_setName($columnName); + $this->_setName($name); $this->setType($type); $this->setOptions($options); } diff --git a/lib/Doctrine/DBAL/Schema/Comparator.php b/lib/Doctrine/DBAL/Schema/Comparator.php index c224e1142c7..ed0de96666b 100644 --- a/lib/Doctrine/DBAL/Schema/Comparator.php +++ b/lib/Doctrine/DBAL/Schema/Comparator.php @@ -199,7 +199,7 @@ public function diffTable(Table $table1, Table $table2) $table1Columns = $table1->getColumns(); $table2Columns = $table2->getColumns(); - /* See if all the fields in table 1 exist in table 2 */ + /* See if all the columns in table 1 exist in table 2 */ foreach ($table2Columns as $columnName => $column) { if ($table1->hasColumn($columnName)) { continue; @@ -209,7 +209,7 @@ public function diffTable(Table $table1, Table $table2) $changes++; } - /* See if there are any removed fields in table 2 */ + /* See if there are any removed columns in table 2 */ foreach ($table1Columns as $columnName => $column) { // See if column is removed in table 2. if (! $table2->hasColumn($columnName)) { @@ -414,7 +414,7 @@ public function diffForeignKey(ForeignKeyConstraint $key1, ForeignKeyConstraint } /** - * Returns the difference between the fields $field1 and $field2. + * Returns the difference between the columns * * If there are differences this method returns $field2, otherwise the * boolean false. diff --git a/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php b/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php index 1559fa135fe..bb106f01657 100644 --- a/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php @@ -222,13 +222,13 @@ protected function _getPortableViewDefinition($view) /** * {@inheritdoc} */ - public function listTableDetails($tableName): Table + public function listTableDetails($name): Table { - $table = parent::listTableDetails($tableName); + $table = parent::listTableDetails($name); $platform = $this->_platform; assert($platform instanceof DB2Platform); - $sql = $platform->getListTableCommentsSQL($tableName); + $sql = $platform->getListTableCommentsSQL($name); $tableOptions = $this->_conn->fetchAssoc($sql); diff --git a/lib/Doctrine/DBAL/Schema/Index.php b/lib/Doctrine/DBAL/Schema/Index.php index 81299353011..266357e4a63 100644 --- a/lib/Doctrine/DBAL/Schema/Index.php +++ b/lib/Doctrine/DBAL/Schema/Index.php @@ -47,18 +47,18 @@ class Index extends AbstractAsset implements Constraint private $options = []; /** - * @param string $indexName + * @param string $name * @param string[] $columns * @param bool $isUnique * @param bool $isPrimary * @param string[] $flags * @param mixed[] $options */ - public function __construct($indexName, array $columns, $isUnique = false, $isPrimary = false, array $flags = [], array $options = []) + public function __construct($name, array $columns, $isUnique = false, $isPrimary = false, array $flags = [], array $options = []) { $isUnique = $isUnique || $isPrimary; - $this->_setName($indexName); + $this->_setName($name); $this->_isUnique = $isUnique; $this->_isPrimary = $isPrimary; $this->options = $options; @@ -156,17 +156,17 @@ public function isPrimary() } /** - * @param string $columnName + * @param string $name * @param int $pos * * @return bool */ - public function hasColumnAtPosition($columnName, $pos = 0) + public function hasColumnAtPosition($name, $pos = 0) { - $columnName = $this->trimQuotes(strtolower($columnName)); + $name = $this->trimQuotes(strtolower($name)); $indexColumns = array_map('strtolower', $this->getUnquotedColumns()); - return array_search($columnName, $indexColumns) === $pos; + return array_search($name, $indexColumns) === $pos; } /** diff --git a/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php b/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php index 2e37d56be8f..edcba52c3a3 100644 --- a/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php @@ -320,13 +320,13 @@ protected function _getPortableTableForeignKeysList($tableForeignKeys) /** * {@inheritdoc} */ - public function listTableDetails($tableName) + public function listTableDetails($name) { - $table = parent::listTableDetails($tableName); + $table = parent::listTableDetails($name); $platform = $this->_platform; assert($platform instanceof MySqlPlatform); - $sql = $platform->getListTableMetadataSQL($tableName); + $sql = $platform->getListTableMetadataSQL($name); $tableOptions = $this->_conn->fetchAssoc($sql); diff --git a/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php b/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php index d3eb7ba686a..997d3937be7 100644 --- a/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php @@ -400,13 +400,13 @@ private function killUserSessions($user) /** * {@inheritdoc} */ - public function listTableDetails($tableName): Table + public function listTableDetails($name): Table { - $table = parent::listTableDetails($tableName); + $table = parent::listTableDetails($name); $platform = $this->_platform; assert($platform instanceof OraclePlatform); - $sql = $platform->getListTableCommentsSQL($tableName); + $sql = $platform->getListTableCommentsSQL($name); $tableOptions = $this->_conn->fetchAssoc($sql); diff --git a/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php b/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php index 059a3398590..57e9b147337 100644 --- a/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php @@ -506,13 +506,13 @@ private function parseDefaultExpression(?string $default): ?string /** * {@inheritdoc} */ - public function listTableDetails($tableName): Table + public function listTableDetails($name): Table { - $table = parent::listTableDetails($tableName); + $table = parent::listTableDetails($name); $platform = $this->_platform; assert($platform instanceof PostgreSqlPlatform); - $sql = $platform->getListTableMetadataSQL($tableName); + $sql = $platform->getListTableMetadataSQL($name); $tableOptions = $this->_conn->fetchAssoc($sql); diff --git a/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php b/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php index dd34010869c..05eb1d11c46 100644 --- a/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php @@ -331,15 +331,15 @@ private function closeActiveDatabaseConnections($database) } /** - * @param string $tableName + * @param string $name */ - public function listTableDetails($tableName): Table + public function listTableDetails($name): Table { - $table = parent::listTableDetails($tableName); + $table = parent::listTableDetails($name); $platform = $this->_platform; assert($platform instanceof SQLServerPlatform); - $sql = $platform->getListTableMetadataSQL($tableName); + $sql = $platform->getListTableMetadataSQL($name); $tableOptions = $this->_conn->fetchAssoc($sql); diff --git a/lib/Doctrine/DBAL/Schema/Schema.php b/lib/Doctrine/DBAL/Schema/Schema.php index 8afe816f6b6..6ea5fd0c8c0 100644 --- a/lib/Doctrine/DBAL/Schema/Schema.php +++ b/lib/Doctrine/DBAL/Schema/Schema.php @@ -165,20 +165,20 @@ public function getTables() } /** - * @param string $tableName + * @param string $name * * @return Table * * @throws SchemaException */ - public function getTable($tableName) + public function getTable($name) { - $tableName = $this->getFullQualifiedAssetName($tableName); - if (! isset($this->_tables[$tableName])) { - throw SchemaException::tableDoesNotExist($tableName); + $name = $this->getFullQualifiedAssetName($name); + if (! isset($this->_tables[$name])) { + throw SchemaException::tableDoesNotExist($name); } - return $this->_tables[$tableName]; + return $this->_tables[$name]; } /** @@ -216,29 +216,29 @@ private function getUnquotedAssetName($assetName) /** * Does this schema have a namespace with the given name? * - * @param string $namespaceName + * @param string $name * * @return bool */ - public function hasNamespace($namespaceName) + public function hasNamespace($name) { - $namespaceName = strtolower($this->getUnquotedAssetName($namespaceName)); + $name = strtolower($this->getUnquotedAssetName($name)); - return isset($this->namespaces[$namespaceName]); + return isset($this->namespaces[$name]); } /** * Does this schema have a table with the given name? * - * @param string $tableName + * @param string $name * * @return bool */ - public function hasTable($tableName) + public function hasTable($name) { - $tableName = $this->getFullQualifiedAssetName($tableName); + $name = $this->getFullQualifiedAssetName($name); - return isset($this->_tables[$tableName]); + return isset($this->_tables[$name]); } /** @@ -252,32 +252,32 @@ public function getTableNames() } /** - * @param string $sequenceName + * @param string $name * * @return bool */ - public function hasSequence($sequenceName) + public function hasSequence($name) { - $sequenceName = $this->getFullQualifiedAssetName($sequenceName); + $name = $this->getFullQualifiedAssetName($name); - return isset($this->_sequences[$sequenceName]); + return isset($this->_sequences[$name]); } /** - * @param string $sequenceName + * @param string $name * * @return Sequence * * @throws SchemaException */ - public function getSequence($sequenceName) + public function getSequence($name) { - $sequenceName = $this->getFullQualifiedAssetName($sequenceName); - if (! $this->hasSequence($sequenceName)) { - throw SchemaException::sequenceDoesNotExist($sequenceName); + $name = $this->getFullQualifiedAssetName($name); + if (! $this->hasSequence($name)) { + throw SchemaException::sequenceDoesNotExist($name); } - return $this->_sequences[$sequenceName]; + return $this->_sequences[$name]; } /** @@ -291,21 +291,21 @@ public function getSequences() /** * Creates a new namespace. * - * @param string $namespaceName The name of the namespace to create. + * @param string $name The name of the namespace to create. * * @return Schema This schema instance. * * @throws SchemaException */ - public function createNamespace($namespaceName) + public function createNamespace($name) { - $unquotedNamespaceName = strtolower($this->getUnquotedAssetName($namespaceName)); + $unquotedName = strtolower($this->getUnquotedAssetName($name)); - if (isset($this->namespaces[$unquotedNamespaceName])) { - throw SchemaException::namespaceAlreadyExists($unquotedNamespaceName); + if (isset($this->namespaces[$unquotedName])) { + throw SchemaException::namespaceAlreadyExists($unquotedName); } - $this->namespaces[$unquotedNamespaceName] = $namespaceName; + $this->namespaces[$unquotedName] = $name; return $this; } @@ -313,17 +313,17 @@ public function createNamespace($namespaceName) /** * Creates a new table. * - * @param string $tableName + * @param string $name * * @return Table */ - public function createTable($tableName) + public function createTable($name) { - $table = new Table($tableName); + $table = new Table($name); $this->_addTable($table); - foreach ($this->_schemaConfig->getDefaultTableOptions() as $name => $value) { - $table->addOption($name, $value); + foreach ($this->_schemaConfig->getDefaultTableOptions() as $option => $value) { + $table->addOption($option, $value); } return $table; @@ -332,17 +332,17 @@ public function createTable($tableName) /** * Renames a table. * - * @param string $oldTableName - * @param string $newTableName + * @param string $oldName + * @param string $newName * * @return Schema */ - public function renameTable($oldTableName, $newTableName) + public function renameTable($oldName, $newName) { - $table = $this->getTable($oldTableName); - $table->_setName($newTableName); + $table = $this->getTable($oldName); + $table->_setName($newName); - $this->dropTable($oldTableName); + $this->dropTable($oldName); $this->_addTable($table); return $this; @@ -351,15 +351,15 @@ public function renameTable($oldTableName, $newTableName) /** * Drops a table from the schema. * - * @param string $tableName + * @param string $name * * @return Schema */ - public function dropTable($tableName) + public function dropTable($name) { - $tableName = $this->getFullQualifiedAssetName($tableName); - $this->getTable($tableName); - unset($this->_tables[$tableName]); + $name = $this->getFullQualifiedAssetName($name); + $this->getTable($name); + unset($this->_tables[$name]); return $this; } @@ -367,29 +367,29 @@ public function dropTable($tableName) /** * Creates a new sequence. * - * @param string $sequenceName + * @param string $name * @param int $allocationSize * @param int $initialValue * * @return Sequence */ - public function createSequence($sequenceName, $allocationSize = 1, $initialValue = 1) + public function createSequence($name, $allocationSize = 1, $initialValue = 1) { - $seq = new Sequence($sequenceName, $allocationSize, $initialValue); + $seq = new Sequence($name, $allocationSize, $initialValue); $this->_addSequence($seq); return $seq; } /** - * @param string $sequenceName + * @param string $name * * @return Schema */ - public function dropSequence($sequenceName) + public function dropSequence($name) { - $sequenceName = $this->getFullQualifiedAssetName($sequenceName); - unset($this->_sequences[$sequenceName]); + $name = $this->getFullQualifiedAssetName($name); + unset($this->_sequences[$name]); return $this; } diff --git a/lib/Doctrine/DBAL/Schema/SchemaException.php b/lib/Doctrine/DBAL/Schema/SchemaException.php index 4543334ba43..0c8ed3aeb8f 100644 --- a/lib/Doctrine/DBAL/Schema/SchemaException.php +++ b/lib/Doctrine/DBAL/Schema/SchemaException.php @@ -127,23 +127,23 @@ public static function columnAlreadyExists($tableName, $columnName) } /** - * @param string $sequenceName + * @param string $name * * @return SchemaException */ - public static function sequenceAlreadyExists($sequenceName) + public static function sequenceAlreadyExists($name) { - return new self("The sequence '" . $sequenceName . "' already exists.", self::SEQUENCE_ALREADY_EXISTS); + return new self("The sequence '" . $name . "' already exists.", self::SEQUENCE_ALREADY_EXISTS); } /** - * @param string $sequenceName + * @param string $name * * @return SchemaException */ - public static function sequenceDoesNotExist($sequenceName) + public static function sequenceDoesNotExist($name) { - return new self("There exists no sequence with the name '" . $sequenceName . "'.", self::SEQUENCE_DOENST_EXIST); + return new self("There exists no sequence with the name '" . $name . "'.", self::SEQUENCE_DOENST_EXIST); } /** diff --git a/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php b/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php index 3d149e895ed..9a95f628e34 100644 --- a/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php @@ -537,15 +537,15 @@ private function getCreateTableSQL(string $table): ?string } /** - * @param string $tableName + * @param string $name */ - public function listTableDetails($tableName): Table + public function listTableDetails($name): Table { - $table = parent::listTableDetails($tableName); + $table = parent::listTableDetails($name); - $tableCreateSql = $this->getCreateTableSQL($tableName) ?? ''; + $tableCreateSql = $this->getCreateTableSQL($name) ?? ''; - $comment = $this->parseTableCommentFromSQL($tableName, $tableCreateSql); + $comment = $this->parseTableCommentFromSQL($name, $tableCreateSql); if ($comment !== null) { $table->addOption('comment', $comment); diff --git a/lib/Doctrine/DBAL/Schema/Table.php b/lib/Doctrine/DBAL/Schema/Table.php index a6be32c68a4..744b3715e18 100644 --- a/lib/Doctrine/DBAL/Schema/Table.php +++ b/lib/Doctrine/DBAL/Schema/Table.php @@ -44,7 +44,7 @@ class Table extends AbstractAsset protected $_schemaConfig = null; /** - * @param string $tableName + * @param string $name * @param Column[] $columns * @param Index[] $indexes * @param ForeignKeyConstraint[] $fkConstraints @@ -53,13 +53,13 @@ class Table extends AbstractAsset * * @throws DBALException */ - public function __construct($tableName, array $columns = [], array $indexes = [], array $fkConstraints = [], $idGeneratorType = 0, array $options = []) + public function __construct($name, array $columns = [], array $indexes = [], array $fkConstraints = [], $idGeneratorType = 0, array $options = []) { - if (strlen($tableName) === 0) { - throw DBALException::invalidTableName($tableName); + if (strlen($name) === 0) { + throw DBALException::invalidTableName($name); } - $this->_setName($tableName); + $this->_setName($name); foreach ($columns as $column) { $this->_addColumn($column); @@ -151,20 +151,20 @@ public function dropPrimaryKey() /** * Drops an index from this table. * - * @param string $indexName The index name. + * @param string $name The index name. * * @return void * * @throws SchemaException If the index does not exist. */ - public function dropIndex($indexName) + public function dropIndex($name) { - $indexName = $this->normalizeIdentifier($indexName); - if (! $this->hasIndex($indexName)) { - throw SchemaException::indexDoesNotExist($indexName, $this->_name); + $name = $this->normalizeIdentifier($name); + if (! $this->hasIndex($name)) { + throw SchemaException::indexDoesNotExist($name, $this->_name); } - unset($this->_indexes[$indexName]); + unset($this->_indexes[$name]); } /** @@ -190,8 +190,8 @@ public function addUniqueIndex(array $columnNames, $indexName = null, array $opt /** * Renames an index. * - * @param string $oldIndexName The name of the index to rename from. - * @param string|null $newIndexName The name of the index to rename to. + * @param string $oldName The name of the index to rename from. + * @param string|null $newName The name of the index to rename to. * If null is given, the index name will be auto-generated. * * @return self This table instance. @@ -199,38 +199,38 @@ public function addUniqueIndex(array $columnNames, $indexName = null, array $opt * @throws SchemaException If no index exists for the given current name * or if an index with the given new name already exists on this table. */ - public function renameIndex($oldIndexName, $newIndexName = null) + public function renameIndex($oldName, $newName = null) { - $oldIndexName = $this->normalizeIdentifier($oldIndexName); - $normalizedNewIndexName = $this->normalizeIdentifier($newIndexName); + $oldName = $this->normalizeIdentifier($oldName); + $normalizedNewName = $this->normalizeIdentifier($newName); - if ($oldIndexName === $normalizedNewIndexName) { + if ($oldName === $normalizedNewName) { return $this; } - if (! $this->hasIndex($oldIndexName)) { - throw SchemaException::indexDoesNotExist($oldIndexName, $this->_name); + if (! $this->hasIndex($oldName)) { + throw SchemaException::indexDoesNotExist($oldName, $this->_name); } - if ($this->hasIndex($normalizedNewIndexName)) { - throw SchemaException::indexAlreadyExists($normalizedNewIndexName, $this->_name); + if ($this->hasIndex($normalizedNewName)) { + throw SchemaException::indexAlreadyExists($normalizedNewName, $this->_name); } - $oldIndex = $this->_indexes[$oldIndexName]; + $oldIndex = $this->_indexes[$oldName]; if ($oldIndex->isPrimary()) { $this->dropPrimaryKey(); - return $this->setPrimaryKey($oldIndex->getColumns(), $newIndexName ?? false); + return $this->setPrimaryKey($oldIndex->getColumns(), $newName ?? false); } - unset($this->_indexes[$oldIndexName]); + unset($this->_indexes[$oldName]); if ($oldIndex->isUnique()) { - return $this->addUniqueIndex($oldIndex->getColumns(), $newIndexName, $oldIndex->getOptions()); + return $this->addUniqueIndex($oldIndex->getColumns(), $newName, $oldIndex->getOptions()); } - return $this->addIndex($oldIndex->getColumns(), $newIndexName, $oldIndex->getFlags(), $oldIndex->getOptions()); + return $this->addIndex($oldIndex->getColumns(), $newName, $oldIndex->getFlags(), $oldIndex->getOptions()); } /** @@ -279,15 +279,15 @@ private function _createIndex(array $columnNames, $indexName, $isUnique, $isPrim } /** - * @param string $columnName + * @param string $name * @param string $typeName * @param mixed[] $options * * @return Column */ - public function addColumn($columnName, $typeName, array $options = []) + public function addColumn($name, $typeName, array $options = []) { - $column = new Column($columnName, Type::getType($typeName), $options); + $column = new Column($name, Type::getType($typeName), $options); $this->_addColumn($column); @@ -299,14 +299,14 @@ public function addColumn($columnName, $typeName, array $options = []) * * @deprecated * - * @param string $oldColumnName - * @param string $newColumnName + * @param string $oldName + * @param string $name * * @return void * * @throws DBALException */ - public function renameColumn($oldColumnName, $newColumnName) + public function renameColumn($oldName, $name) { throw new DBALException('Table#renameColumn() was removed, because it drops and recreates ' . 'the column instead. There is no fix available, because a schema diff cannot reliably detect if a ' . @@ -316,14 +316,14 @@ public function renameColumn($oldColumnName, $newColumnName) /** * Change Column Details. * - * @param string $columnName + * @param string $name * @param mixed[] $options * * @return self */ - public function changeColumn($columnName, array $options) + public function changeColumn($name, array $options) { - $column = $this->getColumn($columnName); + $column = $this->getColumn($name); $column->setOptions($options); return $this; @@ -332,14 +332,14 @@ public function changeColumn($columnName, array $options) /** * Drops a Column from the Table. * - * @param string $columnName + * @param string $name * * @return self */ - public function dropColumn($columnName) + public function dropColumn($name) { - $columnName = $this->normalizeIdentifier($columnName); - unset($this->_columns[$columnName]); + $name = $this->normalizeIdentifier($name); + unset($this->_columns[$name]); return $this; } @@ -541,53 +541,53 @@ protected function _addForeignKeyConstraint(ForeignKeyConstraint $constraint) /** * Returns whether this table has a foreign key constraint with the given name. * - * @param string $constraintName + * @param string $name * * @return bool */ - public function hasForeignKey($constraintName) + public function hasForeignKey($name) { - $constraintName = $this->normalizeIdentifier($constraintName); + $name = $this->normalizeIdentifier($name); - return isset($this->_fkConstraints[$constraintName]); + return isset($this->_fkConstraints[$name]); } /** * Returns the foreign key constraint with the given name. * - * @param string $constraintName The constraint name. + * @param string $name The constraint name. * * @return ForeignKeyConstraint * * @throws SchemaException If the foreign key does not exist. */ - public function getForeignKey($constraintName) + public function getForeignKey($name) { - $constraintName = $this->normalizeIdentifier($constraintName); - if (! $this->hasForeignKey($constraintName)) { - throw SchemaException::foreignKeyDoesNotExist($constraintName, $this->_name); + $name = $this->normalizeIdentifier($name); + if (! $this->hasForeignKey($name)) { + throw SchemaException::foreignKeyDoesNotExist($name, $this->_name); } - return $this->_fkConstraints[$constraintName]; + return $this->_fkConstraints[$name]; } /** * Removes the foreign key constraint with the given name. * - * @param string $constraintName The constraint name. + * @param string $name The constraint name. * * @return void * * @throws SchemaException */ - public function removeForeignKey($constraintName) + public function removeForeignKey($name) { - $constraintName = $this->normalizeIdentifier($constraintName); - if (! $this->hasForeignKey($constraintName)) { - throw SchemaException::foreignKeyDoesNotExist($constraintName, $this->_name); + $name = $this->normalizeIdentifier($name); + if (! $this->hasForeignKey($name)) { + throw SchemaException::foreignKeyDoesNotExist($name, $this->_name); } - unset($this->_fkConstraints[$constraintName]); + unset($this->_fkConstraints[$name]); } /** @@ -639,34 +639,34 @@ private function filterColumns(array $columnNames) /** * Returns whether this table has a Column with the given name. * - * @param string $columnName The column name. + * @param string $name The column name. * * @return bool */ - public function hasColumn($columnName) + public function hasColumn($name) { - $columnName = $this->normalizeIdentifier($columnName); + $name = $this->normalizeIdentifier($name); - return isset($this->_columns[$columnName]); + return isset($this->_columns[$name]); } /** * Returns the Column with the given name. * - * @param string $columnName The column name. + * @param string $name The column name. * * @return Column * * @throws SchemaException If the column does not exist. */ - public function getColumn($columnName) + public function getColumn($name) { - $columnName = $this->normalizeIdentifier($columnName); - if (! $this->hasColumn($columnName)) { - throw SchemaException::columnDoesNotExist($columnName, $this->_name); + $name = $this->normalizeIdentifier($name); + if (! $this->hasColumn($name)) { + throw SchemaException::columnDoesNotExist($name, $this->_name); } - return $this->_columns[$columnName]; + return $this->_columns[$name]; } /** @@ -714,34 +714,34 @@ public function hasPrimaryKey() /** * Returns whether this table has an Index with the given name. * - * @param string $indexName The index name. + * @param string $name The index name. * * @return bool */ - public function hasIndex($indexName) + public function hasIndex($name) { - $indexName = $this->normalizeIdentifier($indexName); + $name = $this->normalizeIdentifier($name); - return isset($this->_indexes[$indexName]); + return isset($this->_indexes[$name]); } /** * Returns the Index with the given name. * - * @param string $indexName The index name. + * @param string $name The index name. * * @return Index * * @throws SchemaException If the index does not exist. */ - public function getIndex($indexName) + public function getIndex($name) { - $indexName = $this->normalizeIdentifier($indexName); - if (! $this->hasIndex($indexName)) { - throw SchemaException::indexDoesNotExist($indexName, $this->_name); + $name = $this->normalizeIdentifier($name); + if (! $this->hasIndex($name)) { + throw SchemaException::indexDoesNotExist($name, $this->_name); } - return $this->_indexes[$indexName]; + return $this->_indexes[$name]; } /** diff --git a/lib/Doctrine/DBAL/Schema/TableDiff.php b/lib/Doctrine/DBAL/Schema/TableDiff.php index 1ff2c0ad105..dcaeb200a6a 100644 --- a/lib/Doctrine/DBAL/Schema/TableDiff.php +++ b/lib/Doctrine/DBAL/Schema/TableDiff.php @@ -16,21 +16,21 @@ class TableDiff public $newName = false; /** - * All added fields. + * All added columns * * @var Column[] */ public $addedColumns; /** - * All changed fields. + * All changed columns * * @var ColumnDiff[] */ public $changedColumns = []; /** - * All removed fields. + * All removed columns * * @var Column[] */ diff --git a/lib/Doctrine/DBAL/Statement.php b/lib/Doctrine/DBAL/Statement.php index e1c39cc275d..2a1069bc34f 100644 --- a/lib/Doctrine/DBAL/Statement.php +++ b/lib/Doctrine/DBAL/Statement.php @@ -82,16 +82,16 @@ public function __construct($sql, Connection $conn) * type and the value undergoes the conversion routines of the mapping type before * being bound. * - * @param string|int $name The name or position of the parameter. + * @param string|int $param The name or position of the parameter. * @param mixed $value The value of the parameter. * @param mixed $type Either a PDO binding type or a DBAL mapping type name or instance. * * @return bool TRUE on success, FALSE on failure. */ - public function bindValue($name, $value, $type = ParameterType::STRING) + public function bindValue($param, $value, $type = ParameterType::STRING) { - $this->params[$name] = $value; - $this->types[$name] = $type; + $this->params[$param] = $value; + $this->types[$param] = $type; if ($type !== null) { if (is_string($type)) { $type = Type::getType($type); @@ -104,10 +104,10 @@ public function bindValue($name, $value, $type = ParameterType::STRING) $bindingType = $type; } - return $this->stmt->bindValue($name, $value, $bindingType); + return $this->stmt->bindValue($param, $value, $bindingType); } - return $this->stmt->bindValue($name, $value); + return $this->stmt->bindValue($param, $value); } /** @@ -115,20 +115,20 @@ public function bindValue($name, $value, $type = ParameterType::STRING) * * Binding a parameter by reference does not support DBAL mapping types. * - * @param string|int $name The name or position of the parameter. - * @param mixed $var The reference to the variable to bind. - * @param int $type The PDO binding type. - * @param int|null $length Must be specified when using an OUT bind - * so that PHP allocates enough memory to hold the returned value. + * @param string|int $param The name or position of the parameter. + * @param mixed $variable The reference to the variable to bind. + * @param int $type The PDO binding type. + * @param int|null $length Must be specified when using an OUT bind + * so that PHP allocates enough memory to hold the returned value. * * @return bool TRUE on success, FALSE on failure. */ - public function bindParam($name, &$var, $type = ParameterType::STRING, $length = null) + public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null) { - $this->params[$name] = $var; - $this->types[$name] = $type; + $this->params[$param] = $variable; + $this->types[$param] = $type; - return $this->stmt->bindParam($name, $var, $type, $length); + return $this->stmt->bindParam($param, $variable, $type, $length); } /** diff --git a/lib/Doctrine/DBAL/Types/ArrayType.php b/lib/Doctrine/DBAL/Types/ArrayType.php index e915ca8e387..3137e03f37a 100644 --- a/lib/Doctrine/DBAL/Types/ArrayType.php +++ b/lib/Doctrine/DBAL/Types/ArrayType.php @@ -19,9 +19,9 @@ class ArrayType extends Type /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getClobTypeDeclarationSQL($fieldDeclaration); + return $platform->getClobTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/BigIntType.php b/lib/Doctrine/DBAL/Types/BigIntType.php index 69cd5341d84..e5d6dcbbf65 100644 --- a/lib/Doctrine/DBAL/Types/BigIntType.php +++ b/lib/Doctrine/DBAL/Types/BigIntType.php @@ -21,9 +21,9 @@ public function getName() /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getBigIntTypeDeclarationSQL($fieldDeclaration); + return $platform->getBigIntTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/BinaryType.php b/lib/Doctrine/DBAL/Types/BinaryType.php index bf537e8ddb3..e030f166029 100644 --- a/lib/Doctrine/DBAL/Types/BinaryType.php +++ b/lib/Doctrine/DBAL/Types/BinaryType.php @@ -20,9 +20,9 @@ class BinaryType extends Type /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getBinaryTypeDeclarationSQL($fieldDeclaration); + return $platform->getBinaryTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/BlobType.php b/lib/Doctrine/DBAL/Types/BlobType.php index fedb0f245ac..b71e7255eb8 100644 --- a/lib/Doctrine/DBAL/Types/BlobType.php +++ b/lib/Doctrine/DBAL/Types/BlobType.php @@ -20,9 +20,9 @@ class BlobType extends Type /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getBlobTypeDeclarationSQL($fieldDeclaration); + return $platform->getBlobTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/BooleanType.php b/lib/Doctrine/DBAL/Types/BooleanType.php index bf9be9b19fe..f6e4df3b2c6 100644 --- a/lib/Doctrine/DBAL/Types/BooleanType.php +++ b/lib/Doctrine/DBAL/Types/BooleanType.php @@ -13,9 +13,9 @@ class BooleanType extends Type /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getBooleanTypeDeclarationSQL($fieldDeclaration); + return $platform->getBooleanTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/DateIntervalType.php b/lib/Doctrine/DBAL/Types/DateIntervalType.php index 239dcf7481e..6ecd4989c4d 100644 --- a/lib/Doctrine/DBAL/Types/DateIntervalType.php +++ b/lib/Doctrine/DBAL/Types/DateIntervalType.php @@ -26,11 +26,11 @@ public function getName() /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - $fieldDeclaration['length'] = 255; + $column['length'] = 255; - return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); + return $platform->getVarcharTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/DateTimeType.php b/lib/Doctrine/DBAL/Types/DateTimeType.php index 069a03d4e7a..4fc41f45be7 100644 --- a/lib/Doctrine/DBAL/Types/DateTimeType.php +++ b/lib/Doctrine/DBAL/Types/DateTimeType.php @@ -24,9 +24,9 @@ public function getName() /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getDateTimeTypeDeclarationSQL($fieldDeclaration); + return $platform->getDateTimeTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/DateTimeTzType.php b/lib/Doctrine/DBAL/Types/DateTimeTzType.php index 6240da8926c..8301d9aab02 100644 --- a/lib/Doctrine/DBAL/Types/DateTimeTzType.php +++ b/lib/Doctrine/DBAL/Types/DateTimeTzType.php @@ -35,9 +35,9 @@ public function getName() /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getDateTimeTzTypeDeclarationSQL($fieldDeclaration); + return $platform->getDateTimeTzTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/DateType.php b/lib/Doctrine/DBAL/Types/DateType.php index 15d9362f288..77f7db08fc5 100644 --- a/lib/Doctrine/DBAL/Types/DateType.php +++ b/lib/Doctrine/DBAL/Types/DateType.php @@ -22,9 +22,9 @@ public function getName() /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getDateTypeDeclarationSQL($fieldDeclaration); + return $platform->getDateTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/DecimalType.php b/lib/Doctrine/DBAL/Types/DecimalType.php index b2d37f00b3e..be76b7c8a64 100644 --- a/lib/Doctrine/DBAL/Types/DecimalType.php +++ b/lib/Doctrine/DBAL/Types/DecimalType.php @@ -20,9 +20,9 @@ public function getName() /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getDecimalTypeDeclarationSQL($fieldDeclaration); + return $platform->getDecimalTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/FloatType.php b/lib/Doctrine/DBAL/Types/FloatType.php index 4988d7253dc..98ead4a9d6a 100644 --- a/lib/Doctrine/DBAL/Types/FloatType.php +++ b/lib/Doctrine/DBAL/Types/FloatType.php @@ -17,9 +17,9 @@ public function getName() /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getFloatDeclarationSQL($fieldDeclaration); + return $platform->getFloatDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/GuidType.php b/lib/Doctrine/DBAL/Types/GuidType.php index dd4516505ec..a4974f9d05e 100644 --- a/lib/Doctrine/DBAL/Types/GuidType.php +++ b/lib/Doctrine/DBAL/Types/GuidType.php @@ -12,9 +12,9 @@ class GuidType extends StringType /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getGuidTypeDeclarationSQL($fieldDeclaration); + return $platform->getGuidTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/IntegerType.php b/lib/Doctrine/DBAL/Types/IntegerType.php index d7ab8fd80f2..0df606e2982 100644 --- a/lib/Doctrine/DBAL/Types/IntegerType.php +++ b/lib/Doctrine/DBAL/Types/IntegerType.php @@ -21,9 +21,9 @@ public function getName() /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getIntegerTypeDeclarationSQL($fieldDeclaration); + return $platform->getIntegerTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/JsonType.php b/lib/Doctrine/DBAL/Types/JsonType.php index b40b3334513..d17b7f51e56 100644 --- a/lib/Doctrine/DBAL/Types/JsonType.php +++ b/lib/Doctrine/DBAL/Types/JsonType.php @@ -21,9 +21,9 @@ class JsonType extends Type /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getJsonTypeDeclarationSQL($fieldDeclaration); + return $platform->getJsonTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/ObjectType.php b/lib/Doctrine/DBAL/Types/ObjectType.php index 4ca1cf4d531..49042c1bf6d 100644 --- a/lib/Doctrine/DBAL/Types/ObjectType.php +++ b/lib/Doctrine/DBAL/Types/ObjectType.php @@ -19,9 +19,9 @@ class ObjectType extends Type /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getClobTypeDeclarationSQL($fieldDeclaration); + return $platform->getClobTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/SimpleArrayType.php b/lib/Doctrine/DBAL/Types/SimpleArrayType.php index bdf08249a49..5e3e73ce79c 100644 --- a/lib/Doctrine/DBAL/Types/SimpleArrayType.php +++ b/lib/Doctrine/DBAL/Types/SimpleArrayType.php @@ -19,9 +19,9 @@ class SimpleArrayType extends Type /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getClobTypeDeclarationSQL($fieldDeclaration); + return $platform->getClobTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/SmallIntType.php b/lib/Doctrine/DBAL/Types/SmallIntType.php index 5fa3cb74bbc..90e63495137 100644 --- a/lib/Doctrine/DBAL/Types/SmallIntType.php +++ b/lib/Doctrine/DBAL/Types/SmallIntType.php @@ -21,9 +21,9 @@ public function getName() /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getSmallIntTypeDeclarationSQL($fieldDeclaration); + return $platform->getSmallIntTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/StringType.php b/lib/Doctrine/DBAL/Types/StringType.php index e0d1a552f5d..9a510effc7e 100644 --- a/lib/Doctrine/DBAL/Types/StringType.php +++ b/lib/Doctrine/DBAL/Types/StringType.php @@ -12,9 +12,9 @@ class StringType extends Type /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); + return $platform->getVarcharTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/TextType.php b/lib/Doctrine/DBAL/Types/TextType.php index 3eb8047ed62..b1e640b6952 100644 --- a/lib/Doctrine/DBAL/Types/TextType.php +++ b/lib/Doctrine/DBAL/Types/TextType.php @@ -15,9 +15,9 @@ class TextType extends Type /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getClobTypeDeclarationSQL($fieldDeclaration); + return $platform->getClobTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/TimeType.php b/lib/Doctrine/DBAL/Types/TimeType.php index 1eeb2c01d1f..0c62c6f06fb 100644 --- a/lib/Doctrine/DBAL/Types/TimeType.php +++ b/lib/Doctrine/DBAL/Types/TimeType.php @@ -22,9 +22,9 @@ public function getName() /** * {@inheritdoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { - return $platform->getTimeTypeDeclarationSQL($fieldDeclaration); + return $platform->getTimeTypeDeclarationSQL($column); } /** diff --git a/lib/Doctrine/DBAL/Types/Type.php b/lib/Doctrine/DBAL/Types/Type.php index 8f80cc38687..0e56a5658f0 100644 --- a/lib/Doctrine/DBAL/Types/Type.php +++ b/lib/Doctrine/DBAL/Types/Type.php @@ -176,14 +176,14 @@ public function getDefaultLength(AbstractPlatform $platform) } /** - * Gets the SQL declaration snippet for a field of this type. + * Gets the SQL declaration snippet for a column of this type. * - * @param mixed[] $fieldDeclaration The field declaration. - * @param AbstractPlatform $platform The currently used database platform. + * @param mixed[] $column The column definition + * @param AbstractPlatform $platform The currently used database platform. * * @return string */ - abstract public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform); + abstract public function getSQLDeclaration(array $column, AbstractPlatform $platform); /** * Gets the name of this type. diff --git a/tests/Doctrine/Tests/DBAL/ConfigurationTest.php b/tests/Doctrine/Tests/DBAL/ConfigurationTest.php index 7ebfc5b1982..9a969bc1d5c 100644 --- a/tests/Doctrine/Tests/DBAL/ConfigurationTest.php +++ b/tests/Doctrine/Tests/DBAL/ConfigurationTest.php @@ -24,8 +24,6 @@ protected function setUp(): void /** * Tests that the default auto-commit mode for connections can be retrieved from the configuration container. - * - * @group DBAL-81 */ public function testReturnsDefaultConnectionAutoCommitMode(): void { @@ -34,8 +32,6 @@ public function testReturnsDefaultConnectionAutoCommitMode(): void /** * Tests that the default auto-commit mode for connections can be set in the configuration container. - * - * @group DBAL-81 */ public function testSetsDefaultConnectionAutoCommitMode(): void { diff --git a/tests/Doctrine/Tests/DBAL/ConnectionTest.php b/tests/Doctrine/Tests/DBAL/ConnectionTest.php index 2cba7534710..2c9d223b52c 100644 --- a/tests/Doctrine/Tests/DBAL/ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/ConnectionTest.php @@ -210,8 +210,6 @@ public static function getQueryMethods(): iterable /** * Pretty dumb test, however we want to check that the EchoSQLLogger correctly implements the interface. - * - * @group DBAL-11 */ public function testEchoSQLLogger(): void { @@ -222,8 +220,6 @@ public function testEchoSQLLogger(): void /** * Pretty dumb test, however we want to check that the DebugStack correctly implements the interface. - * - * @group DBAL-11 */ public function testDebugSQLStack(): void { @@ -232,17 +228,11 @@ public function testDebugSQLStack(): void self::assertSame($logger, $this->connection->getConfiguration()->getSQLLogger()); } - /** - * @group DBAL-81 - */ public function testIsAutoCommit(): void { self::assertTrue($this->connection->isAutoCommit()); } - /** - * @group DBAL-81 - */ public function testSetAutoCommit(): void { $this->connection->setAutoCommit(false); @@ -251,9 +241,6 @@ public function testSetAutoCommit(): void self::assertFalse($this->connection->isAutoCommit()); } - /** - * @group DBAL-81 - */ public function testConnectStartsTransactionInNoAutoCommitMode(): void { $driverMock = $this->createMock(Driver::class); @@ -273,9 +260,6 @@ public function testConnectStartsTransactionInNoAutoCommitMode(): void self::assertTrue($conn->isTransactionActive()); } - /** - * @group DBAL-81 - */ public function testCommitStartsTransactionInNoAutoCommitMode(): void { $driverMock = $this->createMock(Driver::class); @@ -323,9 +307,6 @@ public function resultProvider(): array return [[true], [false]]; } - /** - * @group DBAL-81 - */ public function testRollBackStartsTransactionInNoAutoCommitMode(): void { $driverMock = $this->createMock(Driver::class); @@ -343,9 +324,6 @@ public function testRollBackStartsTransactionInNoAutoCommitMode(): void self::assertTrue($conn->isTransactionActive()); } - /** - * @group DBAL-81 - */ public function testSwitchingAutoCommitModeCommitsAllCurrentTransactions(): void { $driverMock = $this->createMock(Driver::class); @@ -381,9 +359,6 @@ public function testEmptyInsert(): void $conn->insert('footable', []); } - /** - * @group DBAL-2511 - */ public function testUpdateWithDifferentColumnsInDataAndIdentifiers(): void { $conn = $this->getExecuteUpdateMockConnection(); @@ -425,9 +400,6 @@ public function testUpdateWithDifferentColumnsInDataAndIdentifiers(): void ); } - /** - * @group DBAL-2511 - */ public function testUpdateWithSameColumnInDataAndIdentifiers(): void { $conn = $this->getExecuteUpdateMockConnection(); @@ -468,9 +440,6 @@ public function testUpdateWithSameColumnInDataAndIdentifiers(): void ); } - /** - * @group DBAL-2688 - */ public function testUpdateWithIsNull(): void { $conn = $this->getExecuteUpdateMockConnection(); @@ -510,9 +479,6 @@ public function testUpdateWithIsNull(): void ); } - /** - * @group DBAL-2688 - */ public function testDeleteWithIsNull(): void { $conn = $this->getExecuteUpdateMockConnection(); @@ -755,9 +721,6 @@ public function testCallConnectOnce(string $method, array $params): void call_user_func_array([$conn, $method], $params); } - /** - * @group DBAL-1127 - */ public function testPlatformDetectionIsTriggerOnlyOnceOnRetrievingPlatform(): void { $driverMock = $this->createMock(FutureVersionAwarePlatformDriver::class); @@ -824,9 +787,6 @@ public function testConnectionParamsArePassedToTheQueryCacheProfileInExecuteCach ); } - /** - * @group #2821 - */ public function testShouldNotPassPlatformInParamsToTheQueryCacheProfileInExecuteCacheQuery(): void { $resultCacheDriverMock = $this->createMock(Cache::class); @@ -861,9 +821,6 @@ public function testShouldNotPassPlatformInParamsToTheQueryCacheProfileInExecute (new Connection($connectionParams, $driver))->executeCacheQuery($query, [], [], $queryCacheProfileMock); } - /** - * @group #2821 - */ public function testThrowsExceptionWhenInValidPlatformSpecified(): void { $connectionParams = $this->params; @@ -876,9 +833,6 @@ public function testThrowsExceptionWhenInValidPlatformSpecified(): void new Connection($connectionParams, $driver); } - /** - * @group DBAL-990 - */ public function testRethrowsOriginalExceptionOnDeterminingPlatformWhenConnectingToNonExistentDatabase(): void { $driverMock = $this->createMock(FutureVersionAwarePlatformDriver::class); @@ -900,9 +854,6 @@ public function testRethrowsOriginalExceptionOnDeterminingPlatformWhenConnecting $connection->getDatabasePlatform(); } - /** - * @group #3194 - */ public function testExecuteCacheQueryStripsPlatformFromConnectionParamsBeforeGeneratingCacheKeys(): void { $driver = $this->createMock(Driver::class); diff --git a/tests/Doctrine/Tests/DBAL/DBALExceptionTest.php b/tests/Doctrine/Tests/DBAL/DBALExceptionTest.php index 386614d78ec..fcfcaa6538f 100644 --- a/tests/Doctrine/Tests/DBAL/DBALExceptionTest.php +++ b/tests/Doctrine/Tests/DBAL/DBALExceptionTest.php @@ -57,9 +57,6 @@ public function testDriverRequiredWithUrl(): void ); } - /** - * @group #2821 - */ public function testInvalidPlatformTypeObject(): void { $exception = DBALException::invalidPlatformType(new stdClass()); @@ -70,9 +67,6 @@ public function testInvalidPlatformTypeObject(): void ); } - /** - * @group #2821 - */ public function testInvalidPlatformTypeScalar(): void { $exception = DBALException::invalidPlatformType('some string'); diff --git a/tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php b/tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php index 5e3d24583f7..dcc38555295 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php @@ -17,9 +17,6 @@ public function testReturnsName(): void self::assertSame('pdo_pgsql', $this->driver->getName()); } - /** - * @group DBAL-920 - */ public function testConnectionDisablesPreparesOnPhp56(): void { $this->skipWhenNotUsingPdoPgsql(); @@ -34,9 +31,6 @@ public function testConnectionDisablesPreparesOnPhp56(): void } } - /** - * @group DBAL-920 - */ public function testConnectionDoesNotDisablePreparesOnPhp56WhenAttributeDefined(): void { $this->skipWhenNotUsingPdoPgsql(); @@ -53,9 +47,6 @@ public function testConnectionDoesNotDisablePreparesOnPhp56WhenAttributeDefined( } } - /** - * @group DBAL-920 - */ public function testConnectionDisablePreparesOnPhp56WhenDisablePreparesIsExplicitlyDefined(): void { $this->skipWhenNotUsingPdoPgsql(); diff --git a/tests/Doctrine/Tests/DBAL/DriverManagerTest.php b/tests/Doctrine/Tests/DBAL/DriverManagerTest.php index 524e03031c4..1b4c36efc17 100644 --- a/tests/Doctrine/Tests/DBAL/DriverManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/DriverManagerTest.php @@ -47,7 +47,6 @@ public function testValidPdoInstance(): void } /** - * @group DBAL-32 * @requires extension pdo_sqlite */ public function testPdoInstanceSetErrorMode(): void diff --git a/tests/Doctrine/Tests/DBAL/Events/OracleSessionInitTest.php b/tests/Doctrine/Tests/DBAL/Events/OracleSessionInitTest.php index a9dc64b8855..721b3cdeab0 100644 --- a/tests/Doctrine/Tests/DBAL/Events/OracleSessionInitTest.php +++ b/tests/Doctrine/Tests/DBAL/Events/OracleSessionInitTest.php @@ -26,7 +26,6 @@ public function testPostConnect(): void } /** - * @group DBAL-1824 * @dataProvider getPostConnectWithSessionParameterValuesData */ public function testPostConnectQuotesSessionParameterValues(string $name, string $value): void diff --git a/tests/Doctrine/Tests/DBAL/Events/SQLSessionInitTest.php b/tests/Doctrine/Tests/DBAL/Events/SQLSessionInitTest.php index efa098a2b22..2e934783bb3 100644 --- a/tests/Doctrine/Tests/DBAL/Events/SQLSessionInitTest.php +++ b/tests/Doctrine/Tests/DBAL/Events/SQLSessionInitTest.php @@ -8,9 +8,6 @@ use Doctrine\DBAL\Events; use Doctrine\Tests\DbalTestCase; -/** - * @group DBAL-169 - */ class SQLSessionInitTest extends DbalTestCase { public function testPostConnect(): void diff --git a/tests/Doctrine/Tests/DBAL/Functional/BlobTest.php b/tests/Doctrine/Tests/DBAL/Functional/BlobTest.php index 20ea0870476..cbca81967ea 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/BlobTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/BlobTest.php @@ -14,9 +14,6 @@ use function str_repeat; use function stream_get_contents; -/** - * @group DBAL-6 - */ class BlobTest extends DbalFunctionalTestCase { protected function setUp(): void @@ -31,8 +28,8 @@ protected function setUp(): void $table = new Table('blob_table'); $table->addColumn('id', 'integer'); - $table->addColumn('clobfield', 'text'); - $table->addColumn('blobfield', 'blob'); + $table->addColumn('clobcolumn', 'text'); + $table->addColumn('blobcolumn', 'blob'); $table->setPrimaryKey(['id']); $sm = $this->connection->getSchemaManager(); @@ -43,8 +40,8 @@ public function testInsert(): void { $ret = $this->connection->insert('blob_table', [ 'id' => 1, - 'clobfield' => 'test', - 'blobfield' => 'test', + 'clobcolumn' => 'test', + 'blobcolumn' => 'test', ], [ ParameterType::INTEGER, ParameterType::STRING, @@ -64,8 +61,8 @@ public function testInsertProcessesStream(): void $longBlob = str_repeat('x', 4 * 8192); // send 4 chunks $this->connection->insert('blob_table', [ 'id' => 1, - 'clobfield' => 'ignored', - 'blobfield' => fopen('data://text/plain,' . $longBlob, 'r'), + 'clobcolumn' => 'ignored', + 'blobcolumn' => fopen('data://text/plain,' . $longBlob, 'r'), ], [ ParameterType::INTEGER, ParameterType::STRING, @@ -79,8 +76,8 @@ public function testSelect(): void { $this->connection->insert('blob_table', [ 'id' => 1, - 'clobfield' => 'test', - 'blobfield' => 'test', + 'clobcolumn' => 'test', + 'blobcolumn' => 'test', ], [ ParameterType::INTEGER, ParameterType::STRING, @@ -94,15 +91,15 @@ public function testUpdate(): void { $this->connection->insert('blob_table', [ 'id' => 1, - 'clobfield' => 'test', - 'blobfield' => 'test', + 'clobcolumn' => 'test', + 'blobcolumn' => 'test', ], [ ParameterType::INTEGER, ParameterType::STRING, ParameterType::LARGE_OBJECT, ]); - $this->connection->update('blob_table', ['blobfield' => 'test2'], ['id' => 1], [ + $this->connection->update('blob_table', ['blobcolumn' => 'test2'], ['id' => 1], [ ParameterType::LARGE_OBJECT, ParameterType::INTEGER, ]); @@ -119,8 +116,8 @@ public function testUpdateProcessesStream(): void $this->connection->insert('blob_table', [ 'id' => 1, - 'clobfield' => 'ignored', - 'blobfield' => 'test', + 'clobcolumn' => 'ignored', + 'blobcolumn' => 'test', ], [ ParameterType::INTEGER, ParameterType::STRING, @@ -129,7 +126,7 @@ public function testUpdateProcessesStream(): void $this->connection->update('blob_table', [ 'id' => 1, - 'blobfield' => fopen('data://text/plain,test2', 'r'), + 'blobcolumn' => fopen('data://text/plain,test2', 'r'), ], ['id' => 1], [ ParameterType::INTEGER, ParameterType::LARGE_OBJECT, @@ -144,7 +141,7 @@ public function testBindParamProcessesStream(): void $this->markTestIncomplete('The oci8 driver does not support stream resources as parameters'); } - $stmt = $this->connection->prepare("INSERT INTO blob_table(id, clobfield, blobfield) VALUES (1, 'ignored', ?)"); + $stmt = $this->connection->prepare("INSERT INTO blob_table(id, clobcolumn, blobcolumn) VALUES (1, 'ignored', ?)"); $stream = null; $stmt->bindParam(1, $stream, ParameterType::LARGE_OBJECT); @@ -159,7 +156,7 @@ public function testBindParamProcessesStream(): void private function assertBlobContains(string $text): void { - $rows = $this->connection->query('SELECT blobfield FROM blob_table')->fetchAll(FetchMode::COLUMN); + $rows = $this->connection->query('SELECT blobcolumn FROM blob_table')->fetchAll(FetchMode::COLUMN); self::assertCount(1, $rows); diff --git a/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php b/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php index 8573ecab686..4affefa7e98 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php @@ -314,9 +314,6 @@ public function testPingDoesTriggersConnect(): void self::assertTrue($this->connection->isConnected()); } - /** - * @group DBAL-1025 - */ public function testConnectWithoutExplicitDatabaseName(): void { if (in_array($this->connection->getDatabasePlatform()->getName(), ['oracle', 'db2'], true)) { @@ -337,9 +334,6 @@ public function testConnectWithoutExplicitDatabaseName(): void $connection->close(); } - /** - * @group DBAL-990 - */ public function testDeterminesDatabasePlatformWhenConnectingToNonExistentDatabase(): void { if (in_array($this->connection->getDatabasePlatform()->getName(), ['oracle', 'db2'], true)) { diff --git a/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php b/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php index 1fe74ad4075..8291e424d5c 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php @@ -112,9 +112,6 @@ public function testPrepareWithFetchAll(): void self::assertEquals(['test_int' => 1, 'test_string' => 'foo'], $rows[0]); } - /** - * @group DBAL-228 - */ public function testPrepareWithFetchAllBoth(): void { $paramInt = 1; @@ -218,9 +215,6 @@ public function testFetchAll(): void self::assertEquals('foo', $row['test_string']); } - /** - * @group DBAL-209 - */ public function testFetchAllWithTypes(): void { $datetimeString = '2010-01-01 10:10:10'; @@ -243,9 +237,6 @@ public function testFetchAllWithTypes(): void self::assertStringStartsWith($datetimeString, $row['test_datetime']); } - /** - * @group DBAL-209 - */ public function testFetchAllWithMissingTypes(): void { if ( @@ -433,9 +424,6 @@ public function testFetchColumnWithMissingTypes(): void $this->connection->fetchColumn($sql, [1, $datetime], 1); } - /** - * @group DDC-697 - */ public function testExecuteQueryBindDateTimeType(): void { $sql = 'SELECT count(*) AS c FROM fetch_table WHERE test_datetime = ?'; @@ -448,9 +436,6 @@ public function testExecuteQueryBindDateTimeType(): void self::assertEquals(1, $stmt->fetchColumn()); } - /** - * @group DDC-697 - */ public function testExecuteUpdateBindDateTimeType(): void { $datetime = new DateTime('2010-02-02 20:20:20'); @@ -474,9 +459,6 @@ public function testExecuteUpdateBindDateTimeType(): void )->fetchColumn()); } - /** - * @group DDC-697 - */ public function testPrepareQueryBindValueDateTimeType(): void { $sql = 'SELECT count(*) AS c FROM fetch_table WHERE test_datetime = ?'; @@ -487,9 +469,6 @@ public function testPrepareQueryBindValueDateTimeType(): void self::assertEquals(1, $stmt->fetchColumn()); } - /** - * @group DBAL-78 - */ public function testNativeArrayListSupport(): void { for ($i = 100; $i < 110; $i++) { @@ -579,9 +558,6 @@ public static function getTrimExpressionData(): iterable ]; } - /** - * @group DDC-1014 - */ public function testDateArithmetics(): void { $p = $this->connection->getDatabasePlatform(); @@ -690,9 +666,6 @@ public function testQuoteSQLInjection(): void self::assertCount(0, $rows, 'no result should be returned, otherwise SQL injection is possible'); } - /** - * @group DDC-1213 - */ public function testBitComparisonExpressionSupport(): void { $this->connection->exec('DELETE FROM fetch_table'); @@ -752,9 +725,6 @@ public function testSetDefaultFetchMode(): void }), 'should be no non-numerical elements in the result.'); } - /** - * @group DBAL-1091 - */ public function testFetchAllStyleObject(): void { $this->setupFixture(); @@ -783,9 +753,6 @@ public function testFetchAllStyleObject(): void ); } - /** - * @group DBAL-196 - */ public function testFetchAllSupportFetchClass(): void { $this->beforeFetchClassTest(); @@ -808,9 +775,6 @@ public function testFetchAllSupportFetchClass(): void self::assertStringStartsWith('2010-01-01 10:10:10', $results[0]->test_datetime); } - /** - * @group DBAL-241 - */ public function testFetchAllStyleColumn(): void { $sql = 'DELETE FROM fetch_table'; @@ -825,9 +789,6 @@ public function testFetchAllStyleColumn(): void self::assertEquals([1, 10], $rows); } - /** - * @group DBAL-214 - */ public function testSetFetchModeClassFetchAll(): void { $this->beforeFetchClassTest(); @@ -847,9 +808,6 @@ public function testSetFetchModeClassFetchAll(): void self::assertStringStartsWith('2010-01-01 10:10:10', $results[0]->test_datetime); } - /** - * @group DBAL-214 - */ public function testSetFetchModeClassFetch(): void { $this->beforeFetchClassTest(); @@ -872,9 +830,6 @@ public function testSetFetchModeClassFetch(): void self::assertStringStartsWith('2010-01-01 10:10:10', $results[0]->test_datetime); } - /** - * @group DBAL-257 - */ public function testEmptyFetchColumnReturnsFalse(): void { $this->connection->beginTransaction(); @@ -884,9 +839,6 @@ public function testEmptyFetchColumnReturnsFalse(): void $this->connection->rollBack(); } - /** - * @group DBAL-339 - */ public function testSetFetchModeOnDbalStatement(): void { $sql = 'SELECT test_int, test_string FROM fetch_table WHERE test_int = ? AND test_string = ?'; @@ -900,9 +852,6 @@ public function testSetFetchModeOnDbalStatement(): void self::assertFalse($stmt->fetch()); } - /** - * @group DBAL-435 - */ public function testEmptyParameters(): void { $sql = 'SELECT * FROM fetch_table WHERE test_int IN (?)'; @@ -912,9 +861,6 @@ public function testEmptyParameters(): void self::assertEquals([], $rows); } - /** - * @group DBAL-1028 - */ public function testFetchColumnNullValue(): void { $this->connection->executeUpdate( @@ -927,9 +873,6 @@ public function testFetchColumnNullValue(): void ); } - /** - * @group DBAL-1028 - */ public function testFetchColumnNoResult(): void { self::assertFalse( diff --git a/tests/Doctrine/Tests/DBAL/Functional/Driver/AbstractDriverTest.php b/tests/Doctrine/Tests/DBAL/Functional/Driver/AbstractDriverTest.php index 61ef8ffc8ee..27a910e42fe 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/AbstractDriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/AbstractDriverTest.php @@ -23,9 +23,6 @@ protected function setUp(): void $this->driver = $this->createDriver(); } - /** - * @group DBAL-1215 - */ public function testConnectsWithoutDatabaseNameParameter(): void { $params = $this->connection->getParams(); @@ -39,9 +36,6 @@ public function testConnectsWithoutDatabaseNameParameter(): void self::assertInstanceOf(DriverConnection::class, $connection); } - /** - * @group DBAL-1215 - */ public function testReturnsDatabaseNameWithoutDatabaseNameParameter(): void { $params = $this->connection->getParams(); diff --git a/tests/Doctrine/Tests/DBAL/Functional/Driver/OCI8/OCI8ConnectionTest.php b/tests/Doctrine/Tests/DBAL/Functional/Driver/OCI8/OCI8ConnectionTest.php index a362689b061..a38e099d575 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/OCI8/OCI8ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/OCI8/OCI8ConnectionTest.php @@ -26,9 +26,6 @@ protected function setUp(): void $this->driverConnection = $this->connection->getWrappedConnection(); } - /** - * @group DBAL-2595 - */ public function testLastInsertIdAcceptsFqn(): void { $platform = $this->connection->getDatabasePlatform(); diff --git a/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOConnectionTest.php b/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOConnectionTest.php index 7c72b9fa9e5..7b302f6905a 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOConnectionTest.php @@ -57,9 +57,6 @@ public function testThrowsWrappedExceptionOnConstruct(): void new PDOConnection('foo'); } - /** - * @group DBAL-1022 - */ public function testThrowsWrappedExceptionOnExec(): void { $this->expectException(PDOException::class); diff --git a/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgSql/DriverTest.php b/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgSql/DriverTest.php index 554be999ff3..7160bca6a38 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgSql/DriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgSql/DriverTest.php @@ -68,9 +68,6 @@ public static function getDatabaseParameter(): iterable ]; } - /** - * @group DBAL-1146 - */ public function testConnectsWithApplicationNameParameter(): void { $parameters = $this->connection->getParams(); diff --git a/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php b/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php index e5ac053f58d..c11c56cd3cb 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php @@ -24,8 +24,6 @@ protected function setUp(): void } /** - * @group DBAL-1183 - * @group DBAL-1189 * @dataProvider getValidCharsets */ public function testConnectsWithValidCharsetOption(string $charset): void diff --git a/tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php b/tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php index 70ce747fca1..8cd319697a1 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php @@ -236,7 +236,7 @@ public function testInvalidFieldNameException(): void { $schema = new Schema(); - $table = $schema->createTable('bad_fieldname_table'); + $table = $schema->createTable('bad_columnname_table'); $table->addColumn('id', 'integer', []); foreach ($schema->toSql($this->connection->getDatabasePlatform()) as $sql) { @@ -244,7 +244,7 @@ public function testInvalidFieldNameException(): void } $this->expectException(Exception\InvalidFieldNameException::class); - $this->connection->insert('bad_fieldname_table', ['name' => 5]); + $this->connection->insert('bad_columnname_table', ['name' => 5]); } public function testNonUniqueFieldNameException(): void @@ -270,7 +270,7 @@ public function testUniqueConstraintViolationException(): void { $schema = new Schema(); - $table = $schema->createTable('unique_field_table'); + $table = $schema->createTable('unique_column_table'); $table->addColumn('id', 'integer'); $table->addUniqueIndex(['id']); @@ -278,9 +278,9 @@ public function testUniqueConstraintViolationException(): void $this->connection->exec($sql); } - $this->connection->insert('unique_field_table', ['id' => 5]); + $this->connection->insert('unique_column_table', ['id' => 5]); $this->expectException(Exception\UniqueConstraintViolationException::class); - $this->connection->insert('unique_field_table', ['id' => 5]); + $this->connection->insert('unique_column_table', ['id' => 5]); } public function testSyntaxErrorException(): void diff --git a/tests/Doctrine/Tests/DBAL/Functional/MasterSlaveConnectionTest.php b/tests/Doctrine/Tests/DBAL/Functional/MasterSlaveConnectionTest.php index ac7d84d030e..e9750335772 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/MasterSlaveConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/MasterSlaveConnectionTest.php @@ -17,9 +17,6 @@ use const CASE_LOWER; -/** - * @group DBAL-20 - */ class MasterSlaveConnectionTest extends DbalFunctionalTestCase { protected function setUp(): void @@ -138,9 +135,6 @@ public function testMasterOnWriteOperation(): void self::assertTrue($conn->isConnectedToMaster()); } - /** - * @group DBAL-335 - */ public function testKeepSlaveBeginTransactionStaysOnMaster(): void { $conn = $this->createMasterSlaveConnection($keepSlave = true); @@ -159,9 +153,6 @@ public function testKeepSlaveBeginTransactionStaysOnMaster(): void self::assertFalse($conn->isConnectedToMaster()); } - /** - * @group DBAL-335 - */ public function testKeepSlaveInsertStaysOnMaster(): void { $conn = $this->createMasterSlaveConnection($keepSlave = true); diff --git a/tests/Doctrine/Tests/DBAL/Functional/NamedParametersTest.php b/tests/Doctrine/Tests/DBAL/Functional/NamedParametersTest.php index 59404a2a2a6..04b2569af4e 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/NamedParametersTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/NamedParametersTest.php @@ -13,9 +13,6 @@ use const CASE_LOWER; -/** - * @group DDC-1372 - */ class NamedParametersTest extends DbalFunctionalTestCase { /** diff --git a/tests/Doctrine/Tests/DBAL/Functional/PDOStatementTest.php b/tests/Doctrine/Tests/DBAL/Functional/PDOStatementTest.php index ee215d7ae6e..9e27cc348be 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/PDOStatementTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/PDOStatementTest.php @@ -26,10 +26,6 @@ protected function setUp(): void $this->connection->getSchemaManager()->dropAndCreateTable($table); } - /** - * @group legacy - * @expectedDeprecation Using a PDO fetch mode or their combination (%d given) is deprecated and will cause an error in Doctrine DBAL 3.0 - */ public function testPDOSpecificModeIsAccepted(): void { $this->connection->insert('stmt_test', [ diff --git a/tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php b/tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php index 981120a8d24..3d54fa4e0fa 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/PortabilityTest.php @@ -13,9 +13,6 @@ use function strlen; -/** - * @group DBAL-56 - */ class PortabilityTest extends DbalFunctionalTestCase { /** @var Connection */ @@ -141,13 +138,12 @@ public function assertFetchResultRow(array $row): void * * @dataProvider fetchAllColumnProvider */ - public function testFetchAllColumn(string $field, array $expected): void + public function testFetchAllColumn(string $column, array $expected): void { $conn = $this->getPortableConnection(); - $stmt = $conn->query('SELECT ' . $field . ' FROM portability_table'); + $stmt = $conn->query('SELECT ' . $column . ' FROM portability_table'); - $column = $stmt->fetchAll(FetchMode::COLUMN); - self::assertEquals($expected, $column); + self::assertEquals($expected, $stmt->fetchAll(FetchMode::COLUMN)); } /** diff --git a/tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php b/tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php index 1e06f8c5f44..b4e3b115205 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php @@ -18,9 +18,6 @@ use const CASE_LOWER; -/** - * @group DDC-217 - */ class ResultCacheTest extends DbalFunctionalTestCase { /** @var list */ diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/Db2SchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/Db2SchemaManagerTest.php index b8814b15680..9bc1bd1165e 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/Db2SchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/Db2SchemaManagerTest.php @@ -7,9 +7,6 @@ class Db2SchemaManagerTest extends SchemaManagerFunctionalTestCase { - /** - * @group DBAL-939 - */ public function testGetBooleanColumn(): void { $table = new Table('boolean_column_test'); diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php index ce175add9de..f455b89561c 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php @@ -120,9 +120,6 @@ public function testIndexWithLength(): void self::assertSame([128], $indexes['text_index']->getOption('lengths')); } - /** - * @group DBAL-400 - */ public function testAlterTableAddPrimaryKey(): void { $table = new Table('alter_table_add_pk'); @@ -146,9 +143,6 @@ public function testAlterTableAddPrimaryKey(): void self::assertTrue($table->hasPrimaryKey()); } - /** - * @group DBAL-464 - */ public function testDropPrimaryKeyWithAutoincrementColumn(): void { $table = new Table('drop_primary_key'); @@ -172,9 +166,6 @@ public function testDropPrimaryKeyWithAutoincrementColumn(): void self::assertFalse($table->getColumn('id')->getAutoincrement()); } - /** - * @group DBAL-789 - */ public function testDoesNotPropagateDefaultValuesForUnsupportedColumnTypes(): void { if ($this->schemaManager->getDatabasePlatform() instanceof MariaDb1027Platform) { @@ -288,9 +279,6 @@ public function testColumnCollation(): void self::assertInstanceOf(BlobType::class, $columns['baz']->getType()); } - /** - * @group DBAL-843 - */ public function testListLobTypeColumns(): void { $tableName = 'lob_type_columns'; @@ -347,9 +335,6 @@ public function testListLobTypeColumns(): void ); } - /** - * @group DBAL-423 - */ public function testDiffListGuidTableColumn(): void { $offlineTable = new Table('list_guid_table_column'); @@ -367,9 +352,6 @@ public function testDiffListGuidTableColumn(): void ); } - /** - * @group DBAL-1082 - */ public function testListDecimalTypeColumns(): void { $tableName = 'test_list_decimal_columns'; @@ -388,9 +370,6 @@ public function testListDecimalTypeColumns(): void self::assertTrue($columns['col_unsigned']->getUnsigned()); } - /** - * @group DBAL-1082 - */ public function testListFloatTypeColumns(): void { $tableName = 'test_list_float_columns'; diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/OracleSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/OracleSchemaManagerTest.php index d23cb3a00af..af242fa728e 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/OracleSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/OracleSchemaManagerTest.php @@ -67,10 +67,6 @@ public function testListTableWithBinary(): void self::assertFalse($table->getColumn('column_binary')->getFixed()); } - /** - * @group DBAL-472 - * @group DBAL-1001 - */ public function testAlterTableColumnNotNull(): void { $comparator = new Schema\Comparator(); @@ -116,9 +112,6 @@ public function testListDatabases(): void self::assertContains('c##test_create_database', $databases); } - /** - * @group DBAL-831 - */ public function testListTableDetailsWithDifferentIdentifierQuotingRequirements(): void { $primaryTableName = '"Primary_Table"'; @@ -240,9 +233,6 @@ public function testListTableColumnsSameTableNamesInDifferentSchemas(): void self::assertCount(7, $columns); } - /** - * @group DBAL-1234 - */ public function testListTableIndexesPrimaryKeyConstraintNameDiffersFromIndexName(): void { $table = new Table('list_table_indexes_pk_id_test'); @@ -263,9 +253,6 @@ public function testListTableIndexesPrimaryKeyConstraintNameDiffersFromIndexName self::assertTrue($tableIndexes['primary']->isPrimary()); } - /** - * @group DBAL-2555 - */ public function testListTableDateTypeColumns(): void { $table = new Table('tbl_date'); diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php index 09e8b04c8c3..631c275741c 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php @@ -36,9 +36,6 @@ protected function tearDown(): void $this->connection->getConfiguration()->setSchemaAssetsFilter(null); } - /** - * @group DBAL-177 - */ public function testGetSearchPath(): void { $params = $this->connection->getParams(); @@ -47,9 +44,6 @@ public function testGetSearchPath(): void self::assertEquals([$params['user'], 'public'], $paths); } - /** - * @group DBAL-244 - */ public function testGetSchemaNames(): void { $names = $this->schemaManager->getSchemaNames(); @@ -59,9 +53,6 @@ public function testGetSchemaNames(): void self::assertContains('public', $names, 'The public schema should be found.'); } - /** - * @group DBAL-21 - */ public function testSupportDomainTypeFallback(): void { $createDomainTypeSQL = 'CREATE DOMAIN MyMoney AS DECIMAL(18,2)'; @@ -80,9 +71,6 @@ public function testSupportDomainTypeFallback(): void self::assertInstanceOf(MoneyType::class, $table->getColumn('value')->getType()); } - /** - * @group DBAL-37 - */ public function testDetectsAutoIncrement(): void { $autoincTable = new Table('autoinc_table'); @@ -94,9 +82,6 @@ public function testDetectsAutoIncrement(): void self::assertTrue($autoincTable->getColumn('id')->getAutoincrement()); } - /** - * @group DBAL-37 - */ public function testAlterTableAutoIncrementAdd(): void { $tableFrom = new Table('autoinc_table_add'); @@ -123,9 +108,6 @@ public function testAlterTableAutoIncrementAdd(): void self::assertTrue($tableFinal->getColumn('id')->getAutoincrement()); } - /** - * @group DBAL-37 - */ public function testAlterTableAutoIncrementDrop(): void { $tableFrom = new Table('autoinc_table_drop'); @@ -148,9 +130,6 @@ public function testAlterTableAutoIncrementDrop(): void self::assertFalse($tableFinal->getColumn('id')->getAutoincrement()); } - /** - * @group DBAL-75 - */ public function testTableWithSchema(): void { $this->connection->exec('CREATE SCHEMA nested'); @@ -182,10 +161,6 @@ public function testTableWithSchema(): void self::assertEquals('nested.schemarelated', $relatedFk->getForeignTableName()); } - /** - * @group DBAL-91 - * @group DBAL-88 - */ public function testReturnQuotedAssets(): void { $sql = 'create table dbal91_something ( id integer CONSTRAINT id_something PRIMARY KEY NOT NULL ,"table" integer );'; @@ -205,9 +180,6 @@ public function testReturnQuotedAssets(): void ); } - /** - * @group DBAL-204 - */ public function testFilterSchemaExpression(): void { $testTable = new Table('dbal204_test_prefix'); @@ -267,9 +239,6 @@ public function testListForeignKeys(): void } } - /** - * @group DBAL-511 - */ public function testDefaultValueCharacterVarying(): void { $testTable = new Table('dbal511_default'); @@ -284,9 +253,6 @@ public function testDefaultValueCharacterVarying(): void self::assertEquals('foo', $databaseTable->getColumn('def')->getDefault()); } - /** - * @group DDC-2843 - */ public function testBooleanDefault(): void { $table = new Table('ddc2843_bools'); @@ -380,9 +346,6 @@ public function testListTablesExcludesViews(): void self::assertFalse($foundTable, 'View "list_tables_excludes_views_test_view" must not be found in table list'); } - /** - * @group DBAL-1033 - */ public function testPartialIndexes(): void { $offlineTable = new Schema\Table('person'); @@ -435,9 +398,6 @@ public function jsonbColumnTypeProvider(): array ]; } - /** - * @group DBAL-2427 - */ public function testListNegativeColumnDefaultValue(): void { $table = new Schema\Table('test_default_negative'); @@ -473,7 +433,6 @@ public static function serialTypes(): iterable /** * @dataProvider serialTypes - * @group 2906 */ public function testAutoIncrementCreatesSerialDataTypesWithoutADefaultValue(string $type): void { @@ -491,7 +450,6 @@ public function testAutoIncrementCreatesSerialDataTypesWithoutADefaultValue(stri /** * @dataProvider serialTypes - * @group 2906 */ public function testAutoIncrementCreatesSerialDataTypesWithoutADefaultValueEvenWhenDefaultIsSet(string $type): void { @@ -508,7 +466,6 @@ public function testAutoIncrementCreatesSerialDataTypesWithoutADefaultValueEvenW } /** - * @group 2916 * @dataProvider autoIncrementTypeMigrations */ public function testAlterTableAutoIncrementIntToBigInt(string $from, string $to, string $expected): void @@ -559,7 +516,7 @@ public function getName() /** * {@inheritDoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { return 'MyMoney'; } diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/SQLServerSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/SQLServerSchemaManagerTest.php index 657fd9c392e..9bf73a34074 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/SQLServerSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/SQLServerSchemaManagerTest.php @@ -17,9 +17,6 @@ protected function getPlatformName(): string return 'mssql'; } - /** - * @group DBAL-255 - */ public function testDropColumnConstraints(): void { $table = new Table('sqlsrv_drop_column'); @@ -155,9 +152,6 @@ public function testDefaultConstraints(): void self::assertEquals(666, $columns['df_integer']->getDefault()); } - /** - * @group DBAL-543 - */ public function testColumnComments(): void { $table = new Table('sqlsrv_column_comment'); diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php index 54d7df5abbb..082336cda85 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php @@ -92,9 +92,6 @@ protected function tearDown(): void } } - /** - * @group DBAL-1220 - */ public function testDropsDatabaseWithActiveConnections(): void { if (! $this->schemaManager->getDatabasePlatform()->supportsCreateDropDatabase()) { @@ -129,9 +126,6 @@ public function testDropsDatabaseWithActiveConnections(): void self::assertNotContains('test_drop_database', $this->schemaManager->listDatabases()); } - /** - * @group DBAL-195 - */ public function testDropAndCreateSequence(): void { $platform = $this->connection->getDatabasePlatform(); @@ -210,9 +204,6 @@ public function testListDatabases(): void self::assertContains('test_create_database', $databases); } - /** - * @group DBAL-1058 - */ public function testListNamespaceNames(): void { if (! $this->schemaManager->getDatabasePlatform()->supportsSchemas()) { @@ -344,9 +335,6 @@ public function testListTableColumns(): void self::assertIsArray($columns['baz3']->getPlatformOptions()); } - /** - * @group DBAL-1078 - */ public function testListTableColumnsWithFixedStringColumn(): void { $tableName = 'test_list_table_fixed_string'; @@ -697,9 +685,6 @@ public function testAutoincrementDetection(): void self::assertTrue($inferredTable->getColumn('id')->getAutoincrement()); } - /** - * @group DBAL-792 - */ public function testAutoincrementDetectionMulticolumns(): void { if (! $this->schemaManager->getDatabasePlatform()->supportsIdentityColumns()) { @@ -719,9 +704,6 @@ public function testAutoincrementDetectionMulticolumns(): void self::assertFalse($inferredTable->getColumn('id')->getAutoincrement()); } - /** - * @group DDC-887 - */ public function testUpdateSchemaWithForeignKeyRenaming(): void { if (! $this->schemaManager->getDatabasePlatform()->supportsForeignKeyConstraints()) { @@ -764,9 +746,6 @@ public function testUpdateSchemaWithForeignKeyRenaming(): void self::assertSame(['rename_fk_id'], array_map('strtolower', current($foreignKeys)->getColumns())); } - /** - * @group DBAL-1062 - */ public function testRenameIndexUsedInForeignKeyConstraint(): void { if (! $this->schemaManager->getDatabasePlatform()->supportsForeignKeyConstraints()) { @@ -805,9 +784,6 @@ public function testRenameIndexUsedInForeignKeyConstraint(): void self::assertTrue($foreignTable->hasForeignKey('fk_constraint')); } - /** - * @group DBAL-42 - */ public function testGetColumnComment(): void { if ( @@ -851,9 +827,6 @@ public function testGetColumnComment(): void self::assertEmpty($columns['id']->getComment()); } - /** - * @group DBAL-42 - */ public function testAutomaticallyAppendCommentOnMarkedColumns(): void { if ( @@ -881,9 +854,6 @@ public function testAutomaticallyAppendCommentOnMarkedColumns(): void self::assertInstanceOf(ArrayType::class, $columns['arr']->getType(), 'The Doctrine2 should be detected from comment hint.'); } - /** - * @group DBAL-1228 - */ public function testCommentHintOnDateIntervalTypeColumn(): void { if ( @@ -908,9 +878,6 @@ public function testCommentHintOnDateIntervalTypeColumn(): void self::assertInstanceOf(DateIntervalType::class, $columns['date_interval']->getType(), 'The Doctrine2 should be detected from comment hint.'); } - /** - * @group DBAL-825 - */ public function testChangeColumnsTypeWithDefaultValue(): void { $tableName = 'column_def_change_type'; @@ -948,9 +915,6 @@ public function testChangeColumnsTypeWithDefaultValue(): void self::assertEquals('foo', $columns['col_string']->getDefault()); } - /** - * @group DBAL-197 - */ public function testListTableWithBlob(): void { $table = new Table('test_blob_table'); @@ -1053,9 +1017,6 @@ public function testListForeignKeysComposite(): void self::assertEquals(['id', 'other_id'], array_map('strtolower', $fkeys[0]->getForeignColumns())); } - /** - * @group DBAL-44 - */ public function testColumnDefaultLifecycle(): void { $table = new Table('col_def_lifecycle'); @@ -1211,7 +1172,6 @@ public function testCommentNotDuplicated(): void } /** - * @group DBAL-1009 * @dataProvider getAlterColumnComment */ public function testAlterColumnComment( @@ -1284,9 +1244,6 @@ public static function getAlterColumnComment(): iterable ]; } - /** - * @group DBAL-1095 - */ public function testDoesNotListIndexesImplicitlyCreatedByForeignKeys(): void { if (! $this->schemaManager->getDatabasePlatform()->supportsForeignKeyConstraints()) { @@ -1326,10 +1283,6 @@ public function removeJsonArrayTable(): void $this->schemaManager->dropTable('json_array_test'); } - /** - * @group 2782 - * @group 6654 - */ public function testComparatorShouldReturnFalseWhenLegacyJsonArrayColumnHasComment(): void { $table = new Table('json_array_test'); @@ -1343,10 +1296,6 @@ public function testComparatorShouldReturnFalseWhenLegacyJsonArrayColumnHasComme self::assertFalse($tableDiff); } - /** - * @group 2782 - * @group 6654 - */ public function testComparatorShouldModifyOnlyTheCommentWhenUpdatingFromJsonArrayTypeOnLegacyPlatforms(): void { if ($this->schemaManager->getDatabasePlatform()->hasNativeJsonType()) { @@ -1371,10 +1320,6 @@ public function testComparatorShouldModifyOnlyTheCommentWhenUpdatingFromJsonArra self::assertSame(['comment'], $changedColumn->changedProperties); } - /** - * @group 2782 - * @group 6654 - */ public function testComparatorShouldAddCommentToLegacyJsonArrayTypeThatDoesNotHaveIt(): void { if (! $this->schemaManager->getDatabasePlatform()->hasNativeJsonType()) { @@ -1393,10 +1338,6 @@ public function testComparatorShouldAddCommentToLegacyJsonArrayTypeThatDoesNotHa self::assertSame(['comment'], $tableDiff->changedColumns['parameters']->changedProperties); } - /** - * @group 2782 - * @group 6654 - */ public function testComparatorShouldReturnAllChangesWhenUsingLegacyJsonArrayType(): void { if (! $this->schemaManager->getDatabasePlatform()->hasNativeJsonType()) { @@ -1415,10 +1356,6 @@ public function testComparatorShouldReturnAllChangesWhenUsingLegacyJsonArrayType self::assertSame(['notnull', 'comment'], $tableDiff->changedColumns['parameters']->changedProperties); } - /** - * @group 2782 - * @group 6654 - */ public function testComparatorShouldReturnAllChangesWhenUsingLegacyJsonArrayTypeEvenWhenPlatformHasJsonSupport(): void { if (! $this->schemaManager->getDatabasePlatform()->hasNativeJsonType()) { @@ -1437,10 +1374,6 @@ public function testComparatorShouldReturnAllChangesWhenUsingLegacyJsonArrayType self::assertSame(['notnull', 'comment'], $tableDiff->changedColumns['parameters']->changedProperties); } - /** - * @group 2782 - * @group 6654 - */ public function testComparatorShouldNotAddCommentToJsonTypeSinceItIsTheDefaultNow(): void { if (! $this->schemaManager->getDatabasePlatform()->hasNativeJsonType()) { @@ -1460,7 +1393,6 @@ public function testComparatorShouldNotAddCommentToJsonTypeSinceItIsTheDefaultNo /** * @dataProvider commentsProvider - * @group 2596 */ public function testExtractDoctrineTypeFromComment(string $comment, string $expected, string $currentType): void { @@ -1522,9 +1454,6 @@ public function testCreateAndListSequences(): void self::assertEquals($sequence2InitialValue, $actualSequence2->getInitialValue()); } - /** - * @group #3086 - */ public function testComparisonWithAutoDetectedSequenceDefinition(): void { if (! $this->schemaManager->getDatabasePlatform()->supportsSequences()) { @@ -1555,9 +1484,6 @@ static function (Sequence $sequence) use ($sequenceName): bool { self::assertFalse($tableDiff); } - /** - * @group DBAL-2921 - */ public function testPrimaryKeyAutoIncrement(): void { $table = new Table('test_pk_auto_increment'); diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/SqliteSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/SqliteSchemaManagerTest.php index 52d4e55b674..b5a385af6ae 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/SqliteSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/SqliteSchemaManagerTest.php @@ -34,9 +34,6 @@ public function testCreateAndDropDatabase(): void self::assertFileNotExists($path); } - /** - * @group DBAL-1220 - */ public function testDropsDatabaseWithActiveConnections(): void { $this->schemaManager->dropAndCreateDatabase('test_drop_database'); @@ -156,9 +153,6 @@ public function testListTableWithBinary(): void self::assertFalse($table->getColumn('column_binary')->getFixed()); } - /** - * @group DBAL-1779 - */ public function testListTableColumnsWithWhitespacesInTypeDeclarations(): void { $sql = <<closeCursor()); } - /** - * @group DBAL-2637 - */ public function testCloseCursorAfterCursorEnd(): void { $stmt = $this->connection->prepare('SELECT name FROM stmt_test'); diff --git a/tests/Doctrine/Tests/DBAL/Functional/TableGeneratorTest.php b/tests/Doctrine/Tests/DBAL/Functional/TableGeneratorTest.php index 083a7114996..fc69bb9943b 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/TableGeneratorTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/TableGeneratorTest.php @@ -8,9 +8,6 @@ use Doctrine\Tests\DbalFunctionalTestCase; use Throwable; -/** - * @group DDC-450 - */ class TableGeneratorTest extends DbalFunctionalTestCase { /** @var TableGenerator */ diff --git a/tests/Doctrine/Tests/DBAL/Functional/TemporaryTableTest.php b/tests/Doctrine/Tests/DBAL/Functional/TemporaryTableTest.php index 7ee7fb23ff9..8b51571e7ff 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/TemporaryTableTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/TemporaryTableTest.php @@ -31,9 +31,6 @@ protected function tearDown(): void parent::tearDown(); } - /** - * @group DDC-1337 - */ public function testDropTemporaryTableNotAutoCommitTransaction(): void { if ( @@ -68,9 +65,6 @@ public function testDropTemporaryTableNotAutoCommitTransaction(): void self::assertEquals([], $rows, 'In an event of an error this result has one row, because of an implicit commit.'); } - /** - * @group DDC-1337 - */ public function testCreateTemporaryTableNotAutoCommitTransaction(): void { if ( diff --git a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL168Test.php b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL168Test.php index 9a394ebcdc5..bb123d9e28a 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL168Test.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL168Test.php @@ -5,9 +5,6 @@ use Doctrine\DBAL\Schema\Table; use Doctrine\Tests\DbalFunctionalTestCase; -/** - * @group DBAL-168 - */ class DBAL168Test extends DbalFunctionalTestCase { public function testDomainsTable(): void diff --git a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL202Test.php b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL202Test.php index 99a841a9078..79b4b0d4e38 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL202Test.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL202Test.php @@ -5,9 +5,6 @@ use Doctrine\DBAL\Schema\Table; use Doctrine\Tests\DbalFunctionalTestCase; -/** - * @group DBAL-202 - */ class DBAL202Test extends DbalFunctionalTestCase { protected function setUp(): void diff --git a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL421Test.php b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL421Test.php index 86a061749f4..35e9f0675bc 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL421Test.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL421Test.php @@ -7,9 +7,6 @@ use function in_array; use function preg_match; -/** - * @group DBAL-421 - */ class DBAL421Test extends DbalFunctionalTestCase { protected function setUp(): void diff --git a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL461Test.php b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL461Test.php index 96b10ebb2fe..9fabe3816d8 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL461Test.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL461Test.php @@ -9,9 +9,6 @@ use PHPUnit\Framework\TestCase; use ReflectionMethod; -/** - * @group DBAL-461 - */ class DBAL461Test extends TestCase { public function testIssue(): void diff --git a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL510Test.php b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL510Test.php index 0b98eb3cb0c..9fd0b215a34 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL510Test.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL510Test.php @@ -6,9 +6,6 @@ use Doctrine\DBAL\Schema\Table; use Doctrine\Tests\DbalFunctionalTestCase; -/** - * @group DBAL-510 - */ class DBAL510Test extends DbalFunctionalTestCase { protected function setUp(): void diff --git a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php index 83e50b16165..7f43a6fd8d4 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php @@ -10,9 +10,6 @@ use function in_array; -/** - * @group DBAL-630 - */ class DBAL630Test extends DbalFunctionalTestCase { /** @var bool */ diff --git a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL752Test.php b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL752Test.php index 2998d83ec2d..f981d1246e1 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL752Test.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL752Test.php @@ -6,9 +6,6 @@ use function in_array; -/** - * @group DBAL-752 - */ class DBAL752Test extends DbalFunctionalTestCase { protected function setUp(): void diff --git a/tests/Doctrine/Tests/DBAL/Functional/WriteTest.php b/tests/Doctrine/Tests/DBAL/Functional/WriteTest.php index 5a39a71bef5..6bb963c4ac0 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/WriteTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/WriteTest.php @@ -35,9 +35,6 @@ protected function setUp(): void $this->connection->executeUpdate('DELETE FROM write_table'); } - /** - * @group DBAL-80 - */ public function testExecuteUpdateFirstTypeIsNull(): void { $sql = 'INSERT INTO write_table (test_string, test_int) VALUES (?, ?)'; @@ -196,9 +193,6 @@ public function testLastInsertIdNoSequenceGiven(): void self::assertFalse($this->lastInsertId()); } - /** - * @group DBAL-445 - */ public function testInsertWithKeyValueTypes(): void { $testString = new DateTime('2013-04-14 10:10:10'); @@ -214,9 +208,6 @@ public function testInsertWithKeyValueTypes(): void self::assertEquals($testString->format($this->connection->getDatabasePlatform()->getDateTimeFormatString()), $data); } - /** - * @group DBAL-445 - */ public function testUpdateWithKeyValueTypes(): void { $testString = new DateTime('2013-04-14 10:10:10'); @@ -241,9 +232,6 @@ public function testUpdateWithKeyValueTypes(): void self::assertEquals($testString->format($this->connection->getDatabasePlatform()->getDateTimeFormatString()), $data); } - /** - * @group DBAL-445 - */ public function testDeleteWithKeyValueTypes(): void { $val = new DateTime('2013-04-14 10:10:10'); @@ -300,9 +288,6 @@ public function testEmptyIdentityInsert(): void self::assertGreaterThan($firstId, $secondId); } - /** - * @group DBAL-2688 - */ public function testUpdateWhereIsNull(): void { $this->connection->insert( diff --git a/tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php b/tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php index 7a12bf61f14..5d5aa36017d 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php @@ -158,9 +158,6 @@ protected function getGenerateForeignKeySql(): string return 'ALTER TABLE test ADD FOREIGN KEY (fk_name_id) REFERENCES other_table (id)'; } - /** - * @group DBAL-126 - */ public function testUniquePrimaryKey(): void { $keyTable = new Table('foo'); @@ -196,9 +193,6 @@ public function testModifyLimitQueryWithEmptyOffset(): void self::assertEquals('SELECT * FROM user LIMIT 10', $sql); } - /** - * @group DDC-118 - */ public function testGetDateTimeTypeDeclarationSql(): void { self::assertEquals('DATETIME', $this->platform->getDateTimeTypeDeclarationSQL(['version' => false])); @@ -230,9 +224,6 @@ public function getCreateTableColumnTypeCommentsSQL(): array return ["CREATE TABLE test (id INT NOT NULL, data LONGTEXT NOT NULL COMMENT '(DC2Type:array)', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB"]; } - /** - * @group DBAL-237 - */ public function testChangeIndexWithForeignKeys(): void { $index = new Index('idx', ['col'], false); @@ -336,9 +327,6 @@ public function testBlobTypeDeclarationSQL(): void self::assertEquals('LONGBLOB', $this->platform->getBlobTypeDeclarationSQL([])); } - /** - * @group DBAL-400 - */ public function testAlterTableAddPrimaryKey(): void { $table = new Table('alter_table_add_pk'); @@ -358,9 +346,6 @@ public function testAlterTableAddPrimaryKey(): void ); } - /** - * @group DBAL-1132 - */ public function testAlterPrimaryKeyWithAutoincrementColumn(): void { $table = new Table('alter_primary_key'); @@ -384,9 +369,6 @@ public function testAlterPrimaryKeyWithAutoincrementColumn(): void ); } - /** - * @group DBAL-464 - */ public function testDropPrimaryKeyWithAutoincrementColumn(): void { $table = new Table('drop_primary_key'); @@ -409,9 +391,6 @@ public function testDropPrimaryKeyWithAutoincrementColumn(): void ); } - /** - * @group DBAL-2302 - */ public function testDropNonAutoincrementColumnFromCompositePrimaryKeyWithAutoincrementColumn(): void { $table = new Table('tbl'); @@ -436,9 +415,6 @@ public function testDropNonAutoincrementColumnFromCompositePrimaryKeyWithAutoinc ); } - /** - * @group DBAL-2302 - */ public function testAddNonAutoincrementColumnToPrimaryKeyWithAutoincrementColumn(): void { $table = new Table('tbl'); @@ -463,9 +439,6 @@ public function testAddNonAutoincrementColumnToPrimaryKeyWithAutoincrementColumn ); } - /** - * @group DBAL-586 - */ public function testAddAutoIncrementPrimaryKey(): void { $keyTable = new Table('foo'); @@ -546,12 +519,6 @@ public function testReturnsBinaryTypeDeclarationSQL(): void self::assertSame('BINARY(65535)', $this->platform->getBinaryTypeDeclarationSQL(['fixed' => true, 'length' => 65535])); } - /** - * @group legacy - * @expectedDeprecation Binary field length 65536 is greater than supported by the platform (65535). Reduce the field length or use a BLOB field instead. - * @expectedDeprecation Binary field length 16777215 is greater than supported by the platform (65535). Reduce the field length or use a BLOB field instead. - * @expectedDeprecation Binary field length 16777216 is greater than supported by the platform (65535). Reduce the field length or use a BLOB field instead. - */ public function testReturnsBinaryTypeLongerThanMaxDeclarationSQL(): void { self::assertSame('MEDIUMBLOB', $this->platform->getBinaryTypeDeclarationSQL(['length' => 65536])); @@ -637,8 +604,6 @@ public function testDoesNotPropagateForeignKeyAlterationForNonSupportingEngines( /** * @return string[] - * - * @group DBAL-234 */ protected function getAlterTableRenameIndexSQL(): array { @@ -650,8 +615,6 @@ protected function getAlterTableRenameIndexSQL(): array /** * @return string[] - * - * @group DBAL-234 */ protected function getQuotedAlterTableRenameIndexSQL(): array { @@ -665,8 +628,6 @@ protected function getQuotedAlterTableRenameIndexSQL(): array /** * @return string[] - * - * @group DBAL-807 */ protected function getAlterTableRenameIndexInSchemaSQL(): array { @@ -678,8 +639,6 @@ protected function getAlterTableRenameIndexInSchemaSQL(): array /** * @return string[] - * - * @group DBAL-807 */ protected function getQuotedAlterTableRenameIndexInSchemaSQL(): array { @@ -758,9 +717,6 @@ protected function getQuotedAlterTableChangeColumnLengthSQL(): array ]; } - /** - * @group DBAL-423 - */ public function testReturnsGuidTypeDeclarationSQL(): void { self::assertSame('CHAR(36)', $this->platform->getGuidTypeDeclarationSQL([])); @@ -867,9 +823,6 @@ public static function getGeneratesFloatDeclarationSQL(): iterable ]; } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableIndexesSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -878,9 +831,6 @@ public function testQuotesTableNameInListTableIndexesSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesDatabaseNameInListTableIndexesSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -889,9 +839,6 @@ public function testQuotesDatabaseNameInListTableIndexesSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesDatabaseNameInListViewsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -900,9 +847,6 @@ public function testQuotesDatabaseNameInListViewsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableForeignKeysSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -911,9 +855,6 @@ public function testQuotesTableNameInListTableForeignKeysSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesDatabaseNameInListTableForeignKeysSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -922,9 +863,6 @@ public function testQuotesDatabaseNameInListTableForeignKeysSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableColumnsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -933,9 +871,6 @@ public function testQuotesTableNameInListTableColumnsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesDatabaseNameInListTableColumnsSQL(): void { self::assertStringContainsStringIgnoringCase( diff --git a/tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php b/tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php index 01a82b875f6..7bac2274a9f 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php @@ -35,9 +35,6 @@ protected function setUp(): void $this->platform = $this->createPlatform(); } - /** - * @group DDC-1360 - */ public function testQuoteIdentifier(): void { if ($this->platform->getName() === 'mssql') { @@ -50,9 +47,6 @@ public function testQuoteIdentifier(): void self::assertEquals(str_repeat($c, 4), $this->platform->quoteIdentifier($c)); } - /** - * @group DDC-1360 - */ public function testQuoteSingleIdentifier(): void { if ($this->platform->getName() === 'mssql') { @@ -66,7 +60,6 @@ public function testQuoteSingleIdentifier(): void } /** - * @group DBAL-1029 * @dataProvider getReturnsForeignKeyReferentialActionSQL */ public function testReturnsForeignKeyReferentialActionSQL(string $action, string $expectedSQL): void @@ -113,9 +106,6 @@ public function testRegisterUnknownDoctrineMappingType(): void $this->platform->registerDoctrineTypeMapping('foo', 'bar'); } - /** - * @group DBAL-2594 - */ public function testRegistersCommentedDoctrineMappingTypeImplicitly(): void { if (! Type::hasType('my_commented')) { @@ -129,7 +119,6 @@ public function testRegistersCommentedDoctrineMappingTypeImplicitly(): void } /** - * @group DBAL-939 * @dataProvider getIsCommentedDoctrineType */ public function testIsCommentedDoctrineType(Type $type, bool $commented): void @@ -277,9 +266,6 @@ protected function getBitAndComparisonExpressionSql(string $value1, string $valu return '(' . $value1 . ' & ' . $value2 . ')'; } - /** - * @group DDC-1213 - */ public function testGeneratesBitAndComparisonExpressionSql(): void { $sql = $this->platform->getBitAndComparisonExpression(2, 4); @@ -291,9 +277,6 @@ protected function getBitOrComparisonExpressionSql(string $value1, string $value return '(' . $value1 . ' | ' . $value2 . ')'; } - /** - * @group DDC-1213 - */ public function testGeneratesBitOrComparisonExpressionSql(): void { $sql = $this->platform->getBitOrComparisonExpression(2, 4); @@ -367,8 +350,10 @@ public function testGeneratesTableAlterationSql(): void public function testGetCustomColumnDeclarationSql(): void { - $field = ['columnDefinition' => 'MEDIUMINT(6) UNSIGNED']; - self::assertEquals('foo MEDIUMINT(6) UNSIGNED', $this->platform->getColumnDeclarationSQL('foo', $field)); + self::assertEquals( + 'foo MEDIUMINT(6) UNSIGNED', + $this->platform->getColumnDeclarationSQL('foo', ['columnDefinition' => 'MEDIUMINT(6) UNSIGNED']) + ); } public function testGetCreateTableSqlDispatchEvent(): void @@ -462,9 +447,6 @@ public function testGetAlterTableSqlDispatchEvent(): void $this->platform->getAlterTableSQL($tableDiff); } - /** - * @group DBAL-42 - */ public function testCreateTableColumnComments(): void { $table = new Table('test'); @@ -474,9 +456,6 @@ public function testCreateTableColumnComments(): void self::assertEquals($this->getCreateTableColumnCommentsSQL(), $this->platform->getCreateTableSQL($table)); } - /** - * @group DBAL-42 - */ public function testAlterTableColumnComments(): void { $tableDiff = new TableDiff('mytable'); @@ -539,29 +518,22 @@ public function getCreateTableColumnTypeCommentsSQL(): array public function testGetDefaultValueDeclarationSQL(): void { // non-timestamp value will get single quotes - $field = [ + self::assertEquals(" DEFAULT 'non_timestamp'", $this->platform->getDefaultValueDeclarationSQL([ 'type' => Type::getType('string'), 'default' => 'non_timestamp', - ]; - - self::assertEquals(" DEFAULT 'non_timestamp'", $this->platform->getDefaultValueDeclarationSQL($field)); + ])); } - /** - * @group 2859 - */ public function testGetDefaultValueDeclarationSQLDateTime(): void { // timestamps on datetime types should not be quoted foreach (['datetime', 'datetimetz', 'datetime_immutable', 'datetimetz_immutable'] as $type) { - $field = [ - 'type' => Type::getType($type), - 'default' => $this->platform->getCurrentTimestampSQL(), - ]; - self::assertSame( ' DEFAULT ' . $this->platform->getCurrentTimestampSQL(), - $this->platform->getDefaultValueDeclarationSQL($field) + $this->platform->getDefaultValueDeclarationSQL([ + 'type' => Type::getType($type), + 'default' => $this->platform->getCurrentTimestampSQL(), + ]) ); } } @@ -569,40 +541,30 @@ public function testGetDefaultValueDeclarationSQLDateTime(): void public function testGetDefaultValueDeclarationSQLForIntegerTypes(): void { foreach (['bigint', 'integer', 'smallint'] as $type) { - $field = [ - 'type' => Type::getType($type), - 'default' => 1, - ]; - self::assertEquals( ' DEFAULT 1', - $this->platform->getDefaultValueDeclarationSQL($field) + $this->platform->getDefaultValueDeclarationSQL([ + 'type' => Type::getType($type), + 'default' => 1, + ]) ); } } - /** - * @group 2859 - */ public function testGetDefaultValueDeclarationSQLForDateType(): void { $currentDateSql = $this->platform->getCurrentDateSQL(); foreach (['date', 'date_immutable'] as $type) { - $field = [ - 'type' => Type::getType($type), - 'default' => $currentDateSql, - ]; - self::assertSame( ' DEFAULT ' . $currentDateSql, - $this->platform->getDefaultValueDeclarationSQL($field) + $this->platform->getDefaultValueDeclarationSQL([ + 'type' => Type::getType($type), + 'default' => $currentDateSql, + ]) ); } } - /** - * @group DBAL-45 - */ public function testKeywordList(): void { $keywordList = $this->platform->getReservedKeywordsList(); @@ -611,9 +573,6 @@ public function testKeywordList(): void self::assertTrue($keywordList->isKeyword('table')); } - /** - * @group DBAL-374 - */ public function testQuotedColumnInPrimaryKeyPropagation(): void { $table = new Table('`quoted`'); @@ -644,9 +603,6 @@ abstract protected function getQuotedNameInIndexSQL(): array; */ abstract protected function getQuotedColumnInForeignKeySQL(): array; - /** - * @group DBAL-374 - */ public function testQuotedColumnInIndexPropagation(): void { $table = new Table('`quoted`'); @@ -667,9 +623,6 @@ public function testQuotedNameInIndexSQL(): void self::assertEquals($this->getQuotedNameInIndexSQL(), $sql); } - /** - * @group DBAL-374 - */ public function testQuotedColumnInForeignKeyPropagation(): void { $table = new Table('`quoted`'); @@ -705,9 +658,6 @@ public function testQuotedColumnInForeignKeyPropagation(): void self::assertEquals($this->getQuotedColumnInForeignKeySQL(), $sql); } - /** - * @group DBAL-1051 - */ public function testQuotesReservedKeywordInUniqueConstraintDeclarationSQL(): void { $index = new Index('select', ['foo'], true); @@ -720,9 +670,6 @@ public function testQuotesReservedKeywordInUniqueConstraintDeclarationSQL(): voi abstract protected function getQuotesReservedKeywordInUniqueConstraintDeclarationSQL(): string; - /** - * @group DBAL-2270 - */ public function testQuotesReservedKeywordInTruncateTableSQL(): void { self::assertSame( @@ -733,9 +680,6 @@ public function testQuotesReservedKeywordInTruncateTableSQL(): void abstract protected function getQuotesReservedKeywordInTruncateTableSQL(): string; - /** - * @group DBAL-1051 - */ public function testQuotesReservedKeywordInIndexDeclarationSQL(): void { $index = new Index('select', ['foo']); @@ -774,9 +718,6 @@ public function testGetCreateSchemaSQL(): void $this->platform->getCreateSchemaSQL('schema'); } - /** - * @group DBAL-585 - */ public function testAlterTableChangeQuotedColumn(): void { $tableDiff = new TableDiff('mytable'); @@ -796,17 +737,11 @@ public function testAlterTableChangeQuotedColumn(): void ); } - /** - * @group DBAL-563 - */ public function testUsesSequenceEmulatedIdentityColumns(): void { self::assertFalse($this->platform->usesSequenceEmulatedIdentityColumns()); } - /** - * @group DBAL-563 - */ public function testReturnsIdentitySequenceName(): void { $this->expectException(DBALException::class); @@ -846,17 +781,11 @@ public function testReturnsBinaryTypeLongerThanMaxDeclarationSQL(): void $this->markTestSkipped('Not applicable to the platform'); } - /** - * @group DBAL-553 - */ public function hasNativeJsonType(): void { self::assertFalse($this->platform->hasNativeJsonType()); } - /** - * @group DBAL-553 - */ public function testReturnsJsonTypeDeclarationSQL(): void { $column = [ @@ -871,9 +800,6 @@ public function testReturnsJsonTypeDeclarationSQL(): void ); } - /** - * @group DBAL-234 - */ public function testAlterTableRenameIndex(): void { $tableDiff = new TableDiff('mytable'); @@ -892,8 +818,6 @@ public function testAlterTableRenameIndex(): void /** * @return string[] - * - * @group DBAL-234 */ protected function getAlterTableRenameIndexSQL(): array { @@ -903,9 +827,6 @@ protected function getAlterTableRenameIndexSQL(): array ]; } - /** - * @group DBAL-234 - */ public function testQuotesAlterTableRenameIndex(): void { $tableDiff = new TableDiff('table'); @@ -925,8 +846,6 @@ public function testQuotesAlterTableRenameIndex(): void /** * @return string[] - * - * @group DBAL-234 */ protected function getQuotedAlterTableRenameIndexSQL(): array { @@ -938,9 +857,6 @@ protected function getQuotedAlterTableRenameIndexSQL(): array ]; } - /** - * @group DBAL-835 - */ public function testQuotesAlterTableRenameColumn(): void { $fromTable = new Table('mytable'); @@ -983,14 +899,9 @@ public function testQuotesAlterTableRenameColumn(): void * Returns SQL statements for {@link testQuotesAlterTableRenameColumn}. * * @return string[] - * - * @group DBAL-835 */ abstract protected function getQuotedAlterTableRenameColumnSQL(): array; - /** - * @group DBAL-835 - */ public function testQuotesAlterTableChangeColumnLength(): void { $fromTable = new Table('mytable'); @@ -1025,14 +936,9 @@ public function testQuotesAlterTableChangeColumnLength(): void * Returns SQL statements for {@link testQuotesAlterTableChangeColumnLength}. * * @return string[] - * - * @group DBAL-835 */ abstract protected function getQuotedAlterTableChangeColumnLengthSQL(): array; - /** - * @group DBAL-807 - */ public function testAlterTableRenameIndexInSchema(): void { $tableDiff = new TableDiff('myschema.mytable'); @@ -1051,8 +957,6 @@ public function testAlterTableRenameIndexInSchema(): void /** * @return string[] - * - * @group DBAL-807 */ protected function getAlterTableRenameIndexInSchemaSQL(): array { @@ -1062,9 +966,6 @@ protected function getAlterTableRenameIndexInSchemaSQL(): array ]; } - /** - * @group DBAL-807 - */ public function testQuotesAlterTableRenameIndexInSchema(): void { $tableDiff = new TableDiff('`schema`.table'); @@ -1084,8 +985,6 @@ public function testQuotesAlterTableRenameIndexInSchema(): void /** * @return string[] - * - * @group DBAL-234 */ protected function getQuotedAlterTableRenameIndexInSchemaSQL(): array { @@ -1097,9 +996,6 @@ protected function getQuotedAlterTableRenameIndexInSchemaSQL(): array ]; } - /** - * @group DBAL-1237 - */ public function testQuotesDropForeignKeySQL(): void { if (! $this->platform->supportsCreateDropForeignKeyConstraints()) { @@ -1123,9 +1019,6 @@ protected function getQuotesDropForeignKeySQL(): string return 'ALTER TABLE "table" DROP FOREIGN KEY "select"'; } - /** - * @group DBAL-1237 - */ public function testQuotesDropConstraintSQL(): void { $tableName = 'table'; @@ -1188,9 +1081,6 @@ public function testGetCommentOnColumnSQLWithQuoteCharacter(): void */ abstract protected function getCommentOnColumnSQL(): array; - /** - * @group DBAL-1004 - */ public function testGetCommentOnColumnSQL(): void { self::assertSame( @@ -1204,7 +1094,6 @@ public function testGetCommentOnColumnSQL(): void } /** - * @group DBAL-1176 * @dataProvider getGeneratesInlineColumnCommentSQL */ public function testGeneratesInlineColumnCommentSQL(?string $comment, string $expectedSql): void @@ -1269,9 +1158,6 @@ protected function getQuotedStringLiteralQuoteCharacter(): string return "''''"; } - /** - * @group DBAL-1176 - */ public function testThrowsExceptionOnGeneratingInlineColumnCommentSQLIfUnsupported(): void { if ($this->platform->supportsInlineColumnComments()) { @@ -1303,9 +1189,6 @@ public function testQuoteStringLiteral(): void ); } - /** - * @group DBAL-423 - */ public function testReturnsGuidTypeDeclarationSQL(): void { $this->expectException(DBALException::class); @@ -1313,9 +1196,6 @@ public function testReturnsGuidTypeDeclarationSQL(): void $this->platform->getGuidTypeDeclarationSQL([]); } - /** - * @group DBAL-1010 - */ public function testGeneratesAlterTableRenameColumnSQL(): void { $table = new Table('foo'); @@ -1341,9 +1221,6 @@ public function testGeneratesAlterTableRenameColumnSQL(): void */ abstract public function getAlterTableRenameColumnSQL(): array; - /** - * @group DBAL-1016 - */ public function testQuotesTableIdentifiersInAlterTableSQL(): void { $table = new Table('"foo"'); @@ -1383,9 +1260,6 @@ public function testQuotesTableIdentifiersInAlterTableSQL(): void */ abstract protected function getQuotesTableIdentifiersInAlterTableSQL(): array; - /** - * @group DBAL-1090 - */ public function testAlterStringToFixedString(): void { $table = new Table('mytable'); @@ -1416,9 +1290,6 @@ public function testAlterStringToFixedString(): void */ abstract protected function getAlterStringToFixedStringSQL(): array; - /** - * @group DBAL-1062 - */ public function testGeneratesAlterTableRenameIndexUsedByForeignKeySQL(): void { $foreignTable = new Table('foreign_table'); @@ -1452,7 +1323,6 @@ abstract protected function getGeneratesAlterTableRenameIndexUsedByForeignKeySQL /** * @param mixed[] $column * - * @group DBAL-1082 * @dataProvider getGeneratesDecimalTypeDeclarationSQL */ public function testGeneratesDecimalTypeDeclarationSQL(array $column, string $expectedSql): void @@ -1478,7 +1348,6 @@ public static function getGeneratesDecimalTypeDeclarationSQL(): iterable /** * @param mixed[] $column * - * @group DBAL-1082 * @dataProvider getGeneratesFloatDeclarationSQL */ public function testGeneratesFloatDeclarationSQL(array $column, string $expectedSql): void diff --git a/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php b/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php index b97ac6ee65f..e1d4ba0e2bb 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php @@ -204,7 +204,6 @@ public static function serialTypes(): iterable /** * @dataProvider serialTypes - * @group 2906 */ public function testGenerateTableWithAutoincrementDoesNotSetDefault(string $type, string $definition): void { @@ -220,7 +219,6 @@ public function testGenerateTableWithAutoincrementDoesNotSetDefault(string $type /** * @dataProvider serialTypes - * @group 2906 */ public function testCreateTableWithAutoincrementAndNotNullAddsConstraint(string $type, string $definition): void { @@ -236,7 +234,6 @@ public function testCreateTableWithAutoincrementAndNotNullAddsConstraint(string /** * @dataProvider serialTypes - * @group 2906 */ public function testGetDefaultValueDeclarationSQLIgnoresTheDefaultKeyWhenTheFieldIsSerial(string $type): void { @@ -434,7 +431,6 @@ protected function getQuotedColumnInForeignKeySQL(): array /** * @param string|bool $databaseValue * - * @group DBAL-457 * @dataProvider pgBooleanProvider */ public function testConvertBooleanAsLiteralStrings( @@ -448,9 +444,6 @@ public function testConvertBooleanAsLiteralStrings( self::assertEquals($preparedStatementValue, $platform->convertBooleans($databaseValue)); } - /** - * @group DBAL-457 - */ public function testConvertBooleanAsLiteralIntegers(): void { $platform = $this->createPlatform(); @@ -466,7 +459,6 @@ public function testConvertBooleanAsLiteralIntegers(): void /** * @param string|bool $databaseValue * - * @group DBAL-630 * @dataProvider pgBooleanProvider */ public function testConvertBooleanAsDatabaseValueStrings( @@ -480,9 +472,6 @@ public function testConvertBooleanAsDatabaseValueStrings( self::assertSame($integerValue, $platform->convertBooleansToDatabaseValue($booleanValue)); } - /** - * @group DBAL-630 - */ public function testConvertBooleanAsDatabaseValueIntegers(): void { $platform = $this->createPlatform(); @@ -580,9 +569,6 @@ public function testAlterDecimalPrecisionScale(): void self::assertEquals($expectedSql, $sql); } - /** - * @group DBAL-365 - */ public function testDroppingConstraintsBeforeColumns(): void { $newTable = new Table('mytable'); @@ -607,17 +593,11 @@ public function testDroppingConstraintsBeforeColumns(): void self::assertEquals($expectedSql, $sql); } - /** - * @group DBAL-563 - */ public function testUsesSequenceEmulatedIdentityColumns(): void { self::assertTrue($this->platform->usesSequenceEmulatedIdentityColumns()); } - /** - * @group DBAL-563 - */ public function testReturnsIdentitySequenceName(): void { self::assertSame('mytable_mycolumn_seq', $this->platform->getIdentitySequenceName('mytable', 'mycolumn')); @@ -625,7 +605,6 @@ public function testReturnsIdentitySequenceName(): void /** * @dataProvider dataCreateSequenceWithCache - * @group DBAL-139 */ public function testCreateSequenceWithCache(int $cacheSize, string $expectedSql): void { @@ -706,8 +685,6 @@ public function testDoesNotPropagateUnnecessaryTableAlterationOnBinaryType(): vo /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getAlterTableRenameIndexSQL(): array { @@ -716,8 +693,6 @@ protected function getAlterTableRenameIndexSQL(): array /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getQuotedAlterTableRenameIndexSQL(): array { @@ -791,8 +766,6 @@ protected function getQuotedAlterTableChangeColumnLengthSQL(): array /** * {@inheritDoc} - * - * @group DBAL-807 */ protected function getAlterTableRenameIndexInSchemaSQL(): array { @@ -801,8 +774,6 @@ protected function getAlterTableRenameIndexInSchemaSQL(): array /** * {@inheritDoc} - * - * @group DBAL-807 */ protected function getQuotedAlterTableRenameIndexInSchemaSQL(): array { @@ -825,9 +796,6 @@ public function testGetNullCommentOnColumnSQL(): void ); } - /** - * @group DBAL-423 - */ public function testReturnsGuidTypeDeclarationSQL(): void { self::assertSame('UUID', $this->platform->getGuidTypeDeclarationSQL([])); @@ -873,9 +841,6 @@ protected function getCommentOnColumnSQL(): array ]; } - /** - * @group DBAL-1004 - */ public function testAltersTableColumnCommentWithExplicitlyQuotedIdentifiers(): void { $table1 = new Table('"foo"', [new Column('"bar"', Type::getType('integer'))]); @@ -892,9 +857,6 @@ public function testAltersTableColumnCommentWithExplicitlyQuotedIdentifiers(): v ); } - /** - * @group 3158 - */ public function testAltersTableColumnCommentIfRequiredByType(): void { $table1 = new Table('"foo"', [new Column('"bar"', Type::getType('datetime'))]); @@ -946,18 +908,12 @@ protected function getGeneratesAlterTableRenameIndexUsedByForeignKeySQL(): array return ['ALTER INDEX idx_foo RENAME TO idx_foo_renamed']; } - /** - * @group DBAL-1142 - */ public function testInitializesTsvectorTypeMapping(): void { self::assertTrue($this->platform->hasDoctrineTypeMappingFor('tsvector')); self::assertEquals('text', $this->platform->getDoctrineTypeMapping('tsvector')); } - /** - * @group DBAL-1220 - */ public function testReturnsDisallowDatabaseConnectionsSQL(): void { self::assertSame( @@ -966,9 +922,6 @@ public function testReturnsDisallowDatabaseConnectionsSQL(): void ); } - /** - * @group DBAL-1220 - */ public function testReturnsCloseActiveDatabaseConnectionsSQL(): void { self::assertSame( @@ -977,9 +930,6 @@ public function testReturnsCloseActiveDatabaseConnectionsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableForeignKeysSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -988,9 +938,6 @@ public function testQuotesTableNameInListTableForeignKeysSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesSchemaNameInListTableForeignKeysSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -999,9 +946,6 @@ public function testQuotesSchemaNameInListTableForeignKeysSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableConstraintsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1010,9 +954,6 @@ public function testQuotesTableNameInListTableConstraintsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableIndexesSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1021,9 +962,6 @@ public function testQuotesTableNameInListTableIndexesSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesSchemaNameInListTableIndexesSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1032,9 +970,6 @@ public function testQuotesSchemaNameInListTableIndexesSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableColumnsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1043,9 +978,6 @@ public function testQuotesTableNameInListTableColumnsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesSchemaNameInListTableColumnsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1054,9 +986,6 @@ public function testQuotesSchemaNameInListTableColumnsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesDatabaseNameInCloseActiveDatabaseConnectionsSQL(): void { self::assertStringContainsStringIgnoringCase( diff --git a/tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php b/tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php index 6f21061f83d..1cd46177abb 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php @@ -300,9 +300,6 @@ public function testModifyLimitQueryWithFromColumnNames(): void $this->expectCteWithMaxRowNum($alteredSql, 10, $sql); } - /** - * @group DBAL-927 - */ public function testModifyLimitQueryWithExtraLongQuery(): void { $query = 'SELECT table1.column1, table2.column2, table3.column3, table4.column4, table5.column5, table6.column6, table7.column7, table8.column8 FROM table1, table2, table3, table4, table5, table6, table7, table8 '; @@ -319,9 +316,6 @@ public function testModifyLimitQueryWithExtraLongQuery(): void $this->expectCteWithMaxRowNum($alteredSql, 10, $sql); } - /** - * @group DDC-2470 - */ public function testModifyLimitQueryWithOrderByClause(): void { if (! $this->platform->supportsLimitOffset()) { @@ -335,9 +329,6 @@ public function testModifyLimitQueryWithOrderByClause(): void $this->expectCteWithMinAndMaxRowNums($alteredSql, 6, 15, $actual); } - /** - * @group DBAL-713 - */ public function testModifyLimitQueryWithSubSelectInSelectList(): void { $querySql = 'SELECT ' . @@ -359,9 +350,6 @@ public function testModifyLimitQueryWithSubSelectInSelectList(): void $this->expectCteWithMaxRowNum($alteredSql, 10, $sql); } - /** - * @group DBAL-713 - */ public function testModifyLimitQueryWithSubSelectInSelectListAndOrderByClause(): void { if (! $this->platform->supportsLimitOffset()) { @@ -388,9 +376,6 @@ public function testModifyLimitQueryWithSubSelectInSelectListAndOrderByClause(): $this->expectCteWithMinAndMaxRowNums($alteredSql, 6, 15, $sql); } - /** - * @group DBAL-834 - */ public function testModifyLimitQueryWithAggregateFunctionInOrderByClause(): void { $querySql = 'SELECT ' . @@ -484,17 +469,14 @@ public function testModifyLimitSubqueryWithJoinAndSubqueryOrderedByColumnsFromBo public function testModifyLimitSubquerySimple(): void { $querySql = 'SELECT DISTINCT id_0 FROM ' - . '(SELECT k0_.id AS id_0, k0_.field AS field_1 ' - . 'FROM key_table k0_ WHERE (k0_.where_field IN (1))) dctrn_result'; - $alteredSql = 'SELECT DISTINCT TOP 20 id_0 FROM (SELECT k0_.id AS id_0, k0_.field AS field_1 ' - . 'FROM key_table k0_ WHERE (k0_.where_field IN (1))) dctrn_result'; + . '(SELECT k0_.id AS id_0, k0_.column AS column_1 ' + . 'FROM key_table k0_ WHERE (k0_.where_column IN (1))) dctrn_result'; + $alteredSql = 'SELECT DISTINCT TOP 20 id_0 FROM (SELECT k0_.id AS id_0, k0_.column AS column_1 ' + . 'FROM key_table k0_ WHERE (k0_.where_column IN (1))) dctrn_result'; $sql = $this->platform->modifyLimitQuery($querySql, 20); $this->expectCteWithMaxRowNum($alteredSql, 20, $sql); } - /** - * @group DDC-1360 - */ public function testQuoteIdentifier(): void { self::assertEquals('[fo][o]', $this->platform->quoteIdentifier('fo]o')); @@ -502,9 +484,6 @@ public function testQuoteIdentifier(): void self::assertEquals('[test].[test]', $this->platform->quoteIdentifier('test.test')); } - /** - * @group DDC-1360 - */ public function testQuoteSingleIdentifier(): void { self::assertEquals('[fo][o]', $this->platform->quoteSingleIdentifier('fo]o')); @@ -512,9 +491,6 @@ public function testQuoteSingleIdentifier(): void self::assertEquals('[test.test]', $this->platform->quoteSingleIdentifier('test.test')); } - /** - * @group DBAL-220 - */ public function testCreateClusteredIndex(): void { $idx = new Index('idx', ['id']); @@ -522,9 +498,6 @@ public function testCreateClusteredIndex(): void self::assertEquals('CREATE CLUSTERED INDEX idx ON tbl (id)', $this->platform->getCreateIndexSQL($idx, 'tbl')); } - /** - * @group DBAL-220 - */ public function testCreateNonClusteredPrimaryKeyInTable(): void { $table = new Table('tbl'); @@ -535,9 +508,6 @@ public function testCreateNonClusteredPrimaryKeyInTable(): void self::assertEquals(['CREATE TABLE tbl (id INT NOT NULL, PRIMARY KEY NONCLUSTERED (id))'], $this->platform->getCreateTableSQL($table)); } - /** - * @group DBAL-220 - */ public function testCreateNonClusteredPrimaryKey(): void { $idx = new Index('idx', ['id'], false, true); @@ -660,8 +630,6 @@ public function testAlterTableWithSchemaUpdateColumnComments(): void /** * {@inheritDoc} - * - * @group DBAL-543 */ public function getCreateTableColumnCommentsSQL(): array { @@ -673,8 +641,6 @@ public function getCreateTableColumnCommentsSQL(): array /** * {@inheritDoc} - * - * @group DBAL-543 */ public function getAlterTableColumnCommentsSQL(): array { @@ -688,8 +654,6 @@ public function getAlterTableColumnCommentsSQL(): array /** * {@inheritDoc} - * - * @group DBAL-543 */ public function getCreateTableColumnTypeCommentsSQL(): array { @@ -699,9 +663,6 @@ public function getCreateTableColumnTypeCommentsSQL(): array ]; } - /** - * @group DBAL-543 - */ public function testGeneratesCreateTableSQLWithColumnComments(): void { $table = new Table('mytable'); @@ -737,10 +698,6 @@ public function testGeneratesCreateTableSQLWithColumnComments(): void ); } - /** - * @group DBAL-543 - * @group DBAL-1011 - */ public function testGeneratesAlterTableSQLWithColumnComments(): void { $table = new Table('mytable'); @@ -920,9 +877,6 @@ public function testGeneratesAlterTableSQLWithColumnComments(): void ); } - /** - * @group DBAL-122 - */ public function testInitializesDoctrineTypeMappings(): void { self::assertTrue($this->platform->hasDoctrineTypeMappingFor('bigint')); @@ -1017,10 +971,6 @@ public function testReturnsBinaryTypeDeclarationSQL(): void self::assertSame('BINARY(8000)', $this->platform->getBinaryTypeDeclarationSQL(['fixed' => true, 'length' => 8000])); } - /** - * @group legacy - * @expectedDeprecation Binary field length 8001 is greater than supported by the platform (8000). Reduce the field length or use a BLOB field instead. - */ public function testReturnsBinaryTypeLongerThanMaxDeclarationSQL(): void { self::assertSame('VARBINARY(MAX)', $this->platform->getBinaryTypeDeclarationSQL(['length' => 8001])); @@ -1029,8 +979,6 @@ public function testReturnsBinaryTypeLongerThanMaxDeclarationSQL(): void /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getAlterTableRenameIndexSQL(): array { @@ -1039,8 +987,6 @@ protected function getAlterTableRenameIndexSQL(): array /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getQuotedAlterTableRenameIndexSQL(): array { @@ -1050,9 +996,6 @@ protected function getQuotedAlterTableRenameIndexSQL(): array ]; } - /** - * @group DBAL-825 - */ public function testChangeColumnsTypeWithDefaultValue(): void { $tableName = 'column_def_change_type'; @@ -1120,8 +1063,6 @@ protected function getQuotedAlterTableChangeColumnLengthSQL(): array /** * {@inheritDoc} - * - * @group DBAL-807 */ protected function getAlterTableRenameIndexInSchemaSQL(): array { @@ -1130,8 +1071,6 @@ protected function getAlterTableRenameIndexInSchemaSQL(): array /** * {@inheritDoc} - * - * @group DBAL-807 */ protected function getQuotedAlterTableRenameIndexInSchemaSQL(): array { @@ -1155,7 +1094,6 @@ protected function getQuotesDropConstraintSQL(): string * @param mixed[] $column * * @dataProvider getGeneratesIdentifierNamesInDefaultConstraintDeclarationSQL - * @group DBAL-830 */ public function testGeneratesIdentifierNamesInDefaultConstraintDeclarationSQL(string $table, array $column, string $expectedSql): void { @@ -1183,7 +1121,6 @@ public static function getGeneratesIdentifierNamesInDefaultConstraintDeclaration * @param string[] $expectedSql * * @dataProvider getGeneratesIdentifierNamesInCreateTableSQL - * @group DBAL-830 */ public function testGeneratesIdentifierNamesInCreateTableSQL(Table $table, array $expectedSql): void { @@ -1235,7 +1172,6 @@ public static function getGeneratesIdentifierNamesInCreateTableSQL(): iterable * @param string[] $expectedSql * * @dataProvider getGeneratesIdentifierNamesInAlterTableSQL - * @group DBAL-830 */ public function testGeneratesIdentifierNamesInAlterTableSQL(TableDiff $tableDiff, array $expectedSql): void { @@ -1347,9 +1283,6 @@ public static function getGeneratesIdentifierNamesInAlterTableSQL(): iterable ]; } - /** - * @group DBAL-423 - */ public function testReturnsGuidTypeDeclarationSQL(): void { self::assertSame('UNIQUEIDENTIFIER', $this->platform->getGuidTypeDeclarationSQL([])); @@ -1460,9 +1393,6 @@ public function testModifyLimitQueryWithTopNSubQueryWithOrderBy(): void $this->expectCteWithMaxRowNum($alteredSql, 10, $sql); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableColumnsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1471,9 +1401,6 @@ public function testQuotesTableNameInListTableColumnsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesSchemaNameInListTableColumnsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1482,9 +1409,6 @@ public function testQuotesSchemaNameInListTableColumnsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableForeignKeysSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1493,9 +1417,6 @@ public function testQuotesTableNameInListTableForeignKeysSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesSchemaNameInListTableForeignKeysSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1504,9 +1425,6 @@ public function testQuotesSchemaNameInListTableForeignKeysSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableIndexesSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1515,9 +1433,6 @@ public function testQuotesTableNameInListTableIndexesSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesSchemaNameInListTableIndexesSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1526,21 +1441,16 @@ public function testQuotesSchemaNameInListTableIndexesSQL(): void ); } - /** - * @group 2859 - */ public function testGetDefaultValueDeclarationSQLForDateType(): void { $currentDateSql = $this->platform->getCurrentDateSQL(); foreach (['date', 'date_immutable'] as $type) { - $field = [ - 'type' => Type::getType($type), - 'default' => $currentDateSql, - ]; - self::assertSame( ' DEFAULT CONVERT(date, GETDATE())', - $this->platform->getDefaultValueDeclarationSQL($field) + $this->platform->getDefaultValueDeclarationSQL([ + 'type' => Type::getType($type), + 'default' => $currentDateSql, + ]) ); } } diff --git a/tests/Doctrine/Tests/DBAL/Platforms/DB2PlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/DB2PlatformTest.php index e23c056f0b4..524ed83a9e3 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/DB2PlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/DB2PlatformTest.php @@ -446,10 +446,6 @@ public function testReturnsBinaryTypeDeclarationSQL(): void self::assertSame('CHAR(254) FOR BIT DATA', $this->platform->getBinaryTypeDeclarationSQL(['fixed' => true, 'length' => 0])); } - /** - * @group legacy - * @expectedDeprecation Binary field length 32705 is greater than supported by the platform (32704). Reduce the field length or use a BLOB field instead. - */ public function testReturnsBinaryTypeLongerThanMaxDeclarationSQL(): void { self::assertSame('BLOB(1M)', $this->platform->getBinaryTypeDeclarationSQL(['length' => 32705])); @@ -458,8 +454,6 @@ public function testReturnsBinaryTypeLongerThanMaxDeclarationSQL(): void /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getAlterTableRenameIndexSQL(): array { @@ -468,8 +462,6 @@ protected function getAlterTableRenameIndexSQL(): array /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getQuotedAlterTableRenameIndexSQL(): array { @@ -507,8 +499,6 @@ protected function getQuotedAlterTableChangeColumnLengthSQL(): array /** * {@inheritDoc} - * - * @group DBAL-807 */ protected function getAlterTableRenameIndexInSchemaSQL(): array { @@ -517,8 +507,6 @@ protected function getAlterTableRenameIndexInSchemaSQL(): array /** * {@inheritDoc} - * - * @group DBAL-807 */ protected function getQuotedAlterTableRenameIndexInSchemaSQL(): array { @@ -528,9 +516,6 @@ protected function getQuotedAlterTableRenameIndexInSchemaSQL(): array ]; } - /** - * @group DBAL-423 - */ public function testReturnsGuidTypeDeclarationSQL(): void { self::assertSame('CHAR(36)', $this->platform->getGuidTypeDeclarationSQL([])); @@ -577,7 +562,6 @@ protected function getCommentOnColumnSQL(): array } /** - * @group DBAL-944 * @dataProvider getGeneratesAlterColumnSQL */ public function testGeneratesAlterColumnSQL(string $changedProperty, Column $column, ?string $expectedSQLClause = null): void @@ -705,9 +689,6 @@ protected function getGeneratesAlterTableRenameIndexUsedByForeignKeySQL(): array return ['RENAME INDEX idx_foo TO idx_foo_renamed']; } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableColumnsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -716,9 +697,6 @@ public function testQuotesTableNameInListTableColumnsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableIndexesSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -727,9 +705,6 @@ public function testQuotesTableNameInListTableIndexesSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableForeignKeysSQL(): void { self::assertStringContainsStringIgnoringCase( diff --git a/tests/Doctrine/Tests/DBAL/Platforms/MySQL57PlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/MySQL57PlatformTest.php index 301387cfe09..4ff3e3848d4 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/MySQL57PlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/MySQL57PlatformTest.php @@ -31,8 +31,6 @@ public function testInitializesJsonTypeMapping(): void /** * @return string[] - * - * @group DBAL-234 */ protected function getAlterTableRenameIndexSQL(): array { @@ -41,8 +39,6 @@ protected function getAlterTableRenameIndexSQL(): array /** * @return string[] - * - * @group DBAL-234 */ protected function getQuotedAlterTableRenameIndexSQL(): array { @@ -54,8 +50,6 @@ protected function getQuotedAlterTableRenameIndexSQL(): array /** * @return string[] - * - * @group DBAL-807 */ protected function getAlterTableRenameIndexInSchemaSQL(): array { @@ -64,8 +58,6 @@ protected function getAlterTableRenameIndexInSchemaSQL(): array /** * @return string[] - * - * @group DBAL-807 */ protected function getQuotedAlterTableRenameIndexInSchemaSQL(): array { diff --git a/tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php index 68a8db28b93..c64cd066248 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php @@ -243,7 +243,6 @@ protected function getGenerateForeignKeySql(): string /** * @param mixed[] $options * - * @group DBAL-1097 * @dataProvider getGeneratesAdvancedForeignKeyOptionsSQLData */ public function testGeneratesAdvancedForeignKeyOptionsSQL(array $options, string $expectedSql): void @@ -451,10 +450,6 @@ protected function getQuotedColumnInForeignKeySQL(): array ]; } - /** - * @group DBAL-472 - * @group DBAL-1001 - */ public function testAlterTableNotNULL(): void { $tableDiff = new TableDiff('mytable'); @@ -490,9 +485,6 @@ public function testAlterTableNotNULL(): void self::assertEquals($expectedSql, $this->platform->getAlterTableSQL($tableDiff)); } - /** - * @group DBAL-2555 - */ public function testInitializesDoctrineTypeMappings(): void { self::assertTrue($this->platform->hasDoctrineTypeMappingFor('long raw')); @@ -521,10 +513,6 @@ public function testReturnsBinaryTypeDeclarationSQL(): void self::assertSame('RAW(2000)', $this->platform->getBinaryTypeDeclarationSQL(['fixed' => true, 'length' => 2000])); } - /** - * @group legacy - * @expectedDeprecation Binary field length 2001 is greater than supported by the platform (2000). Reduce the field length or use a BLOB field instead. - */ public function testReturnsBinaryTypeLongerThanMaxDeclarationSQL(): void { self::assertSame('BLOB', $this->platform->getBinaryTypeDeclarationSQL(['length' => 2001])); @@ -548,18 +536,11 @@ public function testDoesNotPropagateUnnecessaryTableAlterationOnBinaryType(): vo self::assertEmpty($this->platform->getAlterTableSQL($comparator->diffTable($table1, $table2))); } - /** - * @group DBAL-563 - */ public function testUsesSequenceEmulatedIdentityColumns(): void { self::assertTrue($this->platform->usesSequenceEmulatedIdentityColumns()); } - /** - * @group DBAL-563 - * @group DBAL-831 - */ public function testReturnsIdentitySequenceName(): void { self::assertSame('MYTABLE_SEQ', $this->platform->getIdentitySequenceName('mytable', 'mycolumn')); @@ -570,7 +551,6 @@ public function testReturnsIdentitySequenceName(): void /** * @dataProvider dataCreateSequenceWithCache - * @group DBAL-139 */ public function testCreateSequenceWithCache(int $cacheSize, string $expectedSql): void { @@ -592,8 +572,6 @@ public static function dataCreateSequenceWithCache(): iterable /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getAlterTableRenameIndexSQL(): array { @@ -602,8 +580,6 @@ protected function getAlterTableRenameIndexSQL(): array /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getQuotedAlterTableRenameIndexSQL(): array { @@ -641,8 +617,6 @@ protected function getQuotedAlterTableChangeColumnLengthSQL(): array /** * {@inheritDoc} - * - * @group DBAL-807 */ protected function getAlterTableRenameIndexInSchemaSQL(): array { @@ -651,8 +625,6 @@ protected function getAlterTableRenameIndexInSchemaSQL(): array /** * {@inheritDoc} - * - * @group DBAL-807 */ protected function getQuotedAlterTableRenameIndexInSchemaSQL(): array { @@ -667,9 +639,6 @@ protected function getQuotesDropForeignKeySQL(): string return 'ALTER TABLE "table" DROP CONSTRAINT "select"'; } - /** - * @group DBAL-423 - */ public function testReturnsGuidTypeDeclarationSQL(): void { self::assertSame('CHAR(36)', $this->platform->getGuidTypeDeclarationSQL([])); @@ -687,7 +656,6 @@ public function getAlterTableRenameColumnSQL(): array * @param string[] $expectedSql * * @dataProvider getReturnsDropAutoincrementSQL - * @group DBAL-831 */ public function testReturnsDropAutoincrementSQL(string $table, array $expectedSql): void { @@ -757,9 +725,6 @@ protected function getCommentOnColumnSQL(): array ]; } - /** - * @group DBAL-1004 - */ public function testAltersTableColumnCommentWithExplicitlyQuotedIdentifiers(): void { $table1 = new Table('"foo"', [new Column('"bar"', Type::getType('integer'))]); @@ -818,7 +783,6 @@ public function testQuotedTableNames(): void /** * @dataProvider getReturnsGetListTableColumnsSQL - * @group DBAL-831 */ public function testReturnsGetListTableColumnsSQL(?string $database, string $expectedSql): void { @@ -916,9 +880,6 @@ protected function getGeneratesAlterTableRenameIndexUsedByForeignKeySQL(): array return ['ALTER INDEX idx_foo RENAME TO idx_foo_renamed']; } - /** - * @group DBAL-2436 - */ public function testQuotesDatabaseNameInListSequencesSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -927,9 +888,6 @@ public function testQuotesDatabaseNameInListSequencesSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableIndexesSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -938,9 +896,6 @@ public function testQuotesTableNameInListTableIndexesSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableForeignKeysSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -949,9 +904,6 @@ public function testQuotesTableNameInListTableForeignKeysSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableConstraintsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -960,9 +912,6 @@ public function testQuotesTableNameInListTableConstraintsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableColumnsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -971,9 +920,6 @@ public function testQuotesTableNameInListTableColumnsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesDatabaseNameInListTableColumnsSQL(): void { self::assertStringContainsStringIgnoringCase( diff --git a/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL92PlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL92PlatformTest.php index 2ae9c4c6f2d..a6a8679a56a 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL92PlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL92PlatformTest.php @@ -21,17 +21,11 @@ public function createPlatform(): AbstractPlatform return new PostgreSQL92Platform(); } - /** - * @group DBAL-553 - */ public function testHasNativeJsonType(): void { self::assertTrue($this->platform->hasNativeJsonType()); } - /** - * @group DBAL-553 - */ public function testReturnsJsonTypeDeclarationSQL(): void { self::assertSame('JSON', $this->platform->getJsonTypeDeclarationSQL([])); @@ -55,18 +49,12 @@ public function testReturnsSmallIntTypeDeclarationSQL(): void ); } - /** - * @group DBAL-553 - */ public function testInitializesJsonTypeMapping(): void { self::assertTrue($this->platform->hasDoctrineTypeMappingFor('json')); self::assertEquals(Types::JSON, $this->platform->getDoctrineTypeMapping('json')); } - /** - * @group DBAL-1220 - */ public function testReturnsCloseActiveDatabaseConnectionsSQL(): void { self::assertSame( diff --git a/tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php index 234a4f36ed2..21440b17c72 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php @@ -829,10 +829,6 @@ public function testReturnsBinaryTypeDeclarationSQL(): void self::assertSame('BINARY(32767)', $this->platform->getBinaryTypeDeclarationSQL(['fixed' => true, 'length' => 32767])); } - /** - * @group legacy - * @expectedDeprecation Binary field length 32768 is greater than supported by the platform (32767). Reduce the field length or use a BLOB field instead. - */ public function testReturnsBinaryTypeLongerThanMaxDeclarationSQL(): void { self::assertSame('LONG BINARY', $this->platform->getBinaryTypeDeclarationSQL(['length' => 32768])); @@ -841,8 +837,6 @@ public function testReturnsBinaryTypeLongerThanMaxDeclarationSQL(): void /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getAlterTableRenameIndexSQL(): array { @@ -851,8 +845,6 @@ protected function getAlterTableRenameIndexSQL(): array /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getQuotedAlterTableRenameIndexSQL(): array { @@ -890,8 +882,6 @@ protected function getQuotedAlterTableChangeColumnLengthSQL(): array /** * {@inheritDoc} - * - * @group DBAL-807 */ protected function getAlterTableRenameIndexInSchemaSQL(): array { @@ -900,8 +890,6 @@ protected function getAlterTableRenameIndexInSchemaSQL(): array /** * {@inheritDoc} - * - * @group DBAL-807 */ protected function getQuotedAlterTableRenameIndexInSchemaSQL(): array { @@ -911,9 +899,6 @@ protected function getQuotedAlterTableRenameIndexInSchemaSQL(): array ]; } - /** - * @group DBAL-423 - */ public function testReturnsGuidTypeDeclarationSQL(): void { self::assertSame('UNIQUEIDENTIFIER', $this->platform->getGuidTypeDeclarationSQL([])); @@ -955,9 +940,6 @@ protected function getCommentOnColumnSQL(): array ]; } - /** - * @group DBAL-1004 - */ public function testAltersTableColumnCommentWithExplicitlyQuotedIdentifiers(): void { $table1 = new Table('"foo"', [new Column('"bar"', Type::getType('integer'))]); @@ -1025,9 +1007,6 @@ protected function getGeneratesAlterTableRenameIndexUsedByForeignKeySQL(): array return ['ALTER INDEX idx_foo ON mytable RENAME TO idx_foo_renamed']; } - /** - * @group DBAL-2436 - */ public function testQuotesSchemaNameInListTableColumnsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1036,17 +1015,11 @@ public function testQuotesSchemaNameInListTableColumnsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableConstraintsSQL(): void { self::assertStringContainsStringIgnoringCase("'Foo''Bar\\'", $this->platform->getListTableConstraintsSQL("Foo'Bar\\"), '', true); } - /** - * @group DBAL-2436 - */ public function testQuotesSchemaNameInListTableConstraintsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1055,9 +1028,6 @@ public function testQuotesSchemaNameInListTableConstraintsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableForeignKeysSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1066,9 +1036,6 @@ public function testQuotesTableNameInListTableForeignKeysSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesSchemaNameInListTableForeignKeysSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1077,9 +1044,6 @@ public function testQuotesSchemaNameInListTableForeignKeysSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableIndexesSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -1088,9 +1052,6 @@ public function testQuotesTableNameInListTableIndexesSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesSchemaNameInListTableIndexesSQL(): void { self::assertStringContainsStringIgnoringCase( diff --git a/tests/Doctrine/Tests/DBAL/Platforms/SQLAzurePlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/SQLAzurePlatformTest.php index 81c38139686..a839af82e96 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/SQLAzurePlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/SQLAzurePlatformTest.php @@ -6,9 +6,6 @@ use Doctrine\DBAL\Schema\Table; use Doctrine\Tests\DbalTestCase; -/** - * @group DBAL-222 - */ class SQLAzurePlatformTest extends DbalTestCase { /** @var SQLAzurePlatform */ diff --git a/tests/Doctrine/Tests/DBAL/Platforms/SQLServer2012PlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/SQLServer2012PlatformTest.php index 0004c65fdad..a4a235cbbc3 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/SQLServer2012PlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/SQLServer2012PlatformTest.php @@ -120,9 +120,6 @@ public function testModifyLimitQueryWithFromColumnNames(): void self::assertEquals('SELECT a.fromFoo, fromBar FROM foo ORDER BY (SELECT 0) OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY', $sql); } - /** - * @group DBAL-927 - */ public function testModifyLimitQueryWithExtraLongQuery(): void { $query = 'SELECT table1.column1, table2.column2, table3.column3, table4.column4, table5.column5, table6.column6, table7.column7, table8.column8 FROM table1, table2, table3, table4, table5, table6, table7, table8 '; @@ -141,9 +138,6 @@ public function testModifyLimitQueryWithExtraLongQuery(): void self::assertEquals($expected, $sql); } - /** - * @group DDC-2470 - */ public function testModifyLimitQueryWithOrderByClause(): void { $sql = 'SELECT m0_.NOMBRE AS NOMBRE0, m0_.FECHAINICIO AS FECHAINICIO1, m0_.FECHAFIN AS FECHAFIN2 FROM MEDICION m0_ WITH (NOLOCK) INNER JOIN ESTUDIO e1_ ON m0_.ESTUDIO_ID = e1_.ID INNER JOIN CLIENTE c2_ ON e1_.CLIENTE_ID = c2_.ID INNER JOIN USUARIO u3_ ON c2_.ID = u3_.CLIENTE_ID WHERE u3_.ID = ? ORDER BY m0_.FECHAINICIO DESC'; @@ -153,9 +147,6 @@ public function testModifyLimitQueryWithOrderByClause(): void self::assertEquals($expected, $actual); } - /** - * @group DBAL-713 - */ public function testModifyLimitQueryWithSubSelectInSelectList(): void { $sql = $this->platform->modifyLimitQuery( @@ -182,9 +173,6 @@ public function testModifyLimitQueryWithSubSelectInSelectList(): void ); } - /** - * @group DBAL-713 - */ public function testModifyLimitQueryWithSubSelectInSelectListAndOrderByClause(): void { $sql = $this->platform->modifyLimitQuery( @@ -214,9 +202,6 @@ public function testModifyLimitQueryWithSubSelectInSelectListAndOrderByClause(): ); } - /** - * @group DBAL-834 - */ public function testModifyLimitQueryWithAggregateFunctionInOrderByClause(): void { $sql = $this->platform->modifyLimitQuery( @@ -341,10 +326,10 @@ public function testModifyLimitSubqueryWithJoinAndSubqueryOrderedByColumnsFromBo public function testModifyLimitSubquerySimple(): void { $querySql = 'SELECT DISTINCT id_0 FROM ' - . '(SELECT k0_.id AS id_0, k0_.field AS field_1 ' - . 'FROM key_table k0_ WHERE (k0_.where_field IN (1))) dctrn_result'; - $alteredSql = 'SELECT DISTINCT id_0 FROM (SELECT k0_.id AS id_0, k0_.field AS field_1 ' - . 'FROM key_table k0_ WHERE (k0_.where_field IN (1))) dctrn_result ORDER BY 1 OFFSET 0 ROWS FETCH NEXT 20 ROWS ONLY'; + . '(SELECT k0_.id AS id_0, k0_.column AS column_1 ' + . 'FROM key_table k0_ WHERE (k0_.where_column IN (1))) dctrn_result'; + $alteredSql = 'SELECT DISTINCT id_0 FROM (SELECT k0_.id AS id_0, k0_.column AS column_1 ' + . 'FROM key_table k0_ WHERE (k0_.where_column IN (1))) dctrn_result ORDER BY 1 OFFSET 0 ROWS FETCH NEXT 20 ROWS ONLY'; $sql = $this->platform->modifyLimitQuery($querySql, 20); self::assertEquals($alteredSql, $sql); } diff --git a/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php index 0ff64ba7111..9b3f3a33561 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php @@ -16,7 +16,6 @@ public function createPlatform(): AbstractPlatform /** * @param int|bool|null $lockMode * - * @group DDC-2310 * @dataProvider getLockHints */ public function testAppendsLockHint($lockMode, string $lockHint): void @@ -28,7 +27,6 @@ public function testAppendsLockHint($lockMode, string $lockHint): void } /** - * @group DBAL-2408 * @dataProvider getModifyLimitQueries */ public function testScrubInnerOrderBy(string $query, int $limit, ?int $offset, string $expectedResult): void diff --git a/tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php index 5c99cd455ff..6737e64594d 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php @@ -80,10 +80,6 @@ public function testIgnoresUnsignedIntegerDeclarationForAutoIncrementalIntegers( ); } - /** - * @group DBAL-752 - * @group DBAL-924 - */ public function testGeneratesTypeDeclarationForTinyIntegers(): void { self::assertEquals( @@ -110,10 +106,6 @@ public function testGeneratesTypeDeclarationForTinyIntegers(): void ); } - /** - * @group DBAL-752 - * @group DBAL-924 - */ public function testGeneratesTypeDeclarationForSmallIntegers(): void { self::assertEquals( @@ -144,10 +136,6 @@ public function testGeneratesTypeDeclarationForSmallIntegers(): void ); } - /** - * @group DBAL-752 - * @group DBAL-924 - */ public function testGeneratesTypeDeclarationForMediumIntegers(): void { self::assertEquals( @@ -208,10 +196,6 @@ public function testGeneratesTypeDeclarationForIntegers(): void ); } - /** - * @group DBAL-752 - * @group DBAL-924 - */ public function testGeneratesTypeDeclarationForBigIntegers(): void { self::assertEquals( @@ -324,9 +308,6 @@ public function getGenerateAlterTableSql(): array ]; } - /** - * @group DDC-1845 - */ public function testGenerateTableSqlShouldNotAutoQuotePrimaryKey(): void { $table = new Table('test'); @@ -520,8 +501,6 @@ public function testReturnsBinaryTypeDeclarationSQL(): void /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getAlterTableRenameIndexSQL(): array { @@ -537,8 +516,6 @@ protected function getAlterTableRenameIndexSQL(): array /** * {@inheritDoc} - * - * @group DBAL-234 */ protected function getQuotedAlterTableRenameIndexSQL(): array { @@ -596,9 +573,6 @@ protected function getQuotedAlterTableChangeColumnLengthSQL(): array ]; } - /** - * @group DBAL-807 - */ public function testAlterTableRenameIndexInSchema(): void { $this->markTestIncomplete( @@ -607,9 +581,6 @@ public function testAlterTableRenameIndexInSchema(): void ); } - /** - * @group DBAL-807 - */ public function testQuotesAlterTableRenameIndexInSchema(): void { $this->markTestIncomplete( @@ -618,9 +589,6 @@ public function testQuotesAlterTableRenameIndexInSchema(): void ); } - /** - * @group DBAL-423 - */ public function testReturnsGuidTypeDeclarationSQL(): void { self::assertSame('CHAR(36)', $this->platform->getGuidTypeDeclarationSQL([])); @@ -742,9 +710,6 @@ protected function getGeneratesAlterTableRenameIndexUsedByForeignKeySQL(): array ]; } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableConstraintsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -753,9 +718,6 @@ public function testQuotesTableNameInListTableConstraintsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableColumnsSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -764,9 +726,6 @@ public function testQuotesTableNameInListTableColumnsSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableIndexesSQL(): void { self::assertStringContainsStringIgnoringCase( @@ -775,9 +734,6 @@ public function testQuotesTableNameInListTableIndexesSQL(): void ); } - /** - * @group DBAL-2436 - */ public function testQuotesTableNameInListTableForeignKeysSQL(): void { self::assertStringContainsStringIgnoringCase( diff --git a/tests/Doctrine/Tests/DBAL/Portability/StatementTest.php b/tests/Doctrine/Tests/DBAL/Portability/StatementTest.php index 067581e81ab..f41124a8334 100644 --- a/tests/Doctrine/Tests/DBAL/Portability/StatementTest.php +++ b/tests/Doctrine/Tests/DBAL/Portability/StatementTest.php @@ -31,9 +31,6 @@ protected function setUp(): void $this->stmt = $this->createStatement($this->wrappedStmt, $this->conn); } - /** - * @group DBAL-726 - */ public function testBindParam(): void { $column = 'mycolumn'; diff --git a/tests/Doctrine/Tests/DBAL/Query/Expression/CompositeExpressionTest.php b/tests/Doctrine/Tests/DBAL/Query/Expression/CompositeExpressionTest.php index f6379ce8371..fa76b6ef5ad 100644 --- a/tests/Doctrine/Tests/DBAL/Query/Expression/CompositeExpressionTest.php +++ b/tests/Doctrine/Tests/DBAL/Query/Expression/CompositeExpressionTest.php @@ -5,9 +5,6 @@ use Doctrine\DBAL\Query\Expression\CompositeExpression; use Doctrine\Tests\DbalTestCase; -/** - * @group DBAL-12 - */ class CompositeExpressionTest extends DbalTestCase { public function testCount(): void diff --git a/tests/Doctrine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php b/tests/Doctrine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php index 68ae37c5fa8..4428b6a92c9 100644 --- a/tests/Doctrine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php +++ b/tests/Doctrine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php @@ -7,9 +7,6 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder; use Doctrine\Tests\DbalTestCase; -/** - * @group DBAL-12 - */ class ExpressionBuilderTest extends DbalTestCase { /** @var ExpressionBuilder */ diff --git a/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php b/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php index 7d401ddc911..fe61f3f0317 100644 --- a/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php +++ b/tests/Doctrine/Tests/DBAL/Query/QueryBuilderTest.php @@ -9,9 +9,6 @@ use Doctrine\DBAL\Query\QueryException; use Doctrine\Tests\DbalTestCase; -/** - * @group DBAL-12 - */ class QueryBuilderTest extends DbalTestCase { /** @var Connection */ @@ -28,9 +25,6 @@ protected function setUp(): void ->will($this->returnValue($expressionBuilder)); } - /** - * @group DBAL-2291 - */ public function testSimpleSelectWithoutFrom(): void { $qb = new QueryBuilder($this->conn); @@ -673,9 +667,6 @@ public function testCreatePositionalParameter(): void self::assertEquals(ParameterType::INTEGER, $qb->getParameterType(1)); } - /** - * @group DBAL-172 - */ public function testReferenceJoinFromJoin(): void { $qb = new QueryBuilder($this->conn); @@ -692,9 +683,6 @@ public function testReferenceJoinFromJoin(): void self::assertEquals('', $qb->getSQL()); } - /** - * @group DBAL-172 - */ public function testSelectFromMasterWithWhereOnJoinedTables(): void { $qb = new QueryBuilder($this->conn); @@ -710,9 +698,6 @@ public function testSelectFromMasterWithWhereOnJoinedTables(): void self::assertEquals("SELECT COUNT(DISTINCT news.id) FROM newspages news INNER JOIN nodeversion nv ON nv.refId = news.id AND nv.refEntityname='Entity\\News' INNER JOIN nodetranslation nt ON nv.nodetranslation = nt.id INNER JOIN node n ON nt.node = n.id WHERE (nt.lang = ?) AND (n.deleted = 0)", $qb->getSQL()); } - /** - * @group DBAL-442 - */ public function testSelectWithMultipleFromAndJoins(): void { $qb = new QueryBuilder($this->conn); @@ -728,9 +713,6 @@ public function testSelectWithMultipleFromAndJoins(): void self::assertEquals('SELECT DISTINCT u.id FROM users u INNER JOIN permissions p ON p.user_id = u.id, articles a INNER JOIN comments c ON c.article_id = a.id WHERE (u.id = a.user_id) AND (p.read = 1)', $qb->getSQL()); } - /** - * @group DBAL-774 - */ public function testSelectWithJoinsWithMultipleOnConditionsParseOrder(): void { $qb = new QueryBuilder($this->conn); @@ -753,9 +735,6 @@ public function testSelectWithJoinsWithMultipleOnConditionsParseOrder(): void ); } - /** - * @group DBAL-774 - */ public function testSelectWithMultipleFromsAndJoinsWithMultipleOnConditionsParseOrder(): void { $qb = new QueryBuilder($this->conn); @@ -871,9 +850,6 @@ public function testSelectAllWithoutTableAlias(): void self::assertEquals('SELECT * FROM users', (string) $qb); } - /** - * @group DBAL-959 - */ public function testGetParameterType(): void { $qb = new QueryBuilder($this->conn); @@ -892,9 +868,6 @@ public function testGetParameterType(): void self::assertSame(ParameterType::STRING, $qb->getParameterType('name')); } - /** - * @group DBAL-959 - */ public function testGetParameterTypes(): void { $qb = new QueryBuilder($this->conn); @@ -919,9 +892,6 @@ public function testGetParameterTypes(): void ], $qb->getParameterTypes()); } - /** - * @group DBAL-1137 - */ public function testJoinWithNonUniqueAliasThrowsException(): void { $qb = new QueryBuilder($this->conn); diff --git a/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php b/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php index bfa7a5fcc30..a96369ef7da 100644 --- a/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php +++ b/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php @@ -8,10 +8,6 @@ use Doctrine\DBAL\SQLParserUtilsException; use Doctrine\Tests\DbalTestCase; -/** - * @group DBAL-78 - * @group DDC-1372 - */ class SQLParserUtilsTest extends DbalTestCase { /** @@ -62,10 +58,10 @@ public static function dataGetPlaceholderPositions(): iterable ['SELECT [d.ns:col_name] FROM my_table d WHERE [d.date] >= :param1', false, [57 => 'param1']], // Ticket DBAL-552 ['SELECT * FROM foo WHERE jsonb_exists_any(foo.bar, ARRAY[:foo])', false, [56 => 'foo']], // Ticket GH-2295 ['SELECT * FROM foo WHERE jsonb_exists_any(foo.bar, array[:foo])', false, [56 => 'foo']], - ['SELECT table.field1, ARRAY[\'3\'] FROM schema.table table WHERE table.f1 = :foo AND ARRAY[\'3\']', false, [73 => 'foo']], - ['SELECT table.field1, ARRAY[\'3\']::integer[] FROM schema.table table WHERE table.f1 = :foo AND ARRAY[\'3\']::integer[]', false, [84 => 'foo']], - ['SELECT table.field1, ARRAY[:foo] FROM schema.table table WHERE table.f1 = :bar AND ARRAY[\'3\']', false, [27 => 'foo', 74 => 'bar']], - ['SELECT table.field1, ARRAY[:foo]::integer[] FROM schema.table table WHERE table.f1 = :bar AND ARRAY[\'3\']::integer[]', false, [27 => 'foo', 85 => 'bar']], + ['SELECT table.column1, ARRAY[\'3\'] FROM schema.table table WHERE table.f1 = :foo AND ARRAY[\'3\']', false, [74 => 'foo']], + ['SELECT table.column1, ARRAY[\'3\']::integer[] FROM schema.table table WHERE table.f1 = :foo AND ARRAY[\'3\']::integer[]', false, [85 => 'foo']], + ['SELECT table.column1, ARRAY[:foo] FROM schema.table table WHERE table.f1 = :bar AND ARRAY[\'3\']', false, [28 => 'foo', 75 => 'bar']], + ['SELECT table.column1, ARRAY[:foo]::integer[] FROM schema.table table WHERE table.f1 = :bar AND ARRAY[\'3\']::integer[]', false, [28 => 'foo', 86 => 'bar']], [ <<<'SQLDATA' SELECT * FROM foo WHERE diff --git a/tests/Doctrine/Tests/DBAL/Schema/ColumnDiffTest.php b/tests/Doctrine/Tests/DBAL/Schema/ColumnDiffTest.php index b37d24b2825..88616027380 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/ColumnDiffTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/ColumnDiffTest.php @@ -10,9 +10,6 @@ class ColumnDiffTest extends TestCase { - /** - * @group DBAL-1255 - */ public function testPreservesOldColumnNameQuotation(): void { $fromColumn = new Column('"foo"', Type::getType(Types::INTEGER)); diff --git a/tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php b/tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php index e2b10b51069..16b326b40a9 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php @@ -60,10 +60,6 @@ public function testToArray(): void self::assertEquals($expected, $this->createColumn()->toArray()); } - /** - * @group legacy - * @expectedDeprecation The "unknown_option" column option is not supported, setting it is deprecated and will cause an error in Doctrine DBAL 3.0 - */ public function testSettingUnknownOptionIsStillSupported(): void { $this->expectNotToPerformAssertions(); @@ -71,10 +67,6 @@ public function testSettingUnknownOptionIsStillSupported(): void new Column('foo', $this->createMock(Type::class), ['unknown_option' => 'bar']); } - /** - * @group legacy - * @expectedDeprecation The "unknown_option" column option is not supported, setting it is deprecated and will cause an error in Doctrine DBAL 3.0 - */ public function testOptionsShouldNotBeIgnored(): void { $col1 = new Column('bar', Type::getType(Types::INTEGER), ['unknown_option' => 'bar', 'notnull' => true]); @@ -103,10 +95,6 @@ public function createColumn(): Column return new Column('foo', $string, $options); } - /** - * @group DBAL-64 - * @group DBAL-830 - */ public function testQuotedColumnName(): void { $string = Type::getType('string'); @@ -129,7 +117,6 @@ public function testQuotedColumnName(): void /** * @dataProvider getIsQuoted - * @group DBAL-830 */ public function testIsQuoted(string $columnName, bool $isQuoted): void { @@ -152,9 +139,6 @@ public static function getIsQuoted(): iterable ]; } - /** - * @group DBAL-42 - */ public function testColumnComment(): void { $column = new Column('bar', Type::getType('string')); diff --git a/tests/Doctrine/Tests/DBAL/Schema/ComparatorTest.php b/tests/Doctrine/Tests/DBAL/Schema/ComparatorTest.php index 017cc5adcb5..3b023c7928c 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/ComparatorTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/ComparatorTest.php @@ -27,7 +27,7 @@ public function testCompareSame1(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), ] ), ]); @@ -35,7 +35,7 @@ public function testCompareSame1(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), ] ), ]); @@ -51,8 +51,8 @@ public function testCompareSame2(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ] ), ]); @@ -60,8 +60,8 @@ public function testCompareSame2(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), ] ), ]); @@ -74,7 +74,7 @@ public function testCompareSame2(): void public function testCompareMissingTable(): void { $schemaConfig = new SchemaConfig(); - $table = new Table('bugdb', ['integerfield1' => new Column('integerfield1', Type::getType('integer'))]); + $table = new Table('bugdb', ['integercolumn1' => new Column('integercolumn1', Type::getType('integer'))]); $table->setSchemaConfig($schemaConfig); $schema1 = new Schema([$table], [], $schemaConfig); @@ -88,7 +88,7 @@ public function testCompareMissingTable(): void public function testCompareNewTable(): void { $schemaConfig = new SchemaConfig(); - $table = new Table('bugdb', ['integerfield1' => new Column('integerfield1', Type::getType('integer'))]); + $table = new Table('bugdb', ['integercolumn1' => new Column('integercolumn1', Type::getType('integer'))]); $table->setSchemaConfig($schemaConfig); $schema1 = new Schema([], [], $schemaConfig); @@ -112,13 +112,13 @@ public function testCompareOnlyAutoincrementChanged(): void public function testCompareMissingField(): void { - $missingColumn = new Column('integerfield1', Type::getType('integer')); + $missingColumn = new Column('integercolumn1', Type::getType('integer')); $schema1 = new Schema([ 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => $missingColumn, - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn1' => $missingColumn, + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ] ), ]); @@ -126,7 +126,7 @@ public function testCompareMissingField(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ] ), ]); @@ -138,7 +138,7 @@ public function testCompareMissingField(): void 'bugdb', [], [], - ['integerfield1' => $missingColumn] + ['integercolumn1' => $missingColumn] ), ] ); @@ -154,7 +154,7 @@ public function testCompareNewField(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), ] ), ]); @@ -162,8 +162,8 @@ public function testCompareNewField(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ] ), ]); @@ -174,7 +174,7 @@ public function testCompareNewField(): void 'bugdb' => new TableDiff( 'bugdb', [ - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ] ), ] @@ -187,8 +187,8 @@ public function testCompareNewField(): void public function testCompareChangedColumnsChangeType(): void { - $column1 = new Column('charfield1', Type::getType('string')); - $column2 = new Column('charfield1', Type::getType('integer')); + $column1 = new Column('charcolumn1', Type::getType('string')); + $column2 = new Column('charcolumn1', Type::getType('integer')); $c = new Comparator(); self::assertEquals(['type'], $c->diffColumn($column1, $column2)); @@ -201,8 +201,8 @@ public function testCompareColumnsMultipleTypeInstances(): void Type::overrideType('integer', get_class($integerType1)); $integerType2 = Type::getType('integer'); - $column1 = new Column('integerfield1', $integerType1); - $column2 = new Column('integerfield1', $integerType2); + $column1 = new Column('integercolumn1', $integerType1); + $column2 = new Column('integercolumn1', $integerType2); $c = new Comparator(); self::assertEquals([], $c->diffColumn($column1, $column2)); @@ -218,8 +218,8 @@ public function testCompareColumnsOverriddenType(): void Type::overrideType('string', get_class($oldStringInstance)); - $column1 = new Column('integerfield1', $integerType); - $column2 = new Column('integerfield1', $overriddenStringType); + $column1 = new Column('integercolumn1', $integerType); + $column2 = new Column('integercolumn1', $overriddenStringType); $c = new Comparator(); self::assertEquals([], $c->diffColumn($column1, $column2)); @@ -227,8 +227,8 @@ public function testCompareColumnsOverriddenType(): void public function testCompareChangedColumnsChangeCustomSchemaOption(): void { - $column1 = new Column('charfield1', Type::getType('string')); - $column2 = new Column('charfield1', Type::getType('string')); + $column1 = new Column('charcolumn1', Type::getType('string')); + $column2 = new Column('charcolumn1', Type::getType('string')); $column1->setCustomSchemaOption('foo', 'bar'); $column2->setCustomSchemaOption('foo', 'bar'); @@ -244,21 +244,21 @@ public function testCompareChangedColumnsChangeCustomSchemaOption(): void public function testCompareChangeColumnsMultipleNewColumnsRename(): void { $tableA = new Table('foo'); - $tableA->addColumn('datefield1', 'datetime'); + $tableA->addColumn('datecolumn1', 'datetime'); $tableB = new Table('foo'); - $tableB->addColumn('new_datefield1', 'datetime'); - $tableB->addColumn('new_datefield2', 'datetime'); + $tableB->addColumn('new_datecolumn1', 'datetime'); + $tableB->addColumn('new_datecolumn2', 'datetime'); $c = new Comparator(); $tableDiff = $c->diffTable($tableA, $tableB); - self::assertCount(1, $tableDiff->renamedColumns, 'we should have one rename datefield1 => new_datefield1.'); - self::assertArrayHasKey('datefield1', $tableDiff->renamedColumns, "'datefield1' should be set to be renamed to new_datefield1"); - self::assertCount(1, $tableDiff->addedColumns, "'new_datefield2' should be added"); - self::assertArrayHasKey('new_datefield2', $tableDiff->addedColumns, "'new_datefield2' should be added, not created through renaming!"); + self::assertCount(1, $tableDiff->renamedColumns, 'we should have one rename datecolumn1 => new_datecolumn1.'); + self::assertArrayHasKey('datecolumn1', $tableDiff->renamedColumns, "'datecolumn1' should be set to be renamed to new_datecolumn1"); + self::assertCount(1, $tableDiff->addedColumns, "'new_datecolumn2' should be added"); + self::assertArrayHasKey('new_datecolumn2', $tableDiff->addedColumns, "'new_datecolumn2' should be added, not created through renaming!"); self::assertCount(0, $tableDiff->removedColumns, 'Nothing should be removed.'); - self::assertCount(0, $tableDiff->changedColumns, 'Nothing should be changed as all fields old & new have diff names.'); + self::assertCount(0, $tableDiff->changedColumns, 'Nothing should be changed as all columns old & new have diff names.'); } public function testCompareRemovedIndex(): void @@ -267,13 +267,13 @@ public function testCompareRemovedIndex(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ], [ 'primary' => new Index( 'primary', - ['integerfield1'], + ['integercolumn1'], true ), ] @@ -283,8 +283,8 @@ public function testCompareRemovedIndex(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ] ), ]); @@ -302,7 +302,7 @@ public function testCompareRemovedIndex(): void [ 'primary' => new Index( 'primary', - ['integerfield1'], + ['integercolumn1'], true ), ] @@ -321,8 +321,8 @@ public function testCompareNewIndex(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ] ), ]); @@ -330,13 +330,13 @@ public function testCompareNewIndex(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ], [ 'primary' => new Index( 'primary', - ['integerfield1'], + ['integercolumn1'], true ), ] @@ -354,7 +354,7 @@ public function testCompareNewIndex(): void [ 'primary' => new Index( 'primary', - ['integerfield1'], + ['integercolumn1'], true ), ] @@ -373,13 +373,13 @@ public function testCompareChangedIndex(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ], [ 'primary' => new Index( 'primary', - ['integerfield1'], + ['integercolumn1'], true ), ] @@ -389,13 +389,13 @@ public function testCompareChangedIndex(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ], [ 'primary' => new Index( 'primary', - ['integerfield1', 'integerfield2'], + ['integercolumn1', 'integercolumn2'], true ), ] @@ -415,8 +415,8 @@ public function testCompareChangedIndex(): void 'primary' => new Index( 'primary', [ - 'integerfield1', - 'integerfield2', + 'integercolumn1', + 'integercolumn2', ], true ), @@ -436,11 +436,11 @@ public function testCompareChangedIndexFieldPositions(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ], [ - 'primary' => new Index('primary', ['integerfield1', 'integerfield2'], true), + 'primary' => new Index('primary', ['integercolumn1', 'integercolumn2'], true), ] ), ]); @@ -448,11 +448,11 @@ public function testCompareChangedIndexFieldPositions(): void 'bugdb' => new Table( 'bugdb', [ - 'integerfield1' => new Column('integerfield1', Type::getType('integer')), - 'integerfield2' => new Column('integerfield2', Type::getType('integer')), + 'integercolumn1' => new Column('integercolumn1', Type::getType('integer')), + 'integercolumn2' => new Column('integercolumn2', Type::getType('integer')), ], [ - 'primary' => new Index('primary', ['integerfield2', 'integerfield1'], true), + 'primary' => new Index('primary', ['integercolumn2', 'integercolumn1'], true), ] ), ]); @@ -467,7 +467,7 @@ public function testCompareChangedIndexFieldPositions(): void [], [], [ - 'primary' => new Index('primary', ['integerfield2', 'integerfield1'], true), + 'primary' => new Index('primary', ['integercolumn2', 'integercolumn1'], true), ] ), ] @@ -701,9 +701,6 @@ public function testCompareForeignKeyRestrictNoActionAreTheSame(): void self::assertFalse($c->diffForeignKey($fk1, $fk2)); } - /** - * @group DBAL-492 - */ public function testCompareForeignKeyNamesUnqualifiedAsNoSchemaInformationIsAvailable(): void { $fk1 = new ForeignKeyConstraint(['foo'], 'foo.bar', ['baz'], 'fk1'); @@ -734,8 +731,6 @@ public function testDetectRenameColumn(): void * You can easily have ambiguities in the column renaming. If these * are detected no renaming should take place, instead adding and dropping * should be used exclusively. - * - * @group DBAL-24 */ public function testDetectRenameColumnAmbiguous(): void { @@ -757,9 +752,6 @@ public function testDetectRenameColumnAmbiguous(): void self::assertCount(0, $tableDiff->renamedColumns, 'no renamings should take place.'); } - /** - * @group DBAL-1063 - */ public function testDetectRenameIndex(): void { $table1 = new Table('foo'); @@ -784,8 +776,6 @@ public function testDetectRenameIndex(): void * You can easily have ambiguities in the index renaming. If these * are detected no renaming should take place, instead adding and dropping * should be used exclusively. - * - * @group DBAL-1063 */ public function testDetectRenameIndexAmbiguous(): void { @@ -827,9 +817,6 @@ public function testDetectChangeIdentifierType(): void self::assertArrayHasKey('id', $tableDiff->changedColumns); } - /** - * @group DBAL-105 - */ public function testDiff(): void { $table = new Table('twitter_users'); @@ -854,9 +841,6 @@ public function testDiff(): void self::assertCount(0, $tableDiff->removedColumns); } - /** - * @group DBAL-112 - */ public function testChangedSequence(): void { $schema = new Schema(); @@ -872,7 +856,6 @@ public function testChangedSequence(): void } /** - * @group DBAL-106 * @psalm-suppress NullArgument */ public function testDiffDecimalWithNullPrecision(): void @@ -886,9 +869,6 @@ public function testDiffDecimalWithNullPrecision(): void self::assertEquals([], $c->diffColumn($column, $column2)); } - /** - * @group DBAL-204 - */ public function testFqnSchemaComparison(): void { $config = new SchemaConfig(); @@ -906,9 +886,6 @@ public function testFqnSchemaComparison(): void self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema)); } - /** - * @group DBAL-669 - */ public function testNamespacesComparison(): void { $config = new SchemaConfig(); @@ -933,9 +910,6 @@ public function testNamespacesComparison(): void self::assertCount(2, $diff->newTables); } - /** - * @group DBAL-204 - */ public function testFqnSchemaComparisonDifferentSchemaNameButSameTableNoDiff(): void { $config = new SchemaConfig(); @@ -953,9 +927,6 @@ public function testFqnSchemaComparisonDifferentSchemaNameButSameTableNoDiff(): self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema)); } - /** - * @group DBAL-204 - */ public function testFqnSchemaComparisonNoSchemaSame(): void { $config = new SchemaConfig(); @@ -972,9 +943,6 @@ public function testFqnSchemaComparisonNoSchemaSame(): void self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema)); } - /** - * @group DDC-1657 - */ public function testAutoIncrementSequences(): void { $oldSchema = new Schema(); @@ -996,8 +964,6 @@ public function testAutoIncrementSequences(): void /** * Check that added autoincrement sequence is not populated in newSequences - * - * @group DBAL-562 */ public function testAutoIncrementNoSequences(): void { @@ -1101,9 +1067,6 @@ public function testCompareChangedBinaryColumn(): void self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema)); } - /** - * @group DBAL-617 - */ public function testCompareQuotedAndUnquotedForeignKeyColumns(): void { $fk1 = new ForeignKeyConstraint(['foo'], 'bar', ['baz'], 'fk1', ['onDelete' => 'NO ACTION']); @@ -1167,9 +1130,6 @@ public function testComplexDiffColumn(): void self::assertEquals([], $comparator->diffColumn($column2, $column1)); } - /** - * @group DBAL-669 - */ public function testComparesNamespaces(): void { $comparator = new Comparator(); @@ -1232,7 +1192,6 @@ public function testCompareGuidColumns(): void } /** - * @group DBAL-1009 * @dataProvider getCompareColumnComments */ public function testCompareColumnComments(?string $comment1, ?string $comment2, bool $equals): void diff --git a/tests/Doctrine/Tests/DBAL/Schema/DB2SchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Schema/DB2SchemaManagerTest.php index 39d12c346c0..c2bc4a4bace 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/DB2SchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/DB2SchemaManagerTest.php @@ -39,8 +39,6 @@ protected function setUp(): void /** * @see https://github.com/doctrine/dbal/issues/2701 - * - * @group DBAL-2701 */ public function testListTableNamesFiltersAssetNamesCorrectly(): void { @@ -61,9 +59,6 @@ public function testListTableNamesFiltersAssetNamesCorrectly(): void ); } - /** - * @group DBAL-2701 - */ public function testAssetFilteringSetsACallable(): void { $filterExpression = '/^(?!T_)/'; diff --git a/tests/Doctrine/Tests/DBAL/Schema/ForeignKeyConstraintTest.php b/tests/Doctrine/Tests/DBAL/Schema/ForeignKeyConstraintTest.php index 763cd336b09..71922527a0b 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/ForeignKeyConstraintTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/ForeignKeyConstraintTest.php @@ -12,7 +12,6 @@ class ForeignKeyConstraintTest extends TestCase /** * @param string[] $indexColumns * - * @group DBAL-1062 * @dataProvider getIntersectsIndexColumnsData */ public function testIntersectsIndexColumns(array $indexColumns, bool $expectedResult): void @@ -61,7 +60,6 @@ public static function getIntersectsIndexColumnsData(): iterable /** * @param string|Table $foreignTableName * - * @group DBAL-1062 * @dataProvider getUnqualifiedForeignTableNameData */ public function testGetUnqualifiedForeignTableName($foreignTableName, string $expectedUnqualifiedTableName): void diff --git a/tests/Doctrine/Tests/DBAL/Schema/IndexTest.php b/tests/Doctrine/Tests/DBAL/Schema/IndexTest.php index fa5e979e2a0..d5d2b8761b8 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/IndexTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/IndexTest.php @@ -40,9 +40,6 @@ public function testCreateUnique(): void self::assertFalse($idx->isPrimary()); } - /** - * @group DBAL-50 - */ public function testFulfilledByUnique(): void { $idx1 = $this->createIndex(true, false); @@ -53,9 +50,6 @@ public function testFulfilledByUnique(): void self::assertFalse($idx1->isFullfilledBy($idx3)); } - /** - * @group DBAL-50 - */ public function testFulfilledByPrimary(): void { $idx1 = $this->createIndex(true, true); @@ -66,9 +60,6 @@ public function testFulfilledByPrimary(): void self::assertFalse($idx1->isFullfilledBy($idx3)); } - /** - * @group DBAL-50 - */ public function testFulfilledByIndex(): void { $idx1 = $this->createIndex(); @@ -141,9 +132,6 @@ public static function indexLengthProvider(): iterable ]; } - /** - * @group DBAL-220 - */ public function testFlags(): void { $idx1 = $this->createIndex(); @@ -160,9 +148,6 @@ public function testFlags(): void self::assertEmpty($idx1->getFlags()); } - /** - * @group DBAL-285 - */ public function testIndexQuotes(): void { $index = new Index('foo', ['`bar`', '`baz`']); diff --git a/tests/Doctrine/Tests/DBAL/Schema/Platforms/MySQLSchemaTest.php b/tests/Doctrine/Tests/DBAL/Schema/Platforms/MySQLSchemaTest.php index 7b494341e6d..23d251fda7a 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/Platforms/MySQLSchemaTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/Platforms/MySQLSchemaTest.php @@ -44,9 +44,6 @@ public function testSwitchPrimaryKeyOrder(): void ); } - /** - * @group DBAL-132 - */ public function testGenerateForeignKeySQL(): void { $tableOld = new Table('test'); @@ -61,9 +58,6 @@ public function testGenerateForeignKeySQL(): void self::assertEquals(['ALTER TABLE test ADD CONSTRAINT FK_D87F7E0C8E48560F FOREIGN KEY (foo_id) REFERENCES test_foreign (foo_id)'], $sqls); } - /** - * @group DDC-1737 - */ public function testClobNoAlterTable(): void { $tableOld = new Table('test'); diff --git a/tests/Doctrine/Tests/DBAL/Schema/SchemaTest.php b/tests/Doctrine/Tests/DBAL/Schema/SchemaTest.php index cc665df5bd1..1eee8abd2c3 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/SchemaTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/SchemaTest.php @@ -220,9 +220,6 @@ public function testDeepClone(): void self::assertSame($schemaNew->getTable('bar'), $re->getValue($fk)); } - /** - * @group DBAL-219 - */ public function testHasTableForQuotedAsset(): void { $schema = new Schema(); @@ -233,9 +230,6 @@ public function testHasTableForQuotedAsset(): void self::assertTrue($schema->hasTable('`foo`')); } - /** - * @group DBAL-669 - */ public function testHasNamespace(): void { $schema = new Schema(); @@ -257,9 +251,6 @@ public function testHasNamespace(): void self::assertTrue($schema->hasNamespace('tab')); } - /** - * @group DBAL-669 - */ public function testCreatesNamespace(): void { $schema = new Schema(); @@ -283,9 +274,6 @@ public function testCreatesNamespace(): void self::assertSame(['foo' => 'foo', 'bar' => '`bar`'], $schema->getNamespaces()); } - /** - * @group DBAL-669 - */ public function testThrowsExceptionOnCreatingNamespaceTwice(): void { $schema = new Schema(); @@ -297,9 +285,6 @@ public function testThrowsExceptionOnCreatingNamespaceTwice(): void $schema->createNamespace('foo'); } - /** - * @group DBAL-669 - */ public function testCreatesNamespaceThroughAddingTableImplicitly(): void { $schema = new Schema(); @@ -327,9 +312,6 @@ public function testCreatesNamespaceThroughAddingTableImplicitly(): void self::assertFalse($schema->hasNamespace('moo')); } - /** - * @group DBAL-669 - */ public function testCreatesNamespaceThroughAddingSequenceImplicitly(): void { $schema = new Schema(); @@ -357,9 +339,6 @@ public function testCreatesNamespaceThroughAddingSequenceImplicitly(): void self::assertFalse($schema->hasNamespace('moo')); } - /** - * @group DBAL-669 - */ public function testVisitsVisitor(): void { $schema = new Schema(); @@ -403,9 +382,6 @@ public function testVisitsVisitor(): void self::assertNull($schema->visit($visitor)); } - /** - * @group DBAL-669 - */ public function testVisitsNamespaceVisitor(): void { $schema = new Schema(); diff --git a/tests/Doctrine/Tests/DBAL/Schema/SequenceTest.php b/tests/Doctrine/Tests/DBAL/Schema/SequenceTest.php index a6314904c4e..6f9e9c86ed5 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/SequenceTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/SequenceTest.php @@ -8,9 +8,6 @@ class SequenceTest extends DbalTestCase { - /** - * @group DDC-1657 - */ public function testIsAutoincrementFor(): void { $table = new Table('foo'); diff --git a/tests/Doctrine/Tests/DBAL/Schema/SqliteSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Schema/SqliteSchemaManagerTest.php index 5a473d13c92..7df9c542e62 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/SqliteSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/SqliteSchemaManagerTest.php @@ -12,7 +12,6 @@ class SqliteSchemaManagerTest extends TestCase { /** * @dataProvider getDataColumnCollation - * @group 2865 */ public function testParseColumnCollation(?string $collation, string $column, string $sql): void { @@ -53,7 +52,6 @@ public static function getDataColumnCollation(): iterable /** * @dataProvider getDataColumnComment - * @group 2865 */ public function testParseColumnCommentFromSQL(?string $comment, string $column, string $sql): void { diff --git a/tests/Doctrine/Tests/DBAL/Schema/TableDiffTest.php b/tests/Doctrine/Tests/DBAL/Schema/TableDiffTest.php index 2a5608608bb..4c0ada138d0 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/TableDiffTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/TableDiffTest.php @@ -19,9 +19,6 @@ public function setUp(): void $this->platform = $this->createMock(AbstractPlatform::class); } - /** - * @group DBAL-1013 - */ public function testReturnsName(): void { $tableDiff = new TableDiff('foo'); @@ -29,9 +26,6 @@ public function testReturnsName(): void self::assertEquals(new Identifier('foo'), $tableDiff->getName($this->platform)); } - /** - * @group DBAL-1016 - */ public function testPrefersNameFromTableObject(): void { $tableMock = $this->getMockBuilder(Table::class) @@ -49,9 +43,6 @@ public function testPrefersNameFromTableObject(): void self::assertEquals(new Identifier('foo'), $tableDiff->getName($this->platform)); } - /** - * @group DBAL-1013 - */ public function testReturnsNewName(): void { $tableDiff = new TableDiff('foo'); diff --git a/tests/Doctrine/Tests/DBAL/Schema/TableTest.php b/tests/Doctrine/Tests/DBAL/Schema/TableTest.php index f98062b50b2..471d4b37f07 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/TableTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/TableTest.php @@ -348,9 +348,6 @@ public function testAddPrimaryKeyColumnsAreExplicitlySetToNotNull(): void self::assertTrue($column->getNotnull()); } - /** - * @group DDC-133 - */ public function testAllowImplicitSchemaTableInAutogeneratedIndexNames(): void { $table = new Table('foo.bar'); @@ -360,9 +357,6 @@ public function testAllowImplicitSchemaTableInAutogeneratedIndexNames(): void self::assertCount(1, $table->getIndexes()); } - /** - * @group DBAL-50 - */ public function testAddForeignKeyIndexImplicitly(): void { $table = new Table('foo'); @@ -381,9 +375,6 @@ public function testAddForeignKeyIndexImplicitly(): void self::assertEquals(['id'], $index->getColumns()); } - /** - * @group DBAL-1063 - */ public function testAddForeignKeyDoesNotCreateDuplicateIndex(): void { $table = new Table('foo'); @@ -400,9 +391,6 @@ public function testAddForeignKeyDoesNotCreateDuplicateIndex(): void self::assertSame(['bar'], $table->getIndex('bar_idx')->getColumns()); } - /** - * @group DBAL-1063 - */ public function testAddForeignKeyAddsImplicitIndexIfIndexColumnsDoNotSpan(): void { $table = new Table('foo'); @@ -427,10 +415,6 @@ public function testAddForeignKeyAddsImplicitIndexIfIndexColumnsDoNotSpan(): voi self::assertSame(['bar', 'baz'], $table->getIndex('idx_8c73652176ff8caa78240498')->getColumns()); } - /** - * @group DBAL-50 - * @group DBAL-1063 - */ public function testOverrulingIndexDoesNotDropOverruledIndex(): void { $table = new Table('bar'); @@ -446,9 +430,6 @@ public function testOverrulingIndexDoesNotDropOverruledIndex(): void self::assertTrue($table->hasIndex($index->getName())); } - /** - * @group DBAL-1063 - */ public function testAllowsAddingDuplicateIndexesBasedOnColumns(): void { $table = new Table('foo'); @@ -463,9 +444,6 @@ public function testAllowsAddingDuplicateIndexesBasedOnColumns(): void self::assertSame(['bar'], $table->getIndex('duplicate_idx')->getColumns()); } - /** - * @group DBAL-1063 - */ public function testAllowsAddingFulfillingIndexesBasedOnColumns(): void { $table = new Table('foo'); @@ -481,10 +459,6 @@ public function testAllowsAddingFulfillingIndexesBasedOnColumns(): void self::assertSame(['bar', 'baz'], $table->getIndex('fulfilling_idx')->getColumns()); } - /** - * @group DBAL-50 - * @group DBAL-1063 - */ public function testPrimaryKeyOverrulingUniqueIndexDoesNotDropUniqueIndex(): void { $table = new Table('bar'); @@ -572,9 +546,6 @@ public function testAddingFulfillingExplicitIndexOverridingImplicitForeignKeyCon self::assertNotSame($implicitIndex, $localTable->getIndex('IDX_8BD688E8BF396750')); } - /** - * @group DBAL-64 - */ public function testQuotedTableName(): void { $table = new Table('`bar`'); @@ -587,9 +558,6 @@ public function testQuotedTableName(): void self::assertEquals('"bar"', $table->getQuotedName($sqlitePlatform)); } - /** - * @group DBAL-79 - */ public function testTableHasPrimaryKey(): void { $table = new Table('test'); @@ -602,9 +570,6 @@ public function testTableHasPrimaryKey(): void self::assertTrue($table->hasPrimaryKey()); } - /** - * @group DBAL-91 - */ public function testAddIndexWithQuotedColumns(): void { $table = new Table('test'); @@ -615,9 +580,6 @@ public function testAddIndexWithQuotedColumns(): void self::assertTrue($table->columnsAreIndexed(['"foo"', '"bar"'])); } - /** - * @group DBAL-91 - */ public function testAddForeignKeyWithQuotedColumnsAndTable(): void { $table = new Table('test'); @@ -628,9 +590,6 @@ public function testAddForeignKeyWithQuotedColumnsAndTable(): void self::assertCount(1, $table->getForeignKeys()); } - /** - * @group DBAL-177 - */ public function testQuoteSchemaPrefixed(): void { $table = new Table('`test`.`test`'); @@ -638,9 +597,6 @@ public function testQuoteSchemaPrefixed(): void self::assertEquals('`test`.`test`', $table->getQuotedName(new MySqlPlatform())); } - /** - * @group DBAL-204 - */ public function testFullQualifiedTableName(): void { $table = new Table('`test`.`test`'); @@ -652,9 +608,6 @@ public function testFullQualifiedTableName(): void self::assertEquals('other.test', $table->getFullQualifiedName('other')); } - /** - * @group DBAL-224 - */ public function testDropIndex(): void { $table = new Table('test'); @@ -667,9 +620,6 @@ public function testDropIndex(): void self::assertFalse($table->hasIndex('idx')); } - /** - * @group DBAL-224 - */ public function testDropPrimaryKey(): void { $table = new Table('test'); @@ -682,9 +632,6 @@ public function testDropPrimaryKey(): void self::assertFalse($table->hasPrimaryKey()); } - /** - * @group DBAL-234 - */ public function testRenameIndex(): void { $table = new Table('test'); @@ -754,9 +701,6 @@ public function testRenameIndex(): void self::assertTrue($table->hasIndex('UNIQ_D87F7E0C76FF8CAA78240498')); } - /** - * @group DBAL-2508 - */ public function testKeepsIndexOptionsOnRenamingRegularIndex(): void { $table = new Table('foo'); @@ -768,9 +712,6 @@ public function testKeepsIndexOptionsOnRenamingRegularIndex(): void self::assertSame(['where' => '1 = 1'], $table->getIndex('idx_baz')->getOptions()); } - /** - * @group DBAL-2508 - */ public function testKeepsIndexOptionsOnRenamingUniqueIndex(): void { $table = new Table('foo'); @@ -782,9 +723,6 @@ public function testKeepsIndexOptionsOnRenamingUniqueIndex(): void self::assertSame(['where' => '1 = 1'], $table->getIndex('idx_baz')->getOptions()); } - /** - * @group DBAL-234 - */ public function testThrowsExceptionOnRenamingNonExistingIndex(): void { $table = new Table('test'); @@ -796,9 +734,6 @@ public function testThrowsExceptionOnRenamingNonExistingIndex(): void $table->renameIndex('foo', 'bar'); } - /** - * @group DBAL-234 - */ public function testThrowsExceptionOnRenamingToAlreadyExistingIndex(): void { $table = new Table('test'); @@ -814,7 +749,6 @@ public function testThrowsExceptionOnRenamingToAlreadyExistingIndex(): void /** * @dataProvider getNormalizesAssetNames - * @group DBAL-831 */ public function testNormalizesColumnNames(string $assetName): void { diff --git a/tests/Doctrine/Tests/DBAL/Schema/Visitor/RemoveNamespacedAssetsTest.php b/tests/Doctrine/Tests/DBAL/Schema/Visitor/RemoveNamespacedAssetsTest.php index bf4127e0143..2cfcbded3bc 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/Visitor/RemoveNamespacedAssetsTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/Visitor/RemoveNamespacedAssetsTest.php @@ -12,9 +12,6 @@ class RemoveNamespacedAssetsTest extends TestCase { - /** - * @group DBAL-204 - */ public function testRemoveNamespacedAssets(): void { $config = new SchemaConfig(); @@ -31,9 +28,6 @@ public function testRemoveNamespacedAssets(): void self::assertEquals(['test.test', 'test.baz'], array_keys($tables), "Only 2 tables should be present, both in 'test' namespace."); } - /** - * @group DBAL-204 - */ public function testCleanupForeignKeys(): void { $config = new SchemaConfig(); @@ -54,9 +48,6 @@ public function testCleanupForeignKeys(): void self::assertCount(1, $sql, 'Just one CREATE TABLE statement, no foreign key and table to foo.bar'); } - /** - * @group DBAL-204 - */ public function testCleanupForeignKeysDifferentOrder(): void { $config = new SchemaConfig(); diff --git a/tests/Doctrine/Tests/DBAL/Types/ArrayTest.php b/tests/Doctrine/Tests/DBAL/Types/ArrayTest.php index 00912413f5c..788e3bdfa99 100644 --- a/tests/Doctrine/Tests/DBAL/Types/ArrayTest.php +++ b/tests/Doctrine/Tests/DBAL/Types/ArrayTest.php @@ -47,9 +47,6 @@ public function testNullConversion(): void self::assertNull($this->type->convertToPHPValue(null, $this->platform)); } - /** - * @group DBAL-73 - */ public function testFalseConversion(): void { self::assertFalse($this->type->convertToPHPValue(serialize(false), $this->platform)); diff --git a/tests/Doctrine/Tests/DBAL/Types/BaseDateTypeTestCase.php b/tests/Doctrine/Tests/DBAL/Types/BaseDateTypeTestCase.php index e033cd0f36b..b748cdf19a2 100644 --- a/tests/Doctrine/Tests/DBAL/Types/BaseDateTypeTestCase.php +++ b/tests/Doctrine/Tests/DBAL/Types/BaseDateTypeTestCase.php @@ -68,8 +68,6 @@ public function testConvertDateTimeToPHPValue(): void } /** - * @group #2794 - * * Note that while \@see \DateTimeImmutable is supposed to be handled * by @see \Doctrine\DBAL\Types\DateTimeImmutableType, previous DBAL versions handled it just fine. * This test is just in place to prevent further regressions, even if the type is being misused @@ -82,8 +80,6 @@ public function testConvertDateTimeImmutableToPHPValue(): void } /** - * @group #2794 - * * Note that while \@see \DateTimeImmutable is supposed to be handled * by @see \Doctrine\DBAL\Types\DateTimeImmutableType, previous DBAL versions handled it just fine. * This test is just in place to prevent further regressions, even if the type is being misused diff --git a/tests/Doctrine/Tests/DBAL/Types/DateIntervalTest.php b/tests/Doctrine/Tests/DBAL/Types/DateIntervalTest.php index fa98a4f6eab..6c85de36510 100644 --- a/tests/Doctrine/Tests/DBAL/Types/DateIntervalTest.php +++ b/tests/Doctrine/Tests/DBAL/Types/DateIntervalTest.php @@ -91,9 +91,6 @@ public function testDateIntervalEmptyStringConversion(): void $this->type->convertToPHPValue('', $this->platform); } - /** - * @group DBAL-1288 - */ public function testRequiresSQLCommentHint(): void { self::assertTrue($this->type->requiresSQLCommentHint($this->platform)); diff --git a/tests/Doctrine/Tests/DBAL/Types/DateTimeImmutableTypeTest.php b/tests/Doctrine/Tests/DBAL/Types/DateTimeImmutableTypeTest.php index 921d136d104..4c3a772d344 100644 --- a/tests/Doctrine/Tests/DBAL/Types/DateTimeImmutableTypeTest.php +++ b/tests/Doctrine/Tests/DBAL/Types/DateTimeImmutableTypeTest.php @@ -97,9 +97,6 @@ public function testConvertsDateTimeStringToPHPValue(): void self::assertSame('2016-01-01 15:58:59', $date->format('Y-m-d H:i:s')); } - /** - * @group DBAL-415 - */ public function testConvertsDateTimeStringWithMicrosecondsToPHPValue(): void { $this->platform->expects($this->any()) diff --git a/tests/Doctrine/Tests/DBAL/Types/ObjectTest.php b/tests/Doctrine/Tests/DBAL/Types/ObjectTest.php index df69e965d6b..5aa7cfba9c3 100644 --- a/tests/Doctrine/Tests/DBAL/Types/ObjectTest.php +++ b/tests/Doctrine/Tests/DBAL/Types/ObjectTest.php @@ -48,9 +48,6 @@ public function testNullConversion(): void self::assertNull($this->type->convertToPHPValue(null, $this->platform)); } - /** - * @group DBAL-73 - */ public function testFalseConversion(): void { self::assertFalse($this->type->convertToPHPValue(serialize(false), $this->platform)); diff --git a/tests/Doctrine/Tests/Types/CommentedType.php b/tests/Doctrine/Tests/Types/CommentedType.php index a589c9fbe22..f56f85c36c9 100644 --- a/tests/Doctrine/Tests/Types/CommentedType.php +++ b/tests/Doctrine/Tests/Types/CommentedType.php @@ -20,7 +20,7 @@ public function getName() /** * {@inheritDoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { return strtoupper($this->getName()); } diff --git a/tests/Doctrine/Tests/Types/MySqlPointType.php b/tests/Doctrine/Tests/Types/MySqlPointType.php index 951bd7f4916..11ebbc4863a 100644 --- a/tests/Doctrine/Tests/Types/MySqlPointType.php +++ b/tests/Doctrine/Tests/Types/MySqlPointType.php @@ -20,7 +20,7 @@ public function getName() /** * {@inheritDoc} */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform) { return strtoupper($this->getName()); }