Skip to content

Commit 8f6b31a

Browse files
IonBazannicolas-grekas
authored andcommitted
[PHP 8.1] Add MYSQLI_REFRESH_REPLICA polyfill
1 parent ab7975a commit 8f6b31a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
Symfony Polyfill / Php80
1+
Symfony Polyfill / Php81
22
========================
33

44
This component provides features added to PHP 8.1 core:
55

66
- [`array_is_list`](https://php.net/array_is_list)
7+
- [`MYSQLI_REFRESH_REPLICA`](https://www.php.net/manual/en/mysqli.constants.php#constantmysqli-refresh-replica) constant
78

89
More information can be found in the
910
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).

Diff for: bootstrap.php

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
return;
1616
}
1717

18+
if (defined('MYSQLI_REFRESH_SLAVE') && !defined('MYSQLI_REFRESH_REPLICA')) {
19+
define('MYSQLI_REFRESH_REPLICA', MYSQLI_REFRESH_SLAVE);
20+
}
21+
1822
if (!function_exists('array_is_list')) {
1923
function array_is_list(array $array): bool { return p\Php81::array_is_list($array); }
2024
}

0 commit comments

Comments
 (0)