Skip to content

Commit 20bc059

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: NEWS for GH-20341 Revert "Upgrade bundled pcre2lib to 10.45 (#17825)" Revert "Update pcre2lib from 10.45 to 10.46 (#19618)"
2 parents 7b6b233 + f4b27bd commit 20bc059

Some content is hidden

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

54 files changed

+10768
-19756
lines changed

ext/pcre/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
EXTENSION("pcre", "php_pcre.c", false /* never shared */,
44
"-Iext/pcre/pcre2lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
5-
ADD_SOURCES("ext/pcre/pcre2lib", "pcre2_auto_possess.c pcre2_chartables.c pcre2_compile.c pcre2_compile_class.c pcre2_config.c pcre2_context.c pcre2_chkdint.c pcre2_dfa_match.c pcre2_error.c pcre2_jit_compile.c pcre2_maketables.c pcre2_match.c pcre2_match_data.c pcre2_newline.c pcre2_ord2utf.c pcre2_pattern_info.c pcre2_serialize.c pcre2_string_utils.c pcre2_study.c pcre2_substitute.c pcre2_substring.c pcre2_tables.c pcre2_ucd.c pcre2_valid_utf.c pcre2_xclass.c pcre2_find_bracket.c pcre2_convert.c pcre2_extuni.c pcre2_script_run.c", "pcre");
5+
ADD_SOURCES("ext/pcre/pcre2lib", "pcre2_auto_possess.c pcre2_chartables.c pcre2_compile.c pcre2_config.c pcre2_context.c pcre2_chkdint.c pcre2_dfa_match.c pcre2_error.c pcre2_jit_compile.c pcre2_maketables.c pcre2_match.c pcre2_match_data.c pcre2_newline.c pcre2_ord2utf.c pcre2_pattern_info.c pcre2_serialize.c pcre2_string_utils.c pcre2_study.c pcre2_substitute.c pcre2_substring.c pcre2_tables.c pcre2_ucd.c pcre2_valid_utf.c pcre2_xclass.c pcre2_find_bracket.c pcre2_convert.c pcre2_extuni.c pcre2_script_run.c", "pcre");
66
ADD_DEF_FILE("ext\\pcre\\php_pcre.def");
77

88
AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Define to 1 if PHP uses the bundled PCRE library.');

ext/pcre/config0.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ else
6868
pcre2lib/pcre2_chartables.c
6969
pcre2lib/pcre2_chkdint.c
7070
pcre2lib/pcre2_compile.c
71-
pcre2lib/pcre2_compile_class.c
7271
pcre2lib/pcre2_config.c
7372
pcre2lib/pcre2_context.c
7473
pcre2lib/pcre2_convert.c

ext/pcre/pcre2lib/config.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -104,32 +104,6 @@
104104
#define MAX_VARLOOKBEHIND 255
105105
#endif
106106

107-
/* The value of NEWLINE_DEFAULT determines the default newline character
108-
sequence. PCRE2 client programs can override this by selecting other values
109-
at run time. The valid values are 1 (CR), 2 (LF), 3 (CRLF), 4 (ANY), 5
110-
(ANYCRLF), and 6 (NUL). */
111-
#ifndef NEWLINE_DEFAULT
112-
#define NEWLINE_DEFAULT 2
113-
#endif
114-
115-
/* The value of PCRE2GREP_BUFSIZE is the starting size of the buffer used by
116-
pcre2grep to hold parts of the file it is searching. The buffer will be
117-
expanded up to PCRE2GREP_MAX_BUFSIZE if necessary, for files containing
118-
very long lines. The actual amount of memory used by pcre2grep is three
119-
times this number, because it allows for the buffering of "before" and
120-
"after" lines. */
121-
#ifndef PCRE2GREP_BUFSIZE
122-
#define PCRE2GREP_BUFSIZE 20480
123-
#endif
124-
125-
/* The value of PCRE2GREP_MAX_BUFSIZE specifies the maximum size of the buffer
126-
used by pcre2grep to hold parts of the file it is searching. The actual
127-
amount of memory used by pcre2grep is three times this number, because it
128-
allows for the buffering of "before" and "after" lines. */
129-
#ifndef PCRE2GREP_MAX_BUFSIZE
130-
#define PCRE2GREP_MAX_BUFSIZE 1048576
131-
#endif
132-
133107
/* to make a symbol visible */
134108
#ifndef PCRE2_EXPORT
135109
#define PCRE2_EXPORT

ext/pcre/pcre2lib/pcre2.h

Lines changed: 4 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
4242
/* The current PCRE version information. */
4343

4444
#define PCRE2_MAJOR 10
45-
#define PCRE2_MINOR 46
45+
#define PCRE2_MINOR 44
4646
#define PCRE2_PRERELEASE
47-
#define PCRE2_DATE 2025-08-27
47+
#define PCRE2_DATE 2024-06-07
4848

4949
/* When an application links to a PCRE DLL in Windows, the symbols that are
5050
imported have to be identified as such. When building PCRE2, the appropriate
@@ -143,7 +143,6 @@ D is inspected during pcre2_dfa_match() execution
143143
#define PCRE2_EXTENDED_MORE 0x01000000u /* C */
144144
#define PCRE2_LITERAL 0x02000000u /* C */
145145
#define PCRE2_MATCH_INVALID_UTF 0x04000000u /* J M D */
146-
#define PCRE2_ALT_EXTENDED_CLASS 0x08000000u /* C */
147146

148147
/* An additional compile options word is available in the compile context. */
149148

@@ -160,18 +159,13 @@ D is inspected during pcre2_dfa_match() execution
160159
#define PCRE2_EXTRA_ASCII_BSW 0x00000400u /* C */
161160
#define PCRE2_EXTRA_ASCII_POSIX 0x00000800u /* C */
162161
#define PCRE2_EXTRA_ASCII_DIGIT 0x00001000u /* C */
163-
#define PCRE2_EXTRA_PYTHON_OCTAL 0x00002000u /* C */
164-
#define PCRE2_EXTRA_NO_BS0 0x00004000u /* C */
165-
#define PCRE2_EXTRA_NEVER_CALLOUT 0x00008000u /* C */
166-
#define PCRE2_EXTRA_TURKISH_CASING 0x00010000u /* C */
167162

168163
/* These are for pcre2_jit_compile(). */
169164

170165
#define PCRE2_JIT_COMPLETE 0x00000001u /* For full matching */
171166
#define PCRE2_JIT_PARTIAL_SOFT 0x00000002u
172167
#define PCRE2_JIT_PARTIAL_HARD 0x00000004u
173168
#define PCRE2_JIT_INVALID_UTF 0x00000100u
174-
#define PCRE2_JIT_TEST_ALLOC 0x00000200u
175169

176170
/* These are for pcre2_match(), pcre2_dfa_match(), pcre2_jit_match(), and
177171
pcre2_substitute(). Some are allowed only for one of the functions, and in
@@ -326,23 +320,7 @@ pcre2_pattern_convert(). */
326320
#define PCRE2_ERROR_TOO_MANY_CAPTURES 197
327321
#define PCRE2_ERROR_CONDITION_ATOMIC_ASSERTION_EXPECTED 198
328322
#define PCRE2_ERROR_BACKSLASH_K_IN_LOOKAROUND 199
329-
#define PCRE2_ERROR_MAX_VAR_LOOKBEHIND_EXCEEDED 200
330-
#define PCRE2_ERROR_PATTERN_COMPILED_SIZE_TOO_BIG 201
331-
#define PCRE2_ERROR_OVERSIZE_PYTHON_OCTAL 202
332-
#define PCRE2_ERROR_CALLOUT_CALLER_DISABLED 203
333-
#define PCRE2_ERROR_EXTRA_CASING_REQUIRES_UNICODE 204
334-
#define PCRE2_ERROR_TURKISH_CASING_REQUIRES_UTF 205
335-
#define PCRE2_ERROR_EXTRA_CASING_INCOMPATIBLE 206
336-
#define PCRE2_ERROR_ECLASS_NEST_TOO_DEEP 207
337-
#define PCRE2_ERROR_ECLASS_INVALID_OPERATOR 208
338-
#define PCRE2_ERROR_ECLASS_UNEXPECTED_OPERATOR 209
339-
#define PCRE2_ERROR_ECLASS_EXPECTED_OPERAND 210
340-
#define PCRE2_ERROR_ECLASS_MIXED_OPERATORS 211
341-
#define PCRE2_ERROR_ECLASS_HINT_SQUARE_BRACKET 212
342-
#define PCRE2_ERROR_PERL_ECLASS_UNEXPECTED_EXPR 213
343-
#define PCRE2_ERROR_PERL_ECLASS_EMPTY_EXPR 214
344-
#define PCRE2_ERROR_PERL_ECLASS_MISSING_CLOSE 215
345-
#define PCRE2_ERROR_PERL_ECLASS_UNEXPECTED_CHAR 216
323+
346324

347325
/* "Expected" matching error codes: no match and partial match. */
348326

@@ -429,9 +407,6 @@ released, the numbers must not be changed. */
429407
#define PCRE2_ERROR_INTERNAL_DUPMATCH (-65)
430408
#define PCRE2_ERROR_DFA_UINVALID_UTF (-66)
431409
#define PCRE2_ERROR_INVALIDOFFSET (-67)
432-
#define PCRE2_ERROR_JIT_UNSUPPORTED (-68)
433-
#define PCRE2_ERROR_REPLACECASE (-69)
434-
#define PCRE2_ERROR_TOOLARGEREPLACE (-70)
435410

436411

437412
/* Request types for pcre2_pattern_info() */
@@ -485,30 +460,6 @@ released, the numbers must not be changed. */
485460
#define PCRE2_CONFIG_COMPILED_WIDTHS 14
486461
#define PCRE2_CONFIG_TABLES_LENGTH 15
487462

488-
/* Optimization directives for pcre2_set_optimize().
489-
For binary compatibility, only add to this list; do not renumber. */
490-
491-
#define PCRE2_OPTIMIZATION_NONE 0
492-
#define PCRE2_OPTIMIZATION_FULL 1
493-
494-
#define PCRE2_AUTO_POSSESS 64
495-
#define PCRE2_AUTO_POSSESS_OFF 65
496-
#define PCRE2_DOTSTAR_ANCHOR 66
497-
#define PCRE2_DOTSTAR_ANCHOR_OFF 67
498-
#define PCRE2_START_OPTIMIZE 68
499-
#define PCRE2_START_OPTIMIZE_OFF 69
500-
501-
/* Types used in pcre2_set_substitute_case_callout().
502-
503-
PCRE2_SUBSTITUTE_CASE_LOWER and PCRE2_SUBSTITUTE_CASE_UPPER are passed to the
504-
callout to indicate that the case of the entire callout input should be
505-
case-transformed. PCRE2_SUBSTITUTE_CASE_TITLE_FIRST is passed to indicate that
506-
only the first character or glyph should be transformed to Unicode titlecase,
507-
and the rest to lowercase. */
508-
509-
#define PCRE2_SUBSTITUTE_CASE_LOWER 1
510-
#define PCRE2_SUBSTITUTE_CASE_UPPER 2
511-
#define PCRE2_SUBSTITUTE_CASE_TITLE_FIRST 3
512463

513464
/* Types for code units in patterns and subject strings. */
514465

@@ -662,9 +613,7 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
662613
pcre2_set_parens_nest_limit(pcre2_compile_context *, uint32_t); \
663614
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
664615
pcre2_set_compile_recursion_guard(pcre2_compile_context *, \
665-
int (*)(uint32_t, void *), void *); \
666-
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
667-
pcre2_set_optimize(pcre2_compile_context *, uint32_t);
616+
int (*)(uint32_t, void *), void *);
668617

