Skip to content

Commit 28fb502

Browse files
committed
Fix php8.4 deprecations and add CI versions
1 parent 02b8774 commit 28fb502

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
- "7.4"
2323
- "8.0"
2424
- "8.1"
25+
- "8.2"
26+
- "8.3"
27+
- "8.4"
2528

2629
steps:
2730
- name: "Checkout"

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
matrix:
1515
php-version:
1616
- "7.2"
17-
- "8.1"
17+
- "8.3"
1818

1919
steps:
2020
- name: "Checkout"

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
matrix:
1919
php-version:
2020
- "7.2"
21-
- "8.1"
21+
- "8.3"
2222

2323
steps:
2424
- name: "Checkout"

src/Preg.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public static function matchAllWithOffsets(string $pattern, string $subject, ?ar
147147
*
148148
* @param-out int<0, max> $count
149149
*/
150-
public static function replace($pattern, $replacement, $subject, int $limit = -1, int &$count = null): string
150+
public static function replace($pattern, $replacement, $subject, int $limit = -1, ?int &$count = null): string
151151
{
152152
if (!is_scalar($subject)) {
153153
if (is_array($subject)) {
@@ -174,7 +174,7 @@ public static function replace($pattern, $replacement, $subject, int $limit = -1
174174
*
175175
* @param-out int<0, max> $count
176176
*/
177-
public static function replaceCallback($pattern, callable $replacement, $subject, int $limit = -1, int &$count = null, int $flags = 0): string
177+
public static function replaceCallback($pattern, callable $replacement, $subject, int $limit = -1, ?int &$count = null, int $flags = 0): string
178178
{
179179
if (!is_scalar($subject)) {
180180
if (is_array($subject)) {
@@ -204,7 +204,7 @@ public static function replaceCallback($pattern, callable $replacement, $subject
204204
*
205205
* @param-out int<0, max> $count
206206
*/
207-
public static function replaceCallbackArray(array $pattern, $subject, int $limit = -1, int &$count = null, int $flags = 0): string
207+
public static function replaceCallbackArray(array $pattern, $subject, int $limit = -1, ?int &$count = null, int $flags = 0): string
208208
{
209209
if (!is_scalar($subject)) {
210210
if (is_array($subject)) {

0 commit comments

Comments
 (0)