Skip to content

Commit f2ee77a

Browse files
committed
Set deprecate Oniguruma
1 parent 38cbbee commit f2ee77a

File tree

82 files changed

+1624
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1624
-89
lines changed

ext/mbstring/mbstring.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
#include "mb_gpc.h"
5757

5858
#ifdef HAVE_MBREGEX
59+
# include "zend_attributes.h"
5960
# include "php_mbregex.h"
6061
#endif
6162

ext/mbstring/mbstring.stub.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* @var string
88
* @cvalue php_mb_oniguruma_version
99
*/
10+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
1011
const MB_ONIGURUMA_VERSION = UNKNOWN;
1112
#endif
1213

@@ -197,57 +198,73 @@ function mb_str_pad(string $string, int $length, string $pad_string = " ", int $
197198

198199
#ifdef HAVE_MBREGEX
199200
/** @refcount 1 */
201+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
200202
function mb_regex_encoding(?string $encoding = null): string|bool {}
201203

202204
/** @param array $matches */
205+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
203206
function mb_ereg(string $pattern, string $string, &$matches = null): bool {}
204207

205208
/** @param array $matches */
209+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
206210
function mb_eregi(string $pattern, string $string, &$matches = null): bool {}
207211

208212
/** @refcount 1 */
213+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
209214
function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {}
210215

211216
/** @refcount 1 */
217+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
212218
function mb_eregi_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {}
213219

214220
/** @refcount 1 */
221+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
215222
function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null {}
216223

217224
/**
218225
* @return array<int, string>|false
219226
* @refcount 1
220227
*/
228+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
221229
function mb_split(string $pattern, string $string, int $limit = -1): array|false {}
222230

231+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
223232
function mb_ereg_match(string $pattern, string $string, ?string $options = null): bool {}
224233

234+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
225235
function mb_ereg_search(?string $pattern = null, ?string $options = null): bool {}
226236

227237
/**
228238
* @return array<int, int>|false
229239
* @refcount 1
230240
*/
241+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
231242
function mb_ereg_search_pos(?string $pattern = null, ?string $options = null): array|false {}
232243

233244
/**
234245
* @return array<int|string, string|false>|false
235246
* @refcount 1
236247
*/
248+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
237249
function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): array|false {}
238250

251+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
239252
function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $options = null): bool {}
240253

241254
/**
242255
* @return array<int|string, string|false>|false
243256
* @refcount 1
244257
*/
258+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
245259
function mb_ereg_search_getregs(): array|false {}
246260

261+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
247262
function mb_ereg_search_getpos(): int {}
248263

264+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
249265
function mb_ereg_search_setpos(int $offset): bool {}
250266

251267
/** @refcount 1 */
268+
#[\Deprecated(since: '8.6', message: "mbregex support end PHP 9.0")]
252269
function mb_regex_set_options(?string $options = null): string {}
253270
#endif

ext/mbstring/mbstring_arginfo.h

