diff --git a/composer.json b/composer.json index 5fadfe8..54389b3 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ } ], "require": { - "php": ">=8.0", + "php": ">=8.1", "psr/log": "^1.0 || ^2.0", "ext-pdo": "*" }, diff --git a/tests/ExtendedPdoTest.php b/tests/ExtendedPdoTest.php index 497e9cf..c04a43b 100644 --- a/tests/ExtendedPdoTest.php +++ b/tests/ExtendedPdoTest.php @@ -298,14 +298,7 @@ public function testFetchObject() $stm = "SELECT id, name FROM pdotest WHERE id = ?"; $actual = $this->pdo->fetchObject($stm, [1]); - // in php <= 8 id is a string, in php >= 8.1 it is a int - // https://github.com/php/php-src/blob/PHP-8.1/UPGRADING#L131 - if (PHP_MINOR_VERSION > 0) { - $this->assertSame(1, $actual->id); - } else { - $this->assertSame('1', $actual->id); - } - + $this->assertSame(1, $actual->id); $this->assertSame('Anna', $actual->name); } @@ -318,13 +311,8 @@ public function testFetchObject_withCtorArgs() 'Aura\Sql\FakeObject', ['bar'] ); - // in php <= 8 id is a string, in php >= 8.1 it is a int - // https://github.com/php/php-src/blob/PHP-8.1/UPGRADING#L131 - if (PHP_MINOR_VERSION > 0) { - $this->assertSame(1, $actual->id); - } else { - $this->assertSame('1', $actual->id); - } + + $this->assertSame(1, $actual->id); $this->assertSame('Anna', $actual->name); $this->assertSame('bar', $actual->foo); }