Skip to content

Commit

Permalink
php 8.1 support
Browse files Browse the repository at this point in the history
  • Loading branch information
srjlewis committed Oct 28, 2021
1 parent 1ea6b17 commit 3669624
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions tests/ExtendedPdoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ public function testQueryWithFetchMode()
];
}
$this->assertEquals($expect, $actual);

}

public function testPrepareWithValues()
Expand Down Expand Up @@ -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);
}

Expand All @@ -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);
}
Expand Down

0 comments on commit 3669624

Please sign in to comment.