Skip to content

Commit

Permalink
revert to 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Werner Spiegel committed Feb 16, 2022
1 parent 7a27b3e commit e680203
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
],
"require": {
"php": ">=8.0",
"php": ">=8.1",
"psr/log": "^1.0 || ^2.0",
"ext-pdo": "*"
},
Expand Down
18 changes: 3 additions & 15 deletions tests/ExtendedPdoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

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

0 comments on commit e680203

Please sign in to comment.