From 345cc94a997437521043d785deb02eadef7496b1 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Wed, 6 Dec 2023 16:25:06 +0700 Subject: [PATCH 1/3] Fix `QueryBuilderTest::testBatchInsert()` --- tests/QueryBuilderTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/QueryBuilderTest.php b/tests/QueryBuilderTest.php index 9086b4f..45dff5a 100644 --- a/tests/QueryBuilderTest.php +++ b/tests/QueryBuilderTest.php @@ -124,9 +124,14 @@ public function testAlterColumn(): void * @throws InvalidArgumentException * @throws NotSupportedException */ - public function testBatchInsert(string $table, array $columns, iterable $rows, string $expected): void - { - parent::testBatchInsert($table, $columns, $rows, $expected); + public function testBatchInsert( + string $table, + array $columns, + iterable $rows, + string $expected, + array $expectedParams = [], + ): void { + parent::testBatchInsert($table, $columns, $rows, $expected, $expectedParams); } /** From 099d260c037e1e07a705f43302cef2955a0e9404 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Wed, 6 Dec 2023 18:03:39 +0700 Subject: [PATCH 2/3] Fix `QueryBuilderTest::testBatchInsert()` --- tests/Provider/QueryBuilderProvider.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/Provider/QueryBuilderProvider.php b/tests/Provider/QueryBuilderProvider.php index bfcb696..9a38538 100644 --- a/tests/Provider/QueryBuilderProvider.php +++ b/tests/Provider/QueryBuilderProvider.php @@ -57,6 +57,13 @@ public static function batchInsert(): array DbHelper::changeSqlForOracleBatchInsert($batchInsert['bool-false, time-now()']['expected']); DbHelper::changeSqlForOracleBatchInsert($batchInsert['column table names are not checked']['expected']); + $batchInsert['bool-false, bool2-null']['expectedParams'][':qp0'] = '0'; + $batchInsert['bool-false, time-now()']['expectedParams'][':qp0'] = '0'; + $batchInsert['column table names are not checked']['expectedParams'] = [ + ':qp0' => '1', + ':qp1' => '0', + ]; + return $batchInsert; } From e459f1ef69fcc74bd0df8851c7bccc2a78347905 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Wed, 6 Dec 2023 19:00:45 +0700 Subject: [PATCH 3/3] Fix rector.php --- rector.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rector.php b/rector.php index 49844ff..7a9f3ac 100644 --- a/rector.php +++ b/rector.php @@ -4,7 +4,6 @@ use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\Config\RectorConfig; -use Rector\Php71\Rector\FuncCall\CountOnNullRector; use Rector\Php73\Rector\String_\SensitiveHereNowDocRector; use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; use Rector\Set\ValueObject\LevelSetList; @@ -26,8 +25,5 @@ $rectorConfig->skip([ ClosureToArrowFunctionRector::class, SensitiveHereNowDocRector::class, - CountOnNullRector::class => [ - 'src/Command.php', - ], ]); };