From 5b40847b754dee287fb436fad5b8c750db2cbeea Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Mon, 17 Oct 2022 11:40:57 -0700 Subject: [PATCH 1/3] Remove obsolete Psalm error suppressions --- psalm.xml.dist | 8 -------- 1 file changed, 8 deletions(-) diff --git a/psalm.xml.dist b/psalm.xml.dist index 50183797bac..cc3a754023f 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -45,14 +45,6 @@ - - - - - - - - diff --git a/src/Schema/Table.php b/src/Schema/Table.php index be61fbb6ff6..cc7f04d2c49 100644 --- a/src/Schema/Table.php +++ b/src/Schema/Table.php @@ -13,7 +13,6 @@ use Doctrine\DBAL\Schema\Exception\InvalidTableName; use Doctrine\DBAL\Schema\Exception\UniqueConstraintDoesNotExist; use Doctrine\DBAL\Types\Type; -use Doctrine\Deprecations\Deprecation; use function array_merge; use function array_values; @@ -266,25 +265,6 @@ public function addColumn(string $name, string $typeName, array $options = []): return $column; } - /** - * Change Column Details. - * - * @deprecated Use {@link modifyColumn()} instead. - * - * @param array $options - */ - public function changeColumn(string $name, array $options): self - { - Deprecation::trigger( - 'doctrine/dbal', - 'https://github.com/doctrine/dbal/pull/5747', - '%s is deprecated. Use modifyColumn() instead.', - __METHOD__, - ); - - return $this->modifyColumn($name, $options); - } - /** @param array $options */ public function modifyColumn(string $name, array $options): self { diff --git a/tests/Functional/Schema/OracleSchemaManagerTest.php b/tests/Functional/Schema/OracleSchemaManagerTest.php index 6bb401c38ce..098f5ce2e5f 100644 --- a/tests/Functional/Schema/OracleSchemaManagerTest.php +++ b/tests/Functional/Schema/OracleSchemaManagerTest.php @@ -54,8 +54,8 @@ public function testAlterTableColumnNotNull(): void self::assertTrue($columns['bar']->getNotnull()); $diffTable = clone $table; - $diffTable->changeColumn('foo', ['notnull' => false]); - $diffTable->changeColumn('bar', ['length' => 1024]); + $diffTable->modifyColumn('foo', ['notnull' => false]); + $diffTable->modifyColumn('bar', ['length' => 1024]); $diff = $this->schemaManager->createComparator() ->diffTable($table, $diffTable); diff --git a/tests/Functional/Schema/SchemaManagerFunctionalTestCase.php b/tests/Functional/Schema/SchemaManagerFunctionalTestCase.php index 9f126f92586..b1155ace5ab 100644 --- a/tests/Functional/Schema/SchemaManagerFunctionalTestCase.php +++ b/tests/Functional/Schema/SchemaManagerFunctionalTestCase.php @@ -1000,10 +1000,10 @@ public function testColumnDefaultLifecycle(): void $newTable = clone $oldTable; - $newTable->changeColumn('column1', ['default' => '']); - $newTable->changeColumn('column2', ['default' => null]); - $newTable->changeColumn('column3', ['default' => 'default2']); - $newTable->changeColumn('column4', ['default' => null]); + $newTable->modifyColumn('column1', ['default' => '']); + $newTable->modifyColumn('column2', ['default' => null]); + $newTable->modifyColumn('column3', ['default' => 'default2']); + $newTable->modifyColumn('column4', ['default' => null]); $diff = $this->schemaManager->createComparator() ->diffTable( diff --git a/tests/Platforms/AbstractMySQLPlatformTestCase.php b/tests/Platforms/AbstractMySQLPlatformTestCase.php index 7d05698eb90..563f71a0467 100644 --- a/tests/Platforms/AbstractMySQLPlatformTestCase.php +++ b/tests/Platforms/AbstractMySQLPlatformTestCase.php @@ -538,10 +538,10 @@ public function testIgnoresDifferenceInDefaultValuesForUnsupportedColumnTypes(): ); $diffTable = clone $table; - $diffTable->changeColumn('def_text', ['default' => null]); - $diffTable->changeColumn('def_text_null', ['default' => null]); - $diffTable->changeColumn('def_blob', ['default' => null]); - $diffTable->changeColumn('def_blob_null', ['default' => null]); + $diffTable->modifyColumn('def_text', ['default' => null]); + $diffTable->modifyColumn('def_text_null', ['default' => null]); + $diffTable->modifyColumn('def_blob', ['default' => null]); + $diffTable->modifyColumn('def_blob_null', ['default' => null]); self::assertNull($this->createComparator()->diffTable($table, $diffTable)); }