Skip to content

Commit bc9b4a7

Browse files
committed
remove all invalid override attributes
1 parent 57fcde6 commit bc9b4a7

File tree

7 files changed

+83
-28
lines changed

7 files changed

+83
-28
lines changed

src/Persistence/Sql/DbalDriverMiddleware.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,19 @@ public function getDatabasePlatform(): AbstractPlatform
5555
return $this->replaceDatabasePlatform(parent::getDatabasePlatform());
5656
}
5757

58-
#[\Override]
58+
/**
59+
* @deprecated remove once DBAL 3.x support is dropped
60+
*/
5961
public function createDatabasePlatformForVersion($version): AbstractPlatform
6062
{
6163
return $this->replaceDatabasePlatform(parent::createDatabasePlatformForVersion($version));
6264
}
6365

6466
/**
6567
* @return AbstractSchemaManager<AbstractPlatform>
68+
*
69+
* @deprecated remove once DBAL 3.x support is dropped
6670
*/
67-
#[\Override]
6871
public function getSchemaManager(DbalConnection $connection, AbstractPlatform $platform): AbstractSchemaManager
6972
{
7073
if ($platform instanceof SQLitePlatform) {

src/Persistence/Sql/Mssql/PlatformTrait.php

+33-11
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
trait PlatformTrait
1111
{
12-
#[\Override]
12+
/**
13+
* @deprecated remove once DBAL 3.x support is dropped
14+
*/
1315
public function getVarcharTypeDeclarationSQL(array $column)
1416
{
1517
$column['length'] = ($column['length'] ?? 255) * 4;
@@ -19,7 +21,9 @@ public function getVarcharTypeDeclarationSQL(array $column)
1921

2022
// remove once https://github.com/doctrine/dbal/pull/4987 is fixed
2123
// and also $this->markDoctrineTypeCommented('text') below
22-
#[\Override]
24+
/**
25+
* @deprecated remove once DBAL 3.x support is dropped
26+
*/
2327
public function getClobTypeDeclarationSQL(array $column)
2428
{
2529
$res = parent::getClobTypeDeclarationSQL($column);
@@ -36,7 +40,9 @@ public function getClobTypeDeclarationSQL(array $column)
3640
$this->markDoctrineTypeCommented('text');
3741
} */
3842

39-
#[\Override]
43+
/**
44+
* @deprecated remove once DBAL 3.x support is dropped
45+
*/
4046
public function getCurrentDatabaseExpression(bool $includeSchema = false): string
4147
{
4248
if ($includeSchema) {
@@ -46,7 +52,9 @@ public function getCurrentDatabaseExpression(bool $includeSchema = false): strin
4652
return parent::getCurrentDatabaseExpression();
4753
}
4854

49-
#[\Override]
55+
/**
56+
* @deprecated remove once DBAL 3.x support is dropped
57+
*/
5058
public function getCreateIndexSQL(Index $index, $table)
5159
{
5260
// workaround https://github.com/doctrine/dbal/issues/5507
@@ -62,7 +70,9 @@ public function getCreateIndexSQL(Index $index, $table)
6270
// SQL Server DBAL platform has buggy identifier escaping, fix until fixed officially, see:
6371
// https://github.com/doctrine/dbal/pull/4360
6472

65-
#[\Override]
73+
/**
74+
* @deprecated remove once DBAL 3.x support is dropped
75+
*/
6676
protected function getCreateColumnCommentSQL($tableName, $columnName, $comment)
6777
{
6878
if (str_contains($tableName, '.')) {
@@ -83,7 +93,9 @@ protected function getCreateColumnCommentSQL($tableName, $columnName, $comment)
8393
);
8494
}
8595

86-
#[\Override]
96+
/**
97+
* @deprecated remove once DBAL 3.x support is dropped
98+
*/
8799
protected function getAlterColumnCommentSQL($tableName, $columnName, $comment)
88100
{
89101
if (str_contains($tableName, '.')) {
@@ -104,7 +116,9 @@ protected function getAlterColumnCommentSQL($tableName, $columnName, $comment)
104116
);
105117
}
106118

107-
#[\Override]
119+
/**
120+
* @deprecated remove once DBAL 3.x support is dropped
121+
*/
108122
protected function getDropColumnCommentSQL($tableName, $columnName)
109123
{
110124
if (str_contains($tableName, '.')) {
@@ -129,7 +143,9 @@ private function quoteSingleIdentifierAsStringLiteral(string $levelName): string
129143
return $this->quoteStringLiteral(preg_replace('~^\[|\]$~', '', $levelName));
130144
}
131145

132-
#[\Override]
146+
/**
147+
* @deprecated remove once DBAL 3.x support is dropped
148+
*/
133149
public function getAddExtendedPropertySQL(
134150
$name,
135151
$value = null,
@@ -154,7 +170,9 @@ public function getAddExtendedPropertySQL(
154170
);
155171
}
156172

157-
#[\Override]
173+
/**
174+
* @deprecated remove once DBAL 3.x support is dropped
175+
*/
158176
public function getDropExtendedPropertySQL(
159177
$name,
160178
$level0Type = null,
@@ -178,7 +196,9 @@ public function getDropExtendedPropertySQL(
178196
);
179197
}
180198

181-
#[\Override]
199+
/**
200+
* @deprecated remove once DBAL 3.x support is dropped
201+
*/
182202
public function getUpdateExtendedPropertySQL(
183203
$name,
184204
$value = null,
@@ -203,7 +223,9 @@ public function getUpdateExtendedPropertySQL(
203223
);
204224
}
205225

206-
#[\Override]
226+
/**
227+
* @deprecated remove once DBAL 3.x support is dropped
228+
*/
207229
protected function getCommentOnTableSQL(string $tableName, ?string $comment): string
208230
{
209231
if (str_contains($tableName, '.')) {

src/Persistence/Sql/Oracle/PlatformTrait.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313

1414
trait PlatformTrait
1515
{
16-
#[\Override]
16+
/**
17+
* @deprecated remove once DBAL 3.x support is dropped
18+
*/
1719
public function getVarcharTypeDeclarationSQL(array $column)
1820
{
1921
$column['length'] = ($column['length'] ?? 255) * 4;

src/Persistence/Sql/Postgresql/PlatformTrait.php

+18-6
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,25 @@ private function getCreateCaseInsensitiveDomainsSql(): array
3434
return $sqls;
3535
}
3636

37-
#[\Override]
37+
/**
38+
* @deprecated remove once DBAL 3.x support is dropped
39+
*/
3840
protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
3941
{
4042
return $fixed ? 'ATK4__CICHAR' : 'ATK4__CIVARCHAR';
4143
}
4244

43-
#[\Override]
45+
/**
46+
* @deprecated remove once DBAL 3.x support is dropped
47+
*/
4448
public function getClobTypeDeclarationSQL(array $column)
4549
{
4650
return 'CITEXT';
4751
}
4852

49-
#[\Override]
53+
/**
54+
* @deprecated remove once DBAL 3.x support is dropped
55+
*/
5056
protected function initializeDoctrineTypeMappings(): void
5157
{
5258
parent::initializeDoctrineTypeMappings();
@@ -55,7 +61,9 @@ protected function initializeDoctrineTypeMappings(): void
5561
$this->doctrineTypeMapping['citext'] = 'text';
5662
}
5763

58-
#[\Override]
64+
/**
65+
* @deprecated remove once DBAL 3.x support is dropped
66+
*/
5967
public function getCurrentDatabaseExpression(bool $includeSchema = false): string
6068
{
6169
if ($includeSchema) {
@@ -65,7 +73,9 @@ public function getCurrentDatabaseExpression(bool $includeSchema = false): strin
6573
return parent::getCurrentDatabaseExpression();
6674
}
6775

68-
#[\Override]
76+
/**
77+
* @deprecated remove once DBAL 3.x support is dropped
78+
*/
6979
public function convertBooleansToDatabaseValue($item)
7080
{
7181
return $item;
@@ -139,7 +149,9 @@ protected function getCreateAutoincrementSql(Table $table, Column $pkColumn): ar
139149
return $sqls;
140150
}
141151

142-
#[\Override]
152+
/**
153+
* @deprecated remove once DBAL 3.x support is dropped
154+
*/
143155
public function getCreateTableSQL(Table $table, $createFlags = self::CREATE_INDEXES)
144156
{
145157
$sqls = array_merge(

src/Persistence/Sql/Sqlite/PlatformTrait.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
trait PlatformTrait
1111
{
12-
#[\Override]
12+
/**
13+
* @deprecated remove once DBAL 3.x support is dropped
14+
*/
1315
public function getIdentifierQuoteCharacter(): string
1416
{
1517
return '`';

src/Persistence/Sql/Sqlite/SchemaManagerTrait.php

+15-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
trait SchemaManagerTrait
1313
{
14-
#[\Override]
14+
/**
15+
* @deprecated remove once DBAL 3.x support is dropped
16+
*/
1517
public function alterTable(TableDiff $tableDiff): void
1618
{
1719
$hadForeignKeysEnabled = (bool) $this->_conn->executeQuery('PRAGMA foreign_keys')->fetchOne();
@@ -34,7 +36,9 @@ public function alterTable(TableDiff $tableDiff): void
3436
// fix collations unescape for SqliteSchemaManager::parseColumnCollationFromSQL() method
3537
// https://github.com/doctrine/dbal/issues/6129
3638

37-
#[\Override]
39+
/**
40+
* @deprecated remove once DBAL 3.x support is dropped
41+
*/
3842
protected function _getPortableTableColumnList($table, $database, $tableColumns)
3943
{
4044
$res = parent::_getPortableTableColumnList($table, $database, $tableColumns);
@@ -56,19 +60,25 @@ private function unquoteTableIdentifier(string $tableName): string
5660
return (new Identifier($tableName))->getName();
5761
}
5862

59-
#[\Override]
63+
/**
64+
* @deprecated remove once DBAL 3.x support is dropped
65+
*/
6066
public function listTableDetails($name): Table
6167
{
6268
return parent::listTableDetails($this->unquoteTableIdentifier($name));
6369
}
6470

65-
#[\Override]
71+
/**
72+
* @deprecated remove once DBAL 3.x support is dropped
73+
*/
6674
public function listTableIndexes($table): array
6775
{
6876
return parent::listTableIndexes($this->unquoteTableIdentifier($table));
6977
}
7078

71-
#[\Override]
79+
/**
80+
* @deprecated remove once DBAL 3.x support is dropped
81+
*/
7282
public function listTableForeignKeys($table, $database = null): array
7383
{
7484
return parent::listTableForeignKeys($this->unquoteTableIdentifier($table), $database);

src/Schema/TestSqlPersistence.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ public function getConnection(): Persistence\Sql\Connection
3434
$this->getConnection()->getConnection()->getConfiguration()->setSQLLogger(
3535
// @phpstan-ignore-next-line SQLLogger is deprecated
3636
new class() implements SQLLogger {
37-
#[\Override]
37+
/**
38+
* @deprecated remove once DBAL 3.x support is dropped
39+
*/
3840
public function startQuery($sql, array $params = null, array $types = null): void
3941
{
4042
// log transaction savepoint operations only once
@@ -52,7 +54,9 @@ public function startQuery($sql, array $params = null, array $types = null): voi
5254
\Closure::bind(static fn () => $test->logQuery($sql, $params ?? [], $types ?? []), null, TestCase::class)(); // @phpstan-ignore-line
5355
}
5456

55-
#[\Override]
57+
/**
58+
* @deprecated remove once DBAL 3.x support is dropped
59+
*/
5660
public function stopQuery(): void {}
5761
}
5862
);

0 commit comments

Comments
 (0)