-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add PHP 8.1 to CI #9006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PHP 8.1 to CI #9006
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,9 @@ public function typesShouldBeConvertedForDQLFunctions(): void | |
$result = $query->getSingleResult(); | ||
|
||
self::assertSame(6, $result['count']); | ||
self::assertSame('325', $result['sales']); | ||
|
||
// While other drivers will return a string, pdo_sqlite returns an integer as of PHP 8.1 | ||
self::assertEquals(325, $result['sales']); | ||
|
||
// Driver return type and precision is determined by the underlying php extension, most seem to return a string. | ||
// pdo_mysql and mysqli both currently return '54.1667' so this is the maximum precision we can assert. | ||
|
@@ -68,7 +70,7 @@ public function typesShouldBeConvertedForDQLFunctions(): void | |
foreach ($query->getResult() as $i => $item) { | ||
$product = self::PRODUCTS[$i]; | ||
|
||
self::assertSame(ltrim($product['price'], '-'), $item['absolute']); | ||
self::assertEquals(ltrim($product['price'], '-'), $item['absolute']); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What was the reason to lower strictness for this assert? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The type returned by the database driver is beyond our control. In PHP 8.1, various PDO drivers have become more type-aware and return integers and floats where we've received a string previously. |
||
self::assertSame(strlen($product['name']), $item['length']); | ||
|
||
// Driver return types for the `square_root` column are inconsistent depending on the underlying | ||
|
Uh oh!
There was an error while loading. Please reload this page.