669618
#define PCRE2_MATCH_CONTEXT_FUNCTIONS \
670619
PCRE2_EXP_DECL pcre2_match_context *PCRE2_CALL_CONVENTION \
@@ -679,11 +628,6 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
679628
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
680629
pcre2_set_substitute_callout(pcre2_match_context *, \
681630
int (*)(pcre2_substitute_callout_block *, void *), void *); \
682-
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
683-
pcre2_set_substitute_case_callout(pcre2_match_context *, \
684-
PCRE2_SIZE (*)(PCRE2_SPTR, PCRE2_SIZE, PCRE2_UCHAR *, PCRE2_SIZE, int, \
685-
void *), \
686-
void *); \
687631
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
688632
pcre2_set_depth_limit(pcre2_match_context *, uint32_t); \
689633
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
@@ -796,7 +740,6 @@ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
796740
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
797741
pcre2_substring_list_get(pcre2_match_data *, PCRE2_UCHAR ***, PCRE2_SIZE **);
798742

799-
800743
/* Functions for serializing / deserializing compiled patterns. */
801744

802745
#define PCRE2_SERIALIZE_FUNCTIONS \
@@ -964,9 +907,7 @@ pcre2_compile are called by application code. */
964907
#define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_)
965908
#define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_)
966909
#define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_)
967-
#define pcre2_set_optimize PCRE2_SUFFIX(pcre2_set_optimize_)
968910
#define pcre2_set_substitute_callout PCRE2_SUFFIX(pcre2_set_substitute_callout_)
969-
#define pcre2_set_substitute_case_callout PCRE2_SUFFIX(pcre2_set_substitute_case_callout_)
970911
#define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_)
971912
#define pcre2_substring_copy_byname PCRE2_SUFFIX(pcre2_substring_copy_byname_)
972913
#define pcre2_substring_copy_bynumber PCRE2_SUFFIX(pcre2_substring_copy_bynumber_)

0 commit comments

Comments
 (0)