Skip to content

Commit

Permalink
Support for mysqli and pdo_mysql on PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Jun 21, 2021
1 parent 7b48ff8 commit 8582d5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ jobs:
- php-version: "8.0"
mariadb-version: "10.5"
extension: "pdo_mysql"
- php-version: "8.1"
mariadb-version: "10.5"
extension: "mysqli"
- php-version: "8.1"
mariadb-version: "10.5"
extension: "pdo_mysql"

services:
mariadb:
Expand Down
5 changes: 5 additions & 0 deletions src/Driver/Mysqli/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
use function assert;
use function floor;
use function mysqli_init;
use function mysqli_report;
use function stripos;

use const MYSQLI_REPORT_OFF;

final class Connection implements ServerInfoAwareConnection
{
/**
Expand Down Expand Up @@ -45,6 +48,8 @@ public function __construct(
iterable $preInitializers = [],
iterable $postInitializers = []
) {
mysqli_report(MYSQLI_REPORT_OFF);

$connection = mysqli_init();
assert($connection !== false);

Expand Down

0 comments on commit 8582d5c

Please sign in to comment.