Lines changed: 159 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/mbstring/tests/bug43994.phpt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ try {
3131

3232
var_dump($mb_regs);
3333
?>
34-
--EXPECT--
34+
--EXPECTF--
3535
Without $regs arg:
36+
37+
Deprecated: Function mb_ereg() is deprecated since 8.6, mbregex support end PHP 9.0 in %s on line %d
3638
mb_ereg(): Argument #1 ($pattern) must not be empty
3739
With $regs arg:
40+
41+
Deprecated: Function mb_ereg() is deprecated since 8.6, mbregex support end PHP 9.0 in %s on line %d
3842
mb_ereg(): Argument #1 ($pattern) must not be empty
3943
NULL

ext/mbstring/tests/bug69151.phpt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,16 @@ var_dump(NULL === mb_ereg_replace('.', "\\0", $str));
1818
var_dump(false === mb_ereg_search_init("\x80", '.'));
1919
var_dump(false === mb_ereg_search());
2020
?>
21-
--EXPECT--
21+
--EXPECTF--
22+
Deprecated: Function mb_eregi() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug69151.php on line %d
2223
bool(true)
2324
bool(true)
25+
26+
Deprecated: Function mb_ereg_replace() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug69151.php on line %d
2427
bool(true)
28+
29+
Deprecated: Function mb_ereg_search_init() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug69151.php on line %d
2530
bool(true)
31+
32+
Deprecated: Function mb_ereg_search() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug69151.php on line %d
2633
bool(true)

ext/mbstring/tests/bug72164.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ try {
1919
}
2020

2121
?>
22-
--EXPECT--
22+
--EXPECTF--
23+
Deprecated: Function mb_ereg_replace() is deprecated since 8.6, mbregex support end PHP 9.0 in %s on line %d
2324
Option "e" is not supported

ext/mbstring/tests/bug72399.phpt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ try {
1919
echo $e->getMessage() . \PHP_EOL;
2020
}
2121
?>
22-
--EXPECT--
22+
--EXPECTF--
23+
Deprecated: Function mb_ereg_search_init() is deprecated since 8.6, mbregex support end PHP 9.0 in %s on line %d
2324
bool(true)
25+
26+
Deprecated: Function mb_eregi_replace() is deprecated since 8.6, mbregex support end PHP 9.0 in %s on line %d
2427
string(0) ""
28+
29+
Deprecated: Function mb_ereg_search_pos() is deprecated since 8.6, mbregex support end PHP 9.0 in %s on line %d
2530
No pattern was provided

ext/mbstring/tests/bug72402.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ try {
1717
} catch(Exception $e) {}
1818
?>
1919
DONE
20-
--EXPECT--
20+
--EXPECTF--
21+
Deprecated: Function mb_ereg_replace_callback() is deprecated since 8.6, mbregex support end PHP 9.0 in %s on line %d
2122
DONE

ext/mbstring/tests/bug72691.phpt

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,48 @@ mb_ereg_search('\Z');
2727
var_dump(mb_ereg_search_getpos());
2828
var_dump(mb_ereg_search_getregs());
2929
?>
30-
--EXPECT--
30+
--EXPECTF--
31+
Deprecated: Function mb_ereg_search_init() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
32+
33+
Deprecated: Function mb_ereg_search() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
34+
35+
Deprecated: Function mb_ereg_search_getpos() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
3136
int(0)
37+
38+
Deprecated: Function mb_ereg_search_getregs() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
3239
array(1) {
3340
[0]=>
3441
string(0) ""
3542
}
43+
44+
Deprecated: Function mb_ereg_search() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
45+
46+
Deprecated: Function mb_ereg_search_getpos() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
3647
int(0)
48+
49+
Deprecated: Function mb_ereg_search_getregs() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
3750
array(1) {
3851
[0]=>
3952
string(0) ""
4053
}
54+
55+
Deprecated: Function mb_ereg_search() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
56+
57+
Deprecated: Function mb_ereg_search_getpos() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
4158
int(3)
59+
60+
Deprecated: Function mb_ereg_search_getregs() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
4261
array(1) {
4362
[0]=>
4463
string(3) "foo"
4564
}
65+
66+
Deprecated: Function mb_ereg_search() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
67+
68+
Deprecated: Function mb_ereg_search_getpos() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
4669
int(3)
70+
71+
Deprecated: Function mb_ereg_search_getregs() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72691.php on line %d
4772
array(1) {
4873
[0]=>
4974
string(0) ""

ext/mbstring/tests/bug72693.phpt

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,41 @@ var_dump(mb_ereg_search_getpos());
2626
var_dump(mb_ereg_search('\Z'));
2727
var_dump(mb_ereg_search_getpos());
2828
?>
29-
--EXPECT--
29+
--EXPECTF--
30+
Deprecated: Function mb_ereg_search_init() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
31+
32+
Deprecated: Function mb_ereg_search() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
3033
bool(true)
34+
35+
Deprecated: Function mb_ereg_search_getpos() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
3136
int(0)
37+
38+
Deprecated: Function mb_ereg_search() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
3239
bool(true)
40+
41+
Deprecated: Function mb_ereg_search_getpos() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
3342
int(0)
43+
44+
Deprecated: Function mb_ereg_search() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
3445
bool(true)
46+
47+
Deprecated: Function mb_ereg_search_getpos() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
3548
int(3)
49+
50+
Deprecated: Function mb_ereg_search_getregs() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
3651
array(1) {
3752
[0]=>
3853
string(3) "foo"
3954
}
55+
56+
Deprecated: Function mb_ereg_search() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
4057
bool(true)
58+
59+
Deprecated: Function mb_ereg_search_getpos() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
4160
int(3)
61+
62+
Deprecated: Function mb_ereg_search() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
4263
bool(true)
64+
65+
Deprecated: Function mb_ereg_search_getpos() is deprecated since 8.6, mbregex support end PHP 9.0 in %smbstring/tests/bug72693.php on line %d
4366
int(3)

0 commit comments

Comments
 (0)