From 373c243c2e26a6ced8b120640507e96261e49e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=BCrth?= Date: Fri, 25 Aug 2023 18:07:49 +0200 Subject: [PATCH] Always return string from ChecksumTestFixture::_hash In PHP 8.2, this lead to ``TypeError : FriendsOfCake\Fixturize\TestSuite\Fixture\ChecksumTestFixture::_hash(): Return value must be of type string, int returned`` when using MySQL as database source. --- src/TestSuite/Fixture/ChecksumTestFixture.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TestSuite/Fixture/ChecksumTestFixture.php b/src/TestSuite/Fixture/ChecksumTestFixture.php index d26f0d8..47a05e7 100644 --- a/src/TestSuite/Fixture/ChecksumTestFixture.php +++ b/src/TestSuite/Fixture/ChecksumTestFixture.php @@ -114,11 +114,11 @@ protected function _hash(ConnectionInterface $db): string if ($driver instanceof Mysql) { $sth = $db->execute('CHECKSUM TABLE `' . $this->table . '`'); - return $sth->fetchColumn(1); + return (string)$sth->fetchColumn(1); } // Have no better idea right now to make it always regenerate the tables - return microtime(); + return microtime(false); } /**