Skip to content

Commit 5b16e25

Browse files
committed
Merge branch '2.x'
2 parents 4775f35 + 540af38 commit 5b16e25

File tree

5 files changed

+7
-21
lines changed

5 files changed

+7
-21
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- "8.1"
2323
- "8.2"
2424
- "8.3"
25+
- "8.4"
2526

2627
steps:
2728
- 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.4"
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.4"
21-
- "8.1"
21+
- "8.3"
2222

2323
steps:
2424
- name: "Checkout"

phpstan-baseline.neon

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,6 @@ parameters:
66
path: src/Preg.php
77

88
-
9-
message: "#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:match\\(\\) expects array\\<int\\|string, string\\|null\\>, \\(int is int \\? array\\<array\\<int, int\\<\\-1, max\\>\\|string\\>\\> \\: \\(int is int \\? array\\<string\\|null\\> \\: \\(int is int \\? array\\<array\\<int, int\\|string\\|null\\>\\> \\: array\\<string\\>\\)\\)\\) given\\.$#"
10-
count: 1
11-
path: src/Preg.php
12-
13-
-
14-
message: "#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:matchAll\\(\\) expects array\\<int\\|string, list\\<string\\|null\\>\\>, \\(512 is 1 \\? array\\<list\\<string\\>\\> \\: \\(512 is 2 \\? list\\<array\\<string\\>\\> \\: \\(512 is 256\\|257 \\? array\\<list\\<array\\{string, int\\}\\>\\> \\: \\(512 is 258 \\? list\\<array\\<array\\{string, int\\}\\>\\> \\: \\(512 is 512\\|513 \\? array\\<list\\<string\\|null\\>\\> \\: \\(512 is 514 \\? list\\<array\\<string\\|null\\>\\> \\: \\(512 is 770 \\? list\\<array\\<array\\{string\\|null, int\\}\\>\\> \\: array\\)\\)\\)\\)\\)\\)\\) given\\.$#"
15-
count: 1
16-
path: src/Preg.php
17-
18-
-
19-
message: "#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:matchAllWithOffsets\\(\\) expects array\\<int\\|string, list\\<array\\{string\\|null, int\\<\\-1, max\\>\\}\\>\\>, \\(768 is 1 \\? array\\<list\\<string\\>\\> \\: \\(768 is 2 \\? list\\<array\\<string\\>\\> \\: \\(768 is 256\\|257 \\? array\\<list\\<array\\{string, int\\}\\>\\> \\: \\(768 is 258 \\? list\\<array\\<array\\{string, int\\}\\>\\> \\: \\(768 is 512\\|513 \\? array\\<list\\<string\\|null\\>\\> \\: \\(768 is 514 \\? list\\<array\\<string\\|null\\>\\> \\: \\(768 is 770 \\? list\\<array\\<array\\{string\\|null, int\\}\\>\\> \\: array\\)\\)\\)\\)\\)\\)\\) given\\.$#"
20-
count: 1
21-
path: src/Preg.php
22-
23-
-
24-
message: "#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:matchWithOffsets\\(\\) expects array\\<int\\|string, array\\{string\\|null, int\\<\\-1, max\\>\\}\\>, \\(768 is 256 \\? array\\<array\\{string, int\\<\\-1, max\\>\\}\\> \\: \\(768 is 512 \\? array\\<string\\|null\\> \\: \\(768 is 768 \\? array\\<array\\{null, \\-1\\}\\|array\\{string, int\\<0, max\\>\\}\\> \\: array\\<string\\>\\)\\)\\) given\\.$#"
9+
message: "#^Parameter &\\$matches @param\\-out type of method Composer\\\\Pcre\\\\Preg\\:\\:matchAllWithOffsets\\(\\) expects array\\<int\\|string, list\\<array\\{string\\|null, int\\<\\-1, max\\>\\}\\>\\>, array given\\.$#"
2510
count: 1
2611
path: src/Preg.php

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)) {
@@ -218,7 +218,7 @@ public static function replaceCallbackStrictGroups(string $pattern, callable $re
218218
*
219219
* @param-out int<0, max> $count
220220
*/
221-
public static function replaceCallbackArray(array $pattern, $subject, int $limit = -1, int &$count = null, int $flags = 0): string
221+
public static function replaceCallbackArray(array $pattern, $subject, int $limit = -1, ?int &$count = null, int $flags = 0): string
222222
{
223223
if (!is_scalar($subject)) {
224224
if (is_array($subject)) {

0 commit comments

Comments
 (0)