diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 315da067..a0178732 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0'] + php-versions: ['8.0', '8.1'] steps: - name: Download standard files uses: actions/checkout@v2 diff --git a/tests/ExtendedPdoTest.php b/tests/ExtendedPdoTest.php index c51a9a6e..2398467b 100644 --- a/tests/ExtendedPdoTest.php +++ b/tests/ExtendedPdoTest.php @@ -193,7 +193,6 @@ public function testQueryWithFetchMode() ]; } $this->assertEquals($expect, $actual); - } public function testPrepareWithValues() @@ -298,7 +297,9 @@ public function testFetchObject() { $stm = "SELECT id, name FROM pdotest WHERE id = ?"; $actual = $this->pdo->fetchObject($stm, [1]); - $this->assertSame(1, $actual->id); + + // in php <= 8 id is a string, in php >= 8.1 it is a int + $this->assertSame('1', (string)$actual->id); $this->assertSame('Anna', $actual->name); } @@ -311,7 +312,8 @@ public function testFetchObject_withCtorArgs() 'Aura\Sql\FakeObject', ['bar'] ); - $this->assertSame(1, $actual->id); + // in php <= 8 id is a string, in php >= 8.1 it is a int + $this->assertSame('1', (string)$actual->id); $this->assertSame('Anna', $actual->name); $this->assertSame('bar', $actual->foo); }