From 43371bcf981edb7995c52b825804999e537f0763 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Wed, 30 Apr 2025 13:36:00 +0300 Subject: [PATCH] Rename `getLastInsertID()` method in `ConnectionInterface` to `getLastInsertId()` --- src/Command.php | 2 +- tests/PdoConnectionTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Command.php b/src/Command.php index 5b6571f7..152c5554 100644 --- a/src/Command.php +++ b/src/Command.php @@ -37,7 +37,7 @@ public function insertWithReturningPks(string $table, array $columns): array|fal $result = []; foreach ($tablePrimaryKeys as $name) { if ($tableSchema?->getColumn($name)?->isAutoIncrement()) { - $result[$name] = $this->db->getLastInsertID((string) $tableSchema?->getSequenceName()); + $result[$name] = $this->db->getLastInsertId((string) $tableSchema?->getSequenceName()); continue; } diff --git a/tests/PdoConnectionTest.php b/tests/PdoConnectionTest.php index d4c849a7..e646a5be 100644 --- a/tests/PdoConnectionTest.php +++ b/tests/PdoConnectionTest.php @@ -89,7 +89,7 @@ public function testGetLastInsertID(): void ] )->execute(); - $this->assertSame('4', $db->getLastInsertID()); + $this->assertSame('4', $db->getLastInsertId()); $db->close(); }