Unverified Commit 0b482cdf authored by Sergei Morozov's avatar Sergei Morozov Committed by GitHub

Merge pull request #4172 from morozov/argument-name-cleanup

Clean up inconsistent or redundant argument names
parents 6c217d5e 1a0226d2
......@@ -68,16 +68,16 @@ class QueryCacheProfile
/**
* 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 .
'&params=' . serialize($params) .
'&types=' . serialize($types) .
'&connectionParams=' . hash('sha256', serialize($connectionParams));
......
This diff is collapsed.
......@@ -223,11 +223,11 @@ class MasterSlaveConnection extends Connection
/**
* {@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 @@ class MasterSlaveConnection extends Connection
/**
* {@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 @@ class MasterSlaveConnection extends Connection
/**
* {@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 @@ class MasterSlaveConnection extends Connection
/**
* {@inheritDoc}
*/
public function prepare($statement)
public function prepare($sql)
{
$this->connect('master');
return parent::prepare($statement);
return parent::prepare($sql);
}
}
......@@ -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 @@ interface Connection
/**
* 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.
......
......@@ -120,9 +120,9 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
/**
* {@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());
......
......@@ -103,31 +103,31 @@ class DB2Statement implements IteratorAggregate, Statement
/**
* {@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;
}
......
......@@ -128,9 +128,9 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
/**
* {@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 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
/**
* {@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);
}
......
......@@ -101,16 +101,16 @@ class MysqliStatement implements IteratorAggregate, Statement
/**
* {@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 @@ class MysqliStatement implements IteratorAggregate, Statement
// 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
......
......@@ -104,9 +104,9 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection
/**
* {@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 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection
/**
* {@inheritdoc}
*/
public function exec($statement)
public function exec($sql)
{
$stmt = $this->prepare($statement);
$stmt = $this->prepare($sql);
$stmt->execute();
return $stmt->rowCount();
......
......@@ -36,10 +36,10 @@ class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
/**
* {@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 @@ class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
}
/**
* @param string $prepareString
* @param string $sql
* @param array<int, int> $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;
......
......@@ -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 @@ class Statement extends PDOStatement
$driverOptions = PDO::SQLSRV_ENCODING_BINARY;
}
return parent::bindParam($column, $variable, $type, $length, $driverOptions);
return parent::bindParam($param, $variable, $type, $length, $driverOptions);
}
/**
......
......@@ -87,7 +87,7 @@ class PDOStatement extends \PDOStatement implements Statement
}
/**
* @param mixed $column
* @param mixed $param
* @param mixed $variable
* @param int $type
* @param int|null $length
......@@ -95,12 +95,12 @@ class PDOStatement extends \PDOStatement implements Statement
*
* @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);
}
......
......@@ -108,9 +108,9 @@ class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection
/**
* {@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 @@ class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection
/**
* {@inheritdoc}
*/
public function prepare($prepareString)
public function prepare($sql)
{
return new SQLAnywhereStatement($this->connection, $prepareString);
return new SQLAnywhereStatement($this->connection, $sql);
}
/**
......
......@@ -92,9 +92,9 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement
*
* @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 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement
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);
}
......
......@@ -114,9 +114,9 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
/**
* {@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();
......
......@@ -167,14 +167,14 @@ class SQLSrvStatement implements IteratorAggregate, Statement
/**
* {@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;
......
......@@ -44,7 +44,7 @@ interface Statement extends ResultStatement
* 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 @@ interface Statement extends ResultStatement
*
* @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.
......
......@@ -82,19 +82,19 @@ class TableGenerator
/**
* 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 @@ class TableGenerator
$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 @@ class TableGenerator
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 @@ class TableGenerator
$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 @@ class TableGenerator
} 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;
}
......
......@@ -47,22 +47,22 @@ class DB2Platform extends AbstractPlatform
/**
* {@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 @@ class DB2Platform extends AbstractPlatform
/**
* {@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 @@ class DB2Platform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getBooleanTypeDeclarationSQL(array $columnDef)
public function getBooleanTypeDeclarationSQL(array $column)
{
return 'SMALLINT';
}
......@@ -149,34 +149,34 @@ class DB2Platform extends AbstractPlatform
/**
* {@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 @@ class DB2Platform extends AbstractPlatform
/**
* {@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 @@ class DB2Platform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTypeDeclarationSQL(array $column)
{
return 'DATE';
}
......@@ -250,7 +250,7 @@ class DB2Platform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getTimeTypeDeclarationSQL(array $column)
{
return 'TIME';
}
......@@ -340,7 +340,7 @@ class DB2Platform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableIndexesSQL($table, $database = null)
{
$table = $this->quoteStringLiteral($table);
......@@ -750,19 +750,19 @@ class DB2Platform extends AbstractPlatform
/**
* {@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);
}
/**
......
......@@ -72,7 +72,7 @@ class DrizzlePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getBooleanTypeDeclarationSQL(array $field)
public function getBooleanTypeDeclarationSQL(array $column)
{
return 'BOOLEAN';
}
......@@ -80,18 +80,18 @@ class DrizzlePlatform extends AbstractPlatform
/**
* {@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 @@ class DrizzlePlatform extends AbstractPlatform
/**
* {@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 @@ class DrizzlePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getClobTypeDeclarationSQL(array $field)
public function getClobTypeDeclarationSQL(array $column)
{
return 'TEXT';
}
......@@ -163,7 +163,7 @@ class DrizzlePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getBlobTypeDeclarationSQL(array $field)
public function getBlobTypeDeclarationSQL(array $column)
{
return 'BLOB';
}
......@@ -451,9 +451,9 @@ class DrizzlePlatform extends AbstractPlatform
/**
* {@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 @@ class DrizzlePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getTimeTypeDeclarationSQL(array $column)
{
return 'TIME';
}
......@@ -471,7 +471,7 @@ class DrizzlePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTypeDeclarationSQL(array $column)
{
return 'DATE';
}
......
......@@ -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';
}
......
......@@ -22,7 +22,7 @@ class MySQL57Platform extends MySqlPlatform
/**
* {@inheritdoc}
*/
public function getJsonTypeDeclarationSQL(array $field)
public function getJsonTypeDeclarationSQL(array $column)
{
return 'JSON';
}
......
......@@ -149,16 +149,16 @@ class MySqlPlatform extends AbstractPlatform
* 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);
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 @@ class MySqlPlatform extends AbstractPlatform
*
* {@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 @@ class MySqlPlatform extends AbstractPlatform
/**
* {@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 @@ class MySqlPlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTypeDeclarationSQL(array $column)
{
return 'DATE';
}
......@@ -290,7 +290,7 @@ class MySqlPlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getTimeTypeDeclarationSQL(array $column)
{
return 'TIME';
}
......@@ -298,21 +298,21 @@ class MySqlPlatform extends AbstractPlatform
/**
* {@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 @@ SQL
/**
* {@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 @@ SQL
/**
* {@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 @@ SQL
/**
* {@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 @@ SQL
*
* {@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';
......
......@@ -222,9 +222,9 @@ class OraclePlatform extends AbstractPlatform
/**
* {@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 @@ class OraclePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getBooleanTypeDeclarationSQL(array $field)
public function getBooleanTypeDeclarationSQL(array $column)
{
return 'NUMBER(1)';
}
......@@ -267,7 +267,7 @@ class OraclePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getIntegerTypeDeclarationSQL(array $field)
public function getIntegerTypeDeclarationSQL(array $column)
{
return 'NUMBER(10)';
}
......@@ -275,7 +275,7 @@ class OraclePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getBigIntTypeDeclarationSQL(array $field)
public function getBigIntTypeDeclarationSQL(array $column)
{
return 'NUMBER(20)';
}
......@@ -283,7 +283,7 @@ class OraclePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getSmallIntTypeDeclarationSQL(array $field)
public function getSmallIntTypeDeclarationSQL(array $column)
{
return 'NUMBER(5)';
}
......@@ -291,7 +291,7 @@ class OraclePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTimeTypeDeclarationSQL(array $column)
{
return 'TIMESTAMP(0)';
}
......@@ -299,7 +299,7 @@ class OraclePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTimeTzTypeDeclarationSQL(array $column)
{
return 'TIMESTAMP(0) WITH TIME ZONE';
}
......@@ -307,7 +307,7 @@ class OraclePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTypeDeclarationSQL(array $column)
{
return 'DATE';
}
......@@ -315,7 +315,7 @@ class OraclePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getTimeTypeDeclarationSQL(array $column)
{
return 'DATE';
}
......@@ -323,7 +323,7 @@ class OraclePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef)
protected function _getCommonIntegerTypeDeclarationSQL(array $column)
{
return '';
}
......@@ -356,7 +356,7 @@ class OraclePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getClobTypeDeclarationSQL(array $field)
public function getClobTypeDeclarationSQL(array $column)
{
return 'CLOB';
}
......@@ -419,7 +419,7 @@ class OraclePlatform extends AbstractPlatform
*
* @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 @@ SQL
/**
* {@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 @@ SQL
/**
* {@inheritDoc}
*/
public function getBlobTypeDeclarationSQL(array $field)
public function getBlobTypeDeclarationSQL(array $column)
{
return 'BLOB';
}
......
......@@ -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 @@ class PostgreSQL92Platform extends PostgreSQL91Platform
/**
* {@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);
}
/**
......
......@@ -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';
}
......
......@@ -346,7 +346,7 @@ SQL
*
* @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 @@ SQL
/**
* {@inheritDoc}
*/
public function getSequenceNextValSQL($sequenceName)
public function getSequenceNextValSQL($sequence)
{
return "SELECT NEXTVAL('" . $sequenceName . "')";
return "SELECT NEXTVAL('" . $sequence . "')";
}
/**
......@@ -944,7 +944,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getBooleanTypeDeclarationSQL(array $field)
public function getBooleanTypeDeclarationSQL(array $column)
{
return 'BOOLEAN';
}
......@@ -952,9 +952,9 @@ SQL
/**
* {@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 @@ SQL
/**
* {@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 @@ SQL
/**
* {@inheritDoc}
*/
public function getSmallIntTypeDeclarationSQL(array $field)
public function getSmallIntTypeDeclarationSQL(array $column)
{
return 'SMALLINT';
}
......@@ -984,7 +984,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getGuidTypeDeclarationSQL(array $field)
public function getGuidTypeDeclarationSQL(array $column)
{
return 'UUID';
}
......@@ -992,7 +992,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTimeTypeDeclarationSQL(array $column)
{
return 'TIMESTAMP(0) WITHOUT TIME ZONE';
}
......@@ -1000,7 +1000,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTimeTzTypeDeclarationSQL(array $column)
{
return 'TIMESTAMP(0) WITH TIME ZONE';
}
......@@ -1008,7 +1008,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTypeDeclarationSQL(array $column)
{
return 'DATE';
}
......@@ -1016,7 +1016,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getTimeTypeDeclarationSQL(array $column)
{
return 'TIME(0) WITHOUT TIME ZONE';
}
......@@ -1034,7 +1034,7 @@ SQL
/**
* {@inheritDoc}
*/
protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef)
protected function _getCommonIntegerTypeDeclarationSQL(array $column)
{
return '';
}
......@@ -1059,7 +1059,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getClobTypeDeclarationSQL(array $field)
public function getClobTypeDeclarationSQL(array $column)
{
return 'TEXT';
}
......@@ -1204,7 +1204,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getBlobTypeDeclarationSQL(array $field)
public function getBlobTypeDeclarationSQL(array $column)
{
return 'BYTEA';
}
......@@ -1212,23 +1212,23 @@ SQL
/**
* {@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']);
}
/**
......
......@@ -42,7 +42,7 @@ class SQLAnywhere12Platform extends SQLAnywhere11Platform
/**
* {@inheritdoc}
*/
public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTimeTzTypeDeclarationSQL(array $column)
{
return 'TIMESTAMP WITH TIME ZONE';
}
......@@ -70,9 +70,9 @@ class SQLAnywhere12Platform extends SQLAnywhere11Platform
/**
* {@inheritdoc}
*/
public function getSequenceNextValSQL($sequenceName)
public function getSequenceNextValSQL($sequence)
{
return 'SELECT ' . $sequenceName . '.NEXTVAL';
return 'SELECT ' . $sequence . '.NEXTVAL';
}
/**
......
......@@ -298,11 +298,11 @@ class SQLAnywherePlatform extends AbstractPlatform
/**
* {@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 @@ class SQLAnywherePlatform extends AbstractPlatform
/**
* {@inheritdoc}
*/
public function getBlobTypeDeclarationSQL(array $field)
public function getBlobTypeDeclarationSQL(array $column)
{
return 'LONG BINARY';
}
......@@ -337,9 +337,9 @@ class SQLAnywherePlatform extends AbstractPlatform
* 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 @@ class SQLAnywherePlatform extends AbstractPlatform
/**
* {@inheritdoc}
*/
public function getClobTypeDeclarationSQL(array $field)
public function getClobTypeDeclarationSQL(array $column)
{
return 'TEXT';
}
......@@ -499,7 +499,7 @@ class SQLAnywherePlatform extends AbstractPlatform
/**
* {@inheritdoc}
*/
public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTimeTypeDeclarationSQL(array $column)
{
return 'DATETIME';
}
......@@ -515,7 +515,7 @@ class SQLAnywherePlatform extends AbstractPlatform
/**
* {@inheritdoc}
*/
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTypeDeclarationSQL(array $column)
{
return 'DATE';
}
......@@ -678,7 +678,7 @@ class SQLAnywherePlatform extends AbstractPlatform
/**
* {@inheritdoc}
*/
public function getGuidTypeDeclarationSQL(array $field)
public function getGuidTypeDeclarationSQL(array $column)
{
return 'UNIQUEIDENTIFIER';
}
......@@ -695,11 +695,11 @@ class SQLAnywherePlatform extends AbstractPlatform
/**
* {@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 @@ SQL
/**
* {@inheritdoc}
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableIndexesSQL($table, $database = null)
{
$user = '';
......@@ -1039,11 +1039,11 @@ SQL
/**
* {@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 @@ SQL
/**
* {@inheritdoc}
*/
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getTimeTypeDeclarationSQL(array $column)
{
return 'TIME';
}
......@@ -1236,12 +1236,12 @@ SQL
/**
* {@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;
}
/**
......
......@@ -29,7 +29,7 @@ class SQLServer2005Platform extends SQLServerPlatform
/**
* {@inheritDoc}
*/
public function getClobTypeDeclarationSQL(array $field)
public function getClobTypeDeclarationSQL(array $column)
{
return 'VARCHAR(MAX)';
}
......
......@@ -23,7 +23,7 @@ class SQLServer2008Platform extends SQLServer2005Platform
/**
* {@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 @@ class SQLServer2008Platform extends SQLServer2005Platform
/**
* {@inheritDoc}
*/
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTypeDeclarationSQL(array $column)
{
return 'DATE';
}
......@@ -41,7 +41,7 @@ class SQLServer2008Platform extends SQLServer2005Platform
/**
* {@inheritDoc}
*/
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getTimeTypeDeclarationSQL(array $column)
{
return 'TIME(0)';
}
......@@ -49,7 +49,7 @@ class SQLServer2008Platform extends SQLServer2005Platform
/**
* {@inheritDoc}
*/
public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTimeTzTypeDeclarationSQL(array $column)
{
return 'DATETIMEOFFSET(6)';
}
......
......@@ -68,9 +68,9 @@ class SQLServer2012Platform extends SQLServer2008Platform
/**
* {@inheritdoc}
*/
public function getSequenceNextValSQL($sequenceName)
public function getSequenceNextValSQL($sequence)
{
return 'SELECT NEXT VALUE FOR ' . $sequenceName;
return 'SELECT NEXT VALUE FOR ' . $sequence;
}
/**
......
......@@ -963,7 +963,7 @@ SQL
/**
* {@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 @@ SQL
/**
* {@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 @@ SQL
/**
* {@inheritDoc}
*/
public function getClobTypeDeclarationSQL(array $field)
public function getClobTypeDeclarationSQL(array $column)
{
return 'VARCHAR(MAX)';
}
......@@ -1225,15 +1225,15 @@ SQL
/**
* {@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 @@ SQL
/**
* {@inheritDoc}
*/
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTypeDeclarationSQL(array $column)
{
return 'DATETIME';
}
......@@ -1249,7 +1249,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getTimeTypeDeclarationSQL(array $column)
{
return 'DATETIME';
}
......@@ -1257,7 +1257,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getBooleanTypeDeclarationSQL(array $field)
public function getBooleanTypeDeclarationSQL(array $column)
{
return 'BIT';
}
......@@ -1607,7 +1607,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getBlobTypeDeclarationSQL(array $field)
public function getBlobTypeDeclarationSQL(array $column)
{
return 'VARBINARY(MAX)';
}
......@@ -1617,23 +1617,23 @@ SQL
*
* 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;
}
......
......@@ -201,7 +201,7 @@ class SqlitePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getBooleanTypeDeclarationSQL(array $field)
public function getBooleanTypeDeclarationSQL(array $column)
{
return 'BOOLEAN';
}
......@@ -209,71 +209,71 @@ class SqlitePlatform extends AbstractPlatform
/**
* {@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<string, mixed> $field
* @param array<string, mixed> $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<string, mixed> $field
* @param array<string, mixed> $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 @@ class SqlitePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getDateTypeDeclarationSQL(array $fieldDeclaration)
public function getDateTypeDeclarationSQL(array $column)
{
return 'DATE';
}
......@@ -289,7 +289,7 @@ class SqlitePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getTimeTypeDeclarationSQL(array $fieldDeclaration)
public function getTimeTypeDeclarationSQL(array $column)
{
return 'TIME';
}
......@@ -297,14 +297,14 @@ class SqlitePlatform extends AbstractPlatform
/**
* {@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 @@ class SqlitePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getClobTypeDeclarationSQL(array $field)
public function getClobTypeDeclarationSQL(array $column)
{
return 'CLOB';
}
......@@ -451,7 +451,7 @@ class SqlitePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getListTableColumnsSQL($table, $currentDatabase = null)
public function getListTableColumnsSQL($table, $database = null)
{
$table = str_replace('.', '__', $table);
......@@ -461,7 +461,7 @@ class SqlitePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableIndexesSQL($table, $database = null)
{
$table = str_replace('.', '__', $table);
......@@ -740,7 +740,7 @@ class SqlitePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getBlobTypeDeclarationSQL(array $field)
public function getBlobTypeDeclarationSQL(array $column)
{
return 'BLOB';
}
......@@ -1013,22 +1013,23 @@ class SqlitePlatform extends AbstractPlatform
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)) {
......
......@@ -100,9 +100,9 @@ class Connection extends \Doctrine\DBAL\Connection
/**
* {@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 @@ class Connection extends \Doctrine\DBAL\Connection
*
* @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;
......
......@@ -47,11 +47,11 @@ class Statement implements IteratorAggregate, DriverStatement
/**
* {@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);
}
/**
......
......@@ -209,7 +209,7 @@ class ExpressionBuilder
/**
* 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 @@ class ExpressionBuilder
/**
* 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 @@ class ExpressionBuilder
/**
* 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
......
......@@ -145,7 +145,7 @@ abstract class AbstractSchemaManager
* 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 @@ abstract class AbstractSchemaManager
*
* 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 @@ abstract class AbstractSchemaManager
}
/**
* @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 @@ abstract class AbstractSchemaManager
/**
* 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));
}
/**
......
......@@ -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);
}
......
......@@ -199,7 +199,7 @@ class Comparator
$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 @@ class Comparator
$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 @@ class Comparator
}
/**
* 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.
......
......@@ -222,13 +222,13 @@ class DB2SchemaManager extends AbstractSchemaManager
/**
* {@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);
......
......@@ -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 @@ class Index extends AbstractAsset implements Constraint
}
/**
* @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;
}
/**
......
......@@ -320,13 +320,13 @@ class MySqlSchemaManager extends AbstractSchemaManager
/**
* {@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);
......
......@@ -400,13 +400,13 @@ SQL;
/**
* {@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);
......
......@@ -506,13 +506,13 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
/**
* {@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);
......
......@@ -331,15 +331,15 @@ class SQLServerSchemaManager extends AbstractSchemaManager
}
/**
* @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);
......
......@@ -165,20 +165,20 @@ class Schema extends AbstractAsset
}
/**
* @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 @@ class Schema extends AbstractAsset
/**
* 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 @@ class Schema extends AbstractAsset
}
/**
* @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 @@ class Schema extends AbstractAsset
/**
* 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 @@ class Schema extends AbstractAsset
/**
* 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 @@ class Schema extends AbstractAsset
/**
* 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 @@ class Schema extends AbstractAsset
/**
* 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 @@ class Schema extends AbstractAsset
/**
* 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;
}
......
......@@ -127,23 +127,23 @@ class SchemaException extends DBALException
}
/**
* @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);
}
/**
......
......@@ -537,15 +537,15 @@ SQL
}
/**
* @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);
......
This diff is collapsed.
......@@ -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[]
*/
......
......@@ -82,16 +82,16 @@ class Statement implements IteratorAggregate, DriverStatement
* 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 @@ class Statement implements IteratorAggregate, DriverStatement
$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 @@ class Statement implements IteratorAggregate, DriverStatement
*
* 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 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);
}
/**
......
......@@ -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);
}
/**
......
......@@ -21,9 +21,9 @@ class BigIntType extends Type implements PhpIntegerMappingType
/**
* {@inheritdoc}
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $column, AbstractPlatform $platform)
{
return $platform->getBigIntTypeDeclarationSQL($fieldDeclaration);
return $platform->getBigIntTypeDeclarationSQL($column);
}
/**
......
......@@ -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);
}
/**
......
......@@ -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);
}
/**
......
......@@ -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);
}
/**
......
......@@ -26,11 +26,11 @@ class DateIntervalType extends Type
/**
* {@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);
}
/**
......
......@@ -24,9 +24,9 @@ class DateTimeType extends Type implements PhpDateTimeMappingType
/**
* {@inheritdoc}
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $column, AbstractPlatform $platform)
{
return $platform->getDateTimeTypeDeclarationSQL($fieldDeclaration);
return $platform->getDateTimeTypeDeclarationSQL($column);
}
/**
......
......@@ -35,9 +35,9 @@ class DateTimeTzType extends Type implements PhpDateTimeMappingType
/**
* {@inheritdoc}
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $column, AbstractPlatform $platform)
{
return $platform->getDateTimeTzTypeDeclarationSQL($fieldDeclaration);
return $platform->getDateTimeTzTypeDeclarationSQL($column);
}
/**
......
......@@ -22,9 +22,9 @@ class DateType extends Type
/**
* {@inheritdoc}
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $column, AbstractPlatform $platform)
{
return $platform->getDateTypeDeclarationSQL($fieldDeclaration);
return $platform->getDateTypeDeclarationSQL($column);
}
/**
......
......@@ -20,9 +20,9 @@ class DecimalType extends Type
/**
* {@inheritdoc}
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $column, AbstractPlatform $platform)
{
return $platform->getDecimalTypeDeclarationSQL($fieldDeclaration);
return $platform->getDecimalTypeDeclarationSQL($column);
}
/**
......
......@@ -17,9 +17,9 @@ class FloatType extends Type
/**
* {@inheritdoc}
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $column, AbstractPlatform $platform)
{
return $platform->getFloatDeclarationSQL($fieldDeclaration);
return $platform->getFloatDeclarationSQL($column);
}
/**
......
......@@ -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);
}
/**
......
......@@ -21,9 +21,9 @@ class IntegerType extends Type implements PhpIntegerMappingType
/**
* {@inheritdoc}
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $column, AbstractPlatform $platform)
{
return $platform->getIntegerTypeDeclarationSQL($fieldDeclaration);
return $platform->getIntegerTypeDeclarationSQL($column);
}
/**
......
......@@ -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);
}
/**
......
......@@ -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);
}
/**
......
......@@ -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);
}
/**
......
......@@ -21,9 +21,9 @@ class SmallIntType extends Type implements PhpIntegerMappingType
/**
* {@inheritdoc}
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $column, AbstractPlatform $platform)
{
return $platform->getSmallIntTypeDeclarationSQL($fieldDeclaration);
return $platform->getSmallIntTypeDeclarationSQL($column);
}
/**
......
......@@ -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);
}
/**
......
......@@ -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);
}
/**
......
......@@ -22,9 +22,9 @@ class TimeType extends Type
/**
* {@inheritdoc}
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $column, AbstractPlatform $platform)
{
return $platform->getTimeTypeDeclarationSQL($fieldDeclaration);
return $platform->getTimeTypeDeclarationSQL($column);
}
/**
......
......@@ -176,14 +176,14 @@ abstract class Type
}
/**
* 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 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.
......
......@@ -24,8 +24,6 @@ class ConfigurationTest extends DbalTestCase
/**
* 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 @@ class ConfigurationTest extends DbalTestCase
/**
* Tests that the default auto-commit mode for connections can be set in the configuration container.
*
* @group DBAL-81
*/
public function testSetsDefaultConnectionAutoCommitMode(): void
{
......
......@@ -210,8 +210,6 @@ class ConnectionTest extends DbalTestCase
/**
* 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 @@ class ConnectionTest extends DbalTestCase
/**
* 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 @@ class ConnectionTest extends DbalTestCase
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 @@ class ConnectionTest extends DbalTestCase
self::assertFalse($this->connection->isAutoCommit());
}
/**
* @group DBAL-81
*/
public function testConnectStartsTransactionInNoAutoCommitMode(): void
{
$driverMock = $this->createMock(Driver::class);
......@@ -273,9 +260,6 @@ class ConnectionTest extends DbalTestCase
self::assertTrue($conn->isTransactionActive());
}
/**
* @group DBAL-81
*/
public function testCommitStartsTransactionInNoAutoCommitMode(): void
{
$driverMock = $this->createMock(Driver::class);
......@@ -323,9 +307,6 @@ class ConnectionTest extends DbalTestCase
return [[true], [false]];
}
/**
* @group DBAL-81
*/
public function testRollBackStartsTransactionInNoAutoCommitMode(): void
{
$driverMock = $this->createMock(Driver::class);
......@@ -343,9 +324,6 @@ class ConnectionTest extends DbalTestCase
self::assertTrue($conn->isTransactionActive());
}
/**
* @group DBAL-81
*/
public function testSwitchingAutoCommitModeCommitsAllCurrentTransactions(): void
{
$driverMock = $this->createMock(Driver::class);
......@@ -381,9 +359,6 @@ class ConnectionTest extends DbalTestCase
$conn->insert('footable', []);
}
/**
* @group DBAL-2511
*/
public function testUpdateWithDifferentColumnsInDataAndIdentifiers(): void
{
$conn = $this->getExecuteUpdateMockConnection();
......@@ -425,9 +400,6 @@ class ConnectionTest extends DbalTestCase
);
}
/**
* @group DBAL-2511
*/
public function testUpdateWithSameColumnInDataAndIdentifiers(): void
{
$conn = $this->getExecuteUpdateMockConnection();
......@@ -468,9 +440,6 @@ class ConnectionTest extends DbalTestCase
);
}
/**
* @group DBAL-2688
*/
public function testUpdateWithIsNull(): void
{
$conn = $this->getExecuteUpdateMockConnection();
......@@ -510,9 +479,6 @@ class ConnectionTest extends DbalTestCase
);
}
/**
* @group DBAL-2688
*/
public function testDeleteWithIsNull(): void
{
$conn = $this->getExecuteUpdateMockConnection();
......@@ -755,9 +721,6 @@ class ConnectionTest extends DbalTestCase
call_user_func_array([$conn, $method], $params);
}
/**
* @group DBAL-1127
*/
public function testPlatformDetectionIsTriggerOnlyOnceOnRetrievingPlatform(): void
{
$driverMock = $this->createMock(FutureVersionAwarePlatformDriver::class);
......@@ -824,9 +787,6 @@ class ConnectionTest extends DbalTestCase
);
}
/**
* @group #2821
*/
public function testShouldNotPassPlatformInParamsToTheQueryCacheProfileInExecuteCacheQuery(): void
{
$resultCacheDriverMock = $this->createMock(Cache::class);
......@@ -861,9 +821,6 @@ class ConnectionTest extends DbalTestCase
(new Connection($connectionParams, $driver))->executeCacheQuery($query, [], [], $queryCacheProfileMock);
}
/**
* @group #2821
*/
public function testThrowsExceptionWhenInValidPlatformSpecified(): void
{
$connectionParams = $this->params;
......@@ -876,9 +833,6 @@ class ConnectionTest extends DbalTestCase
new Connection($connectionParams, $driver);
}
/**
* @group DBAL-990
*/
public function testRethrowsOriginalExceptionOnDeterminingPlatformWhenConnectingToNonExistentDatabase(): void
{
$driverMock = $this->createMock(FutureVersionAwarePlatformDriver::class);
......@@ -900,9 +854,6 @@ class ConnectionTest extends DbalTestCase
$connection->getDatabasePlatform();
}
/**
* @group #3194
*/
public function testExecuteCacheQueryStripsPlatformFromConnectionParamsBeforeGeneratingCacheKeys(): void
{
$driver = $this->createMock(Driver::class);
......
......@@ -57,9 +57,6 @@ class DBALExceptionTest extends DbalTestCase
);
}
/**
* @group #2821
*/
public function testInvalidPlatformTypeObject(): void
{
$exception = DBALException::invalidPlatformType(new stdClass());
......@@ -70,9 +67,6 @@ class DBALExceptionTest extends DbalTestCase
);
}
/**
* @group #2821
*/
public function testInvalidPlatformTypeScalar(): void
{
$exception = DBALException::invalidPlatformType('some string');
......
......@@ -17,9 +17,6 @@ class DriverTest extends AbstractPostgreSQLDriverTest
self::assertSame('pdo_pgsql', $this->driver->getName());
}
/**
* @group DBAL-920
*/
public function testConnectionDisablesPreparesOnPhp56(): void
{
$this->skipWhenNotUsingPdoPgsql();
......@@ -34,9 +31,6 @@ class DriverTest extends AbstractPostgreSQLDriverTest
}
}
/**
* @group DBAL-920
*/
public function testConnectionDoesNotDisablePreparesOnPhp56WhenAttributeDefined(): void
{
$this->skipWhenNotUsingPdoPgsql();
......@@ -53,9 +47,6 @@ class DriverTest extends AbstractPostgreSQLDriverTest
}
}
/**
* @group DBAL-920
*/
public function testConnectionDisablePreparesOnPhp56WhenDisablePreparesIsExplicitlyDefined(): void
{
$this->skipWhenNotUsingPdoPgsql();
......
......@@ -47,7 +47,6 @@ class DriverManagerTest extends DbalTestCase
}
/**
* @group DBAL-32
* @requires extension pdo_sqlite
*/
public function testPdoInstanceSetErrorMode(): void
......
......@@ -26,7 +26,6 @@ class OracleSessionInitTest extends DbalTestCase
}
/**
* @group DBAL-1824
* @dataProvider getPostConnectWithSessionParameterValuesData
*/
public function testPostConnectQuotesSessionParameterValues(string $name, string $value): void
......
......@@ -8,9 +8,6 @@ use Doctrine\DBAL\Event\Listeners\SQLSessionInit;
use Doctrine\DBAL\Events;
use Doctrine\Tests\DbalTestCase;
/**
* @group DBAL-169
*/
class SQLSessionInitTest extends DbalTestCase
{
public function testPostConnect(): void
......
......@@ -14,9 +14,6 @@ use function fopen;
use function str_repeat;
use function stream_get_contents;
/**
* @group DBAL-6
*/
class BlobTest extends DbalFunctionalTestCase
{
protected function setUp(): void
......@@ -31,8 +28,8 @@ class BlobTest extends DbalFunctionalTestCase
$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 @@ class BlobTest extends DbalFunctionalTestCase
{
$ret = $this->connection->insert('blob_table', [
'id' => 1,
'clobfield' => 'test',
'blobfield' => 'test',
'clobcolumn' => 'test',
'blobcolumn' => 'test',
], [
ParameterType::INTEGER,
ParameterType::STRING,
......@@ -64,8 +61,8 @@ class BlobTest extends DbalFunctionalTestCase
$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 @@ class BlobTest extends DbalFunctionalTestCase
{
$this->connection->insert('blob_table', [
'id' => 1,
'clobfield' => 'test',
'blobfield' => 'test',
'clobcolumn' => 'test',
'blobcolumn' => 'test',
], [
ParameterType::INTEGER,
ParameterType::STRING,
......@@ -94,15 +91,15 @@ class BlobTest extends DbalFunctionalTestCase
{
$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 @@ class BlobTest extends DbalFunctionalTestCase
$this->connection->insert('blob_table', [
'id' => 1,
'clobfield' => 'ignored',
'blobfield' => 'test',
'clobcolumn' => 'ignored',
'blobcolumn' => 'test',
], [
ParameterType::INTEGER,
ParameterType::STRING,
......@@ -129,7 +126,7 @@ class BlobTest extends DbalFunctionalTestCase
$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 @@ class BlobTest extends DbalFunctionalTestCase
$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 @@ class BlobTest extends DbalFunctionalTestCase
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);
......
......@@ -314,9 +314,6 @@ class ConnectionTest extends DbalFunctionalTestCase
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 @@ class ConnectionTest extends DbalFunctionalTestCase
$connection->close();
}
/**
* @group DBAL-990
*/
public function testDeterminesDatabasePlatformWhenConnectingToNonExistentDatabase(): void
{
if (in_array($this->connection->getDatabasePlatform()->getName(), ['oracle', 'db2'], true)) {
......
......@@ -112,9 +112,6 @@ class DataAccessTest extends DbalFunctionalTestCase
self::assertEquals(['test_int' => 1, 'test_string' => 'foo'], $rows[0]);
}
/**
* @group DBAL-228
*/
public function testPrepareWithFetchAllBoth(): void
{
$paramInt = 1;
......@@ -218,9 +215,6 @@ class DataAccessTest extends DbalFunctionalTestCase
self::assertEquals('foo', $row['test_string']);
}
/**
* @group DBAL-209
*/
public function testFetchAllWithTypes(): void
{
$datetimeString = '2010-01-01 10:10:10';
......@@ -243,9 +237,6 @@ class DataAccessTest extends DbalFunctionalTestCase
self::assertStringStartsWith($datetimeString, $row['test_datetime']);
}
/**
* @group DBAL-209
*/
public function testFetchAllWithMissingTypes(): void
{
if (
......@@ -433,9 +424,6 @@ class DataAccessTest extends DbalFunctionalTestCase
$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 @@ class DataAccessTest extends DbalFunctionalTestCase
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 @@ class DataAccessTest extends DbalFunctionalTestCase
)->fetchColumn());
}
/**
* @group DDC-697
*/
public function testPrepareQueryBindValueDateTimeType(): void
{
$sql = 'SELECT count(*) AS c FROM fetch_table WHERE test_datetime = ?';
......@@ -487,9 +469,6 @@ class DataAccessTest extends DbalFunctionalTestCase
self::assertEquals(1, $stmt->fetchColumn());
}
/**
* @group DBAL-78
*/
public function testNativeArrayListSupport(): void
{
for ($i = 100; $i < 110; $i++) {
......@@ -579,9 +558,6 @@ class DataAccessTest extends DbalFunctionalTestCase
];
}
/**
* @group DDC-1014
*/
public function testDateArithmetics(): void
{
$p = $this->connection->getDatabasePlatform();
......@@ -690,9 +666,6 @@ class DataAccessTest extends DbalFunctionalTestCase
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 @@ class DataAccessTest extends DbalFunctionalTestCase
}), 'should be no non-numerical elements in the result.');
}
/**
* @group DBAL-1091
*/
public function testFetchAllStyleObject(): void
{
$this->setupFixture();
......@@ -783,9 +753,6 @@ class DataAccessTest extends DbalFunctionalTestCase
);
}
/**
* @group DBAL-196
*/
public function testFetchAllSupportFetchClass(): void
{
$this->beforeFetchClassTest();
......@@ -808,9 +775,6 @@ class DataAccessTest extends DbalFunctionalTestCase
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 @@ class DataAccessTest extends DbalFunctionalTestCase
self::assertEquals([1, 10], $rows);
}
/**
* @group DBAL-214
*/
public function testSetFetchModeClassFetchAll(): void
{
$this->beforeFetchClassTest();
......@@ -847,9 +808,6 @@ class DataAccessTest extends DbalFunctionalTestCase
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 @@ class DataAccessTest extends DbalFunctionalTestCase
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 @@ class DataAccessTest extends DbalFunctionalTestCase
$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 @@ class DataAccessTest extends DbalFunctionalTestCase
self::assertFalse($stmt->fetch());
}
/**
* @group DBAL-435
*/
public function testEmptyParameters(): void
{
$sql = 'SELECT * FROM fetch_table WHERE test_int IN (?)';
......@@ -912,9 +861,6 @@ class DataAccessTest extends DbalFunctionalTestCase
self::assertEquals([], $rows);
}
/**
* @group DBAL-1028
*/
public function testFetchColumnNullValue(): void
{
$this->connection->executeUpdate(
......@@ -927,9 +873,6 @@ class DataAccessTest extends DbalFunctionalTestCase
);
}
/**
* @group DBAL-1028
*/
public function testFetchColumnNoResult(): void
{
self::assertFalse(
......
......@@ -23,9 +23,6 @@ abstract class AbstractDriverTest extends DbalFunctionalTestCase
$this->driver = $this->createDriver();
}
/**
* @group DBAL-1215
*/
public function testConnectsWithoutDatabaseNameParameter(): void
{
$params = $this->connection->getParams();
......@@ -39,9 +36,6 @@ abstract class AbstractDriverTest extends DbalFunctionalTestCase
self::assertInstanceOf(DriverConnection::class, $connection);
}
/**
* @group DBAL-1215
*/
public function testReturnsDatabaseNameWithoutDatabaseNameParameter(): void
{
$params = $this->connection->getParams();
......
......@@ -26,9 +26,6 @@ class OCI8ConnectionTest extends DbalFunctionalTestCase
$this->driverConnection = $this->connection->getWrappedConnection();
}
/**
* @group DBAL-2595
*/
public function testLastInsertIdAcceptsFqn(): void
{
$platform = $this->connection->getDatabasePlatform();
......
......@@ -57,9 +57,6 @@ class PDOConnectionTest extends DbalFunctionalTestCase
new PDOConnection('foo');
}
/**
* @group DBAL-1022
*/
public function testThrowsWrappedExceptionOnExec(): void
{
$this->expectException(PDOException::class);
......
......@@ -68,9 +68,6 @@ class DriverTest extends AbstractDriverTest
];
}
/**
* @group DBAL-1146
*/
public function testConnectsWithApplicationNameParameter(): void
{
$parameters = $this->connection->getParams();
......
......@@ -24,8 +24,6 @@ class PDOPgsqlConnectionTest extends DbalFunctionalTestCase
}
/**
* @group DBAL-1183
* @group DBAL-1189
* @dataProvider getValidCharsets
*/
public function testConnectsWithValidCharsetOption(string $charset): void
......
......@@ -236,7 +236,7 @@ class ExceptionTest extends DbalFunctionalTestCase
{
$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 @@ class ExceptionTest extends DbalFunctionalTestCase
}
$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 @@ class ExceptionTest extends DbalFunctionalTestCase
{
$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 @@ class ExceptionTest extends DbalFunctionalTestCase
$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
......
......@@ -17,9 +17,6 @@ use function substr;
use const CASE_LOWER;
/**
* @group DBAL-20
*/
class MasterSlaveConnectionTest extends DbalFunctionalTestCase
{
protected function setUp(): void
......@@ -138,9 +135,6 @@ class MasterSlaveConnectionTest extends DbalFunctionalTestCase
self::assertTrue($conn->isConnectedToMaster());
}
/**
* @group DBAL-335
*/
public function testKeepSlaveBeginTransactionStaysOnMaster(): void
{
$conn = $this->createMasterSlaveConnection($keepSlave = true);
......@@ -159,9 +153,6 @@ class MasterSlaveConnectionTest extends DbalFunctionalTestCase
self::assertFalse($conn->isConnectedToMaster());
}
/**
* @group DBAL-335
*/
public function testKeepSlaveInsertStaysOnMaster(): void
{
$conn = $this->createMasterSlaveConnection($keepSlave = true);
......
......@@ -13,9 +13,6 @@ use function array_change_key_case;
use const CASE_LOWER;
/**
* @group DDC-1372
*/
class NamedParametersTest extends DbalFunctionalTestCase
{
/**
......
......@@ -26,10 +26,6 @@ class PDOStatementTest extends DbalFunctionalTestCase
$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', [
......
......@@ -13,9 +13,6 @@ use Throwable;
use function strlen;
/**
* @group DBAL-56
*/
class PortabilityTest extends DbalFunctionalTestCase
{
/** @var Connection */
......@@ -141,13 +138,12 @@ class PortabilityTest extends DbalFunctionalTestCase
*
* @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));
}
/**
......
......@@ -18,9 +18,6 @@ use function is_array;
use const CASE_LOWER;
/**
* @group DDC-217
*/
class ResultCacheTest extends DbalFunctionalTestCase
{
/** @var list<array{test_int: int, test_string: string}> */
......
......@@ -7,9 +7,6 @@ use Doctrine\DBAL\Types\BooleanType;
class Db2SchemaManagerTest extends SchemaManagerFunctionalTestCase
{
/**
* @group DBAL-939
*/
public function testGetBooleanColumn(): void
{
$table = new Table('boolean_column_test');
......
......@@ -120,9 +120,6 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
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 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertTrue($table->hasPrimaryKey());
}
/**
* @group DBAL-464
*/
public function testDropPrimaryKeyWithAutoincrementColumn(): void
{
$table = new Table('drop_primary_key');
......@@ -172,9 +166,6 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertFalse($table->getColumn('id')->getAutoincrement());
}
/**
* @group DBAL-789
*/
public function testDoesNotPropagateDefaultValuesForUnsupportedColumnTypes(): void
{
if ($this->schemaManager->getDatabasePlatform() instanceof MariaDb1027Platform) {
......@@ -288,9 +279,6 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertInstanceOf(BlobType::class, $columns['baz']->getType());
}
/**
* @group DBAL-843
*/
public function testListLobTypeColumns(): void
{
$tableName = 'lob_type_columns';
......@@ -347,9 +335,6 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
);
}
/**
* @group DBAL-423
*/
public function testDiffListGuidTableColumn(): void
{
$offlineTable = new Table('list_guid_table_column');
......@@ -367,9 +352,6 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
);
}
/**
* @group DBAL-1082
*/
public function testListDecimalTypeColumns(): void
{
$tableName = 'test_list_decimal_columns';
......@@ -388,9 +370,6 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertTrue($columns['col_unsigned']->getUnsigned());
}
/**
* @group DBAL-1082
*/
public function testListFloatTypeColumns(): void
{
$tableName = 'test_list_float_columns';
......
......@@ -67,10 +67,6 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
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 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertContains('c##test_create_database', $databases);
}
/**
* @group DBAL-831
*/
public function testListTableDetailsWithDifferentIdentifierQuotingRequirements(): void
{
$primaryTableName = '"Primary_Table"';
......@@ -240,9 +233,6 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertCount(7, $columns);
}
/**
* @group DBAL-1234
*/
public function testListTableIndexesPrimaryKeyConstraintNameDiffersFromIndexName(): void
{
$table = new Table('list_table_indexes_pk_id_test');
......@@ -263,9 +253,6 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertTrue($tableIndexes['primary']->isPrimary());
}
/**
* @group DBAL-2555
*/
public function testListTableDateTypeColumns(): void
{
$table = new Table('tbl_date');
......
......@@ -36,9 +36,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
$this->connection->getConfiguration()->setSchemaAssetsFilter(null);
}
/**
* @group DBAL-177
*/
public function testGetSearchPath(): void
{
$params = $this->connection->getParams();
......@@ -47,9 +44,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertEquals([$params['user'], 'public'], $paths);
}
/**
* @group DBAL-244
*/
public function testGetSchemaNames(): void
{
$names = $this->schemaManager->getSchemaNames();
......@@ -59,9 +53,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
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 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertInstanceOf(MoneyType::class, $table->getColumn('value')->getType());
}
/**
* @group DBAL-37
*/
public function testDetectsAutoIncrement(): void
{
$autoincTable = new Table('autoinc_table');
......@@ -94,9 +82,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertTrue($autoincTable->getColumn('id')->getAutoincrement());
}
/**
* @group DBAL-37
*/
public function testAlterTableAutoIncrementAdd(): void
{
$tableFrom = new Table('autoinc_table_add');
......@@ -123,9 +108,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertTrue($tableFinal->getColumn('id')->getAutoincrement());
}
/**
* @group DBAL-37
*/
public function testAlterTableAutoIncrementDrop(): void
{
$tableFrom = new Table('autoinc_table_drop');
......@@ -148,9 +130,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertFalse($tableFinal->getColumn('id')->getAutoincrement());
}
/**
* @group DBAL-75
*/
public function testTableWithSchema(): void
{
$this->connection->exec('CREATE SCHEMA nested');
......@@ -182,10 +161,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
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 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
);
}
/**
* @group DBAL-204
*/
public function testFilterSchemaExpression(): void
{
$testTable = new Table('dbal204_test_prefix');
......@@ -267,9 +239,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
}
}
/**
* @group DBAL-511
*/
public function testDefaultValueCharacterVarying(): void
{
$testTable = new Table('dbal511_default');
......@@ -284,9 +253,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertEquals('foo', $databaseTable->getColumn('def')->getDefault());
}
/**
* @group DDC-2843
*/
public function testBooleanDefault(): void
{
$table = new Table('ddc2843_bools');
......@@ -380,9 +346,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
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 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
];
}
/**
* @group DBAL-2427
*/
public function testListNegativeColumnDefaultValue(): void
{
$table = new Schema\Table('test_default_negative');
......@@ -473,7 +433,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
/**
* @dataProvider serialTypes
* @group 2906
*/
public function testAutoIncrementCreatesSerialDataTypesWithoutADefaultValue(string $type): void
{
......@@ -491,7 +450,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
/**
* @dataProvider serialTypes
* @group 2906
*/
public function testAutoIncrementCreatesSerialDataTypesWithoutADefaultValueEvenWhenDefaultIsSet(string $type): void
{
......@@ -508,7 +466,6 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
}
/**
* @group 2916
* @dataProvider autoIncrementTypeMigrations
*/
public function testAlterTableAutoIncrementIntToBigInt(string $from, string $to, string $expected): void
......@@ -559,7 +516,7 @@ class MoneyType extends Type
/**
* {@inheritDoc}
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $column, AbstractPlatform $platform)
{
return 'MyMoney';
}
......
......@@ -17,9 +17,6 @@ class SQLServerSchemaManagerTest extends SchemaManagerFunctionalTestCase
return 'mssql';
}
/**
* @group DBAL-255
*/
public function testDropColumnConstraints(): void
{
$table = new Table('sqlsrv_drop_column');
......@@ -155,9 +152,6 @@ class SQLServerSchemaManagerTest extends SchemaManagerFunctionalTestCase
self::assertEquals(666, $columns['df_integer']->getDefault());
}
/**
* @group DBAL-543
*/
public function testColumnComments(): void
{
$table = new Table('sqlsrv_column_comment');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment