From f7ecbcbaa1a796abb4f85eb15ec6b98c959fac52 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Mon, 6 May 2024 18:44:28 +0700 Subject: [PATCH 1/3] Remove AbstractDMLQueryBuilder::getTypecastValue() method --- src/QueryBuilder/AbstractDMLQueryBuilder.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/QueryBuilder/AbstractDMLQueryBuilder.php b/src/QueryBuilder/AbstractDMLQueryBuilder.php index c877b8650..0817b46e4 100644 --- a/src/QueryBuilder/AbstractDMLQueryBuilder.php +++ b/src/QueryBuilder/AbstractDMLQueryBuilder.php @@ -511,20 +511,6 @@ static function (Constraint $constraint) use ($quoter, $columns, &$columnNames): return array_unique($columnNames); } - /** - * @return mixed The typecast value of the given column. - * - * @deprecated will be removed in version 2.0.0 - */ - protected function getTypecastValue(mixed $value, ColumnSchemaInterface $columnSchema = null): mixed - { - if ($columnSchema) { - return $columnSchema->dbTypecast($value); - } - - return $value; - } - /** * Normalizes the column names. * From 25ae374edf76f9f434a88777f9515c837a2b598a Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Mon, 6 May 2024 11:44:54 +0000 Subject: [PATCH 2/3] Apply fixes from StyleCI --- src/QueryBuilder/AbstractDMLQueryBuilder.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/QueryBuilder/AbstractDMLQueryBuilder.php b/src/QueryBuilder/AbstractDMLQueryBuilder.php index 0817b46e4..1ae0ef083 100644 --- a/src/QueryBuilder/AbstractDMLQueryBuilder.php +++ b/src/QueryBuilder/AbstractDMLQueryBuilder.php @@ -16,7 +16,6 @@ use Yiisoft\Db\Exception\NotSupportedException; use Yiisoft\Db\Expression\ExpressionInterface; use Yiisoft\Db\Query\QueryInterface; -use Yiisoft\Db\Schema\ColumnSchemaInterface; use Yiisoft\Db\Schema\QuoterInterface; use Yiisoft\Db\Schema\SchemaInterface; From cd47eafa75fa5331aa2a19627a150ccfce8fe8e7 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Mon, 6 May 2024 18:51:05 +0700 Subject: [PATCH 3/3] Add line to CHANGELOG.md, update UPGRADE.md [skip ci] --- CHANGELOG.md | 1 + UPGRADE.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a058bb0f..c86a07cb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Enh #829: Rename `batchInsert()` to `insertBatch()` in `DMLQueryBuilderInterface` and `CommandInterface` and change parameters from `$table, $columns, $rows` to `$table, $rows, $columns = []` (@Tigrov) - Enh #834: Refactor `AbstractCommand::insertBatch()`, add `Quoter::getRawTableName()` to `QuoterInterface` (@Tigrov) +- Chg #836: Remove `AbstractDMLQueryBuilder::getTypecastValue()` method (@Tigrov) ## 1.3.0 March 21, 2024 diff --git a/UPGRADE.md b/UPGRADE.md index 00ed580ab..e3ab80293 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -58,3 +58,7 @@ $db->createCommand()->insertBatch('user', $values)->execute(); ### New methods in `QuoterInterface` * `QuoterInterface::getRawTableName()` - returns the raw table name without quotes. + +### Remove deprecated methods + +- `AbstractDMLQueryBuilder::getTypecastValue()`