Skip to content

wip #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2,915 commits into
base: master
Choose a base branch
from
Open

wip #112

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
2915 commits
Select commit Hold shift + click to select a range
42336e1
Deprecate mysqli_refresh (#11929)
kamil-tekiela Aug 9, 2024
1e3d918
ext/core: Deprecate passing E_USER_ERROR to trigger_error() (#15308)
Girgias Aug 9, 2024
72fb00b
Update gd extension preprocessor macros help texts (#15296)
petk Aug 9, 2024
8044db1
Update mysql preprocessor macros help texts (#15288)
petk Aug 9, 2024
3a30c29
Autotools: Add pkg-config support for NET-SNMP library (#15261)
petk Aug 9, 2024
00001c4
Fix GH-15292: Dynamic AVX detection is broken for MSVC
nielsdos Aug 8, 2024
cbcad9f
Deprecate mysqli_ping (#11945)
kamil-tekiela Aug 9, 2024
42497c1
ext/soap: Deprecate passing an int to SoapServer::addFunction() (#15310)
Girgias Aug 9, 2024
7801f40
Deprecate mysqli_kill (#11926)
kamil-tekiela Aug 9, 2024
5c739ac
[skip ci] Mark stack limit tests with high memory limit as slow
iluuu1994 Aug 9, 2024
667a565
Merge branch 'PHP-8.3'
devnexen Aug 9, 2024
48bb8fe
Merge branch 'PHP-8.3'
nielsdos Aug 9, 2024
c426157
Merge branch 'PHP-8.3'
nielsdos Aug 9, 2024
fd570fb
main/streams: Voidify statbuf_from_array() (#15319)
Girgias Aug 9, 2024
dbdc79d
Autotools: Fix SNMP checks (#15263)
petk Aug 10, 2024
fcd4d39
Autotools: Refactor mysqli extension checks (#15323)
petk Aug 10, 2024
d5c7f3b
ext/standard: enabling feature detection auxiliary vector on OpenBSD.
devnexen Jul 30, 2024
d98c4b6
Fix comments in win32/sendmail.c (GH-15326)
cmb69 Aug 10, 2024
ee02e4b
Fix violation of the one definition rule in ext/com_dotnet (GH-15327)
cmb69 Aug 10, 2024
0122be5
Simplify document standalone setter (#15320)
nielsdos Aug 10, 2024
2b30b22
Autotools: Quote PHP_CHECK_SIZEOF macro arguments
petk Aug 10, 2024
b43dd10
Merge branch 'PHP-8.3'
arnaud-lb Aug 10, 2024
60a055f
[ci skip] NEWS for GH-15275
arnaud-lb Aug 10, 2024
c02c1d4
Change YIELD/YIELD_FROM to do not increment opline (#15328)
arnaud-lb Aug 8, 2024
9c537de
Fix some -Wimplicit-function-declaration errors on Windows (GH-15325)
cmb69 Aug 10, 2024
db5ea45
Fix incorrect type check in removeAttributeNode
nielsdos Aug 10, 2024
9b41c8b
Declare gdImageGetInterpolationMethod() for bundled GD (GH-15329)
cmb69 Aug 10, 2024
8d7365b
Fix GH-15331: dom: Element::$substitutedNodeValue test failed
nielsdos Aug 10, 2024
8740fdf
Support somewhat recent clang versions on Windows (GH-15324)
cmb69 Aug 10, 2024
edc88ee
ext/standard: Minor refactoring to URL scanner code (#15321)
Girgias Aug 10, 2024
e5f6387
Autotools: Refactor pdo_mysql checks (#15334)
petk Aug 10, 2024
1108710
Autotools: Sync CS across the configure.ac (#15332)
petk Aug 10, 2024
1d198c6
ext/sockets: controlling ephemeral port ranges on *BSD.
devnexen Aug 10, 2024
b7be849
Get rid of le_istream
nielsdos May 20, 2024
3f54be8
Get rid of le_dispatch
nielsdos Aug 10, 2024
e1c8329
Update TODOs in com_dotnet
nielsdos Aug 10, 2024
a5f8cbd
Autotools: Refactor mysql_config checks in pdo_mysql (#15336)
petk Aug 11, 2024
51a557e
[skip ci] 8.4 | UPGRADING: various tweaks
jrfnl Aug 10, 2024
cb8df21
[skip ci] 8.4 | UPGRADING: add missing entry for DBA resource to obje…
jrfnl Aug 11, 2024
6bf7b72
ValueError on null byte in session_name() (#15286)
jorgsowa Aug 11, 2024
8c2ebc0
[skip ci] Add NEWS/UPGRADING entries for mysqli deprecations
Girgias Aug 11, 2024
b0091c4
Autotools: Sync CS in opcache extension (#15340)
petk Aug 11, 2024
caae950
ext/xml: Add an explicit test case about unsetting a handler with emp…
Girgias Aug 11, 2024
f2e50eb
Autotools: Sync CS in ext/pcntl (#15341)
petk Aug 11, 2024
c4eccf3
ext/session: session.save_handler - add tests fortwo uncovered cases …
jorgsowa Aug 11, 2024
1950d66
ext/mysqli: Mark function pointer as returning zend_result (#15342)
Girgias Aug 11, 2024
efd33f5
ext/mysqli: mysqli_report() only ever returns true
Girgias Aug 11, 2024
0c827f6
ext/mysqli: Use an assertion for condition that is checked by ZPP
Girgias Aug 11, 2024
c2bdb31
ext/mysqli: Remove PHP 6 remnants
Girgias Aug 11, 2024
5d1db3d
ext/mysqli: Improve variable name and type
Girgias Aug 11, 2024
687eb91
Autotools: Remove dependency related errors (#15344)
petk Aug 11, 2024
bb35da3
Autotools: Sync CS in extensions (#15343)
petk Aug 11, 2024
857ce2c
ext/mysqli: Mark return type as zend_return (#15345)
Girgias Aug 11, 2024
4f58d5b
ext/mysqli: Deprecate passing the parameter to mysqli_store_result() …
Girgias Aug 11, 2024
693ec80
Autotools: Remove PDO dependency related errors (#15347)
petk Aug 11, 2024
634708a
Add pcre as a configure step dependency to fileinfo (#15349)
petk Aug 11, 2024
9fcc1bc
Remove redundant middle newlines in "Autotools" related files
petk Aug 12, 2024
e6ecd83
Update arginfo for mysqli and spl_fixedarray (#15356)
kamil-tekiela Aug 12, 2024
cdf0a9b
Autotools: Use AS_CASE in ext/pdo_odbc (#15355)
petk Aug 12, 2024
8ca8d77
Deprecate MYSQLI_REFRESH_* constants (#15358)
kamil-tekiela Aug 12, 2024
d334382
[skip ci] Fix typo s/dissasembly/disassembly
petk Aug 12, 2024
6cb6cc6
Autotools: Refactor iconv implementation checks (#15357)
petk Aug 12, 2024
81b49cd
ext/curl: Add HTTP/3 constants (#15350)
Ayesh Aug 12, 2024
37c22c4
Merge branch 'PHP-8.3'
iluuu1994 Aug 12, 2024
c818d94
ext/(standard|spl): Deprecate passing a non-empty string as the $encl…
Girgias Aug 12, 2024
0a23b06
Deprecate using "_" as a class name (#15360)
Girgias Aug 12, 2024
d74b513
ext/gmp: Add test about manually (un)serializing
Girgias Aug 11, 2024
f862663
ext/gmp: Use zend_string to GMP object function directly
Girgias Aug 11, 2024
6114379
ext/gmp: Refactor gmp_import_export_validate()
Girgias Aug 11, 2024
a4772a0
[skip ci] Remove unclosed vim code folding
iluuu1994 Aug 12, 2024
f5ae5ac
ext/standard: Throw ValueErrors in str_getcsv() for invalid inputs (#…
Girgias Aug 12, 2024
8c4f019
Autotools: Sync CS in gd extension (#15364)
petk Aug 12, 2024
8115018
Ensure proper alignment of zend_accel_shared_globals.interned_strings…
arnaud-lb Aug 12, 2024
2661923
Skip fb4_datatypes*.phpt for Firebird server < 4.0.0 (GH-15354)
cmb69 Aug 12, 2024
5478d4b
Merge branch 'PHP-8.3'
cmb69 Aug 12, 2024
225034d
pdo_firebird: Formatting time zone types
sim1984 Aug 12, 2024
afc5738
Show build provider and unify version information printing (#14657)
NattyNarwhal Aug 13, 2024
d052d61
ext/sockets: adding SOCK_CLOEXEC/SOCK_NONBLOCK options.
devnexen Aug 10, 2024
540b9f5
Autotools: Wrap long texts with m4_text_wrap (#15368)
petk Aug 13, 2024
3b24b85
Autotools: Sync CS in ext/pdo_firebird (#15372)
petk Aug 13, 2024
10ed74e
Autotools: Check cli SAPI configure checks conditionally (#15370)
petk Aug 13, 2024
65e96c1
Autotools: Fix phpdbg build (#15373)
petk Aug 13, 2024
a6d7d52
Autotools: Fix pdo_firebird shared build (#15371)
petk Aug 13, 2024
587110c
Deprecate Soft-deprecated DOMDocument and DOMEntity properties (#15369)
kocsismate Aug 13, 2024
54cc76f
ext/standard/filters.c: Remove some register keywords
Girgias Aug 12, 2024
2baadf3
ext/standard/filters.c: Voidify php_conv_base64_decode_ctor()
Girgias Aug 12, 2024
9cfe9e1
ext/standard/filters.c: Use zend_result return type instead of int
Girgias Aug 12, 2024
91aca96
ext/standard/filters.c: Use bool type where possible for persistent f…
Girgias Aug 12, 2024
2297e50
ext/standard/head.c: Remove some useless casts
Girgias Aug 12, 2024
67a15cf
ext/standard/head.c: Change return type of php_header() to bool
Girgias Aug 12, 2024
739805d
ext/standard/info.c: Removed php_info_html_esc()
Girgias Aug 12, 2024
5078eb0
ext/standard/info.c: Use size_t type where appropriate
Girgias Aug 12, 2024
e0f6e3d
ext/standard/info.c: Make some functions static
Girgias Aug 12, 2024
5622def
Add more tests covering deprecation of _ as CE name
Girgias Aug 13, 2024
be6dee3
Reset seen symbols when ending namespace (GH-15244)
iluuu1994 Aug 5, 2024
8c4d5a1
[ci skip] Update NEWS for PHP 8.4.0 beta1
NattyNarwhal Aug 13, 2024
a68b8b5
Merge branch 'PHP-8.3'
saundefined Aug 13, 2024
8448db8
Mention in UPGRADING the MYSQLI_REFRESH_* constants
kamil-tekiela Aug 13, 2024
ac7ed28
ext/standard/info.c: Minor refactoring to php_get_windows_name()
Girgias Aug 12, 2024
d63caf0
ext/standard/info.c: Minor refactoring to php_get_uname()
Girgias Aug 12, 2024
589cfbb
Completely remove session.sid_length and session.sid_bits_per_charact…
remicollet Aug 13, 2024
6949b7b
Merge branch 'PHP-8.3'
cmb69 Aug 13, 2024
65c6d72
Drop FASTCALL on variadic functions (GH-15389)
cmb69 Aug 13, 2024
bf1b0eb
Merge branch 'PHP-8.3'
bukka Aug 13, 2024
445ea01
Merge branch 'PHP-8.3'
devnexen Aug 13, 2024
6e2bbc4
Merge branch 'PHP-8.3'
devnexen Aug 13, 2024
0b8fbac
ext/standard/info.c: Remove unreachable conditional branch
Girgias Aug 13, 2024
40d88ca
Fix test expectation for "Built by..." (#15383)
remicollet Aug 13, 2024
6f44a0d
Autotools: Use AS_* macros in embed SAPI (#15387)
petk Aug 13, 2024
b56f81c
Add configure phase dependencies to mysqlnd extension (#15380)
petk Aug 13, 2024
2054c3d
Merge branch 'PHP-8.3'
iluuu1994 Aug 14, 2024
0217784
Replace uses of php_dirname() with zend_dirname() (#15393)
Girgias Aug 14, 2024
a79c70f
[RFC] Convert exit (and die) from language constructs to functions (…
Girgias Aug 14, 2024
d100caa
[skip ci] Add NEWS/UPGRADING + wording amendment for GH-13483
Girgias Aug 14, 2024
74bf894
ext/standard/info.c: Throw ValueErrors on invalid inputs to php_uname…
Girgias Aug 14, 2024
a2a3c5b
hash: Consistently check for PHP_HASH_INTRIN_SHA_* to guard compilati…
TimWolla Aug 14, 2024
f6dcca0
Autotools: Substitute PHP_EMBED_TYPE conditionally (#15396)
petk Aug 14, 2024
68d5c81
[skip ci] 8.4 | UPGRADING: add missing RFC links
jrfnl Aug 14, 2024
0abd54d
[skip ci] 8.4 | UPGRADING: join PDO entries
jrfnl Aug 14, 2024
d61cb70
[skip ci] 8.4 | UPGRADING: fix extension order
jrfnl Aug 14, 2024
ba321af
[skip ci] 8.4 | UPGRADING: fix typo
jrfnl Aug 14, 2024
d245bf1
[skip ci] 8.4 | UPGRADING: move new function to correct section
jrfnl Aug 14, 2024
ddaeb20
[skip ci] 8.4 | UPGRADING: fix incorrect function names
jrfnl Aug 14, 2024
d2810f5
[skip ci] 8.4 | UPGRADING: add missing constant
jrfnl Aug 14, 2024
390088b
Remove detection of unsupported Windows versions (GH-15399)
cmb69 Aug 14, 2024
25afbdb
GetSystemTimePreciseAsFileTime() is now always available (GH-15400)
cmb69 Aug 14, 2024
53d6ed8
Autotools: Fix typo in FPM TCP_CONNECTION_INFO check (#15411)
petk Aug 14, 2024
059fe6c
ext/standard/php_string.h: Remove declarations that do not have an im…
Girgias Aug 14, 2024
ec2655f
Voidify getfilesystemtime() (GH-15413)
cmb69 Aug 14, 2024
8093893
ext/dba: Remove arg num check prior to ZPP checks (#15401)
Girgias Aug 14, 2024
bca18bc
Autotools: Sync CS in sapi/litespeed (#15409)
petk Aug 14, 2024
f09354e
Autotools: Sync CS in sapi/cli (#15410)
petk Aug 14, 2024
9a70b7c
[ci skip] Update NEWS for PHP 8.4.0 beta2
NattyNarwhal Aug 14, 2024
d5d537b
[ci skip] Update NEWS for PHP 8.4.0 beta3
NattyNarwhal Aug 14, 2024
4a4aae5
Zend/zend_object_handlers.c: Remove unused include
Girgias Aug 14, 2024
04320d2
ext/phar: Use standard C types
Girgias Aug 14, 2024
4b2dc58
Fix format specifiers and arguments in com_dotnet (GH-15398)
cmb69 Aug 15, 2024
1e4ed4a
Autotools: Sync CS in sapi/fuzzer (#15417)
petk Aug 15, 2024
4f4794b
Autotools: Sync CS in fpm SAPI (#15412)
petk Aug 15, 2024
794ba29
Autotools: Fix PHP_EMBED_TYPE variable substitution (#15414)
petk Aug 15, 2024
21fa5e1
ext/session: session_create_id() now throws a ValueError for large pr…
jorgsowa Aug 15, 2024
3e226af
ext/opcache/ZendAccelerator.c: Restrict MD5 header include to Windows…
Girgias Aug 15, 2024
a6b7f13
exit_as_funtion RFC follow-up: ensure default INI settings used in st…
remicollet Aug 15, 2024
b0ac9bf
Explicitly drop support for old clang versions on Windows (GH-15415)
cmb69 Aug 15, 2024
8853cf3
Autotools: Add note about PHP_ADD_EXTENSION_DEP usage
petk Aug 15, 2024
d6afe05
libtool: Don't remove gcov *.gcno files (#15441)
zeriyoshi Aug 16, 2024
2438717
Autotools: Sync CS in sapi/cgi (#15407)
petk Aug 16, 2024
1739653
Autotools: Use AS_* macros in apache2handler SAPI (#15423)
petk Aug 16, 2024
8082567
Autotools: Fix external PCRE JIT check (#15430)
petk Aug 16, 2024
9168b18
Merge branch 'PHP-8.3'
zeriyoshi Aug 16, 2024
14390a0
[ci skip] Update NEWS
zeriyoshi Aug 16, 2024
bb0c325
[ci skip] Update ext/random year for zeriyoshi in EXTENSIONS
zeriyoshi Aug 16, 2024
b5568a0
GH-15440: adding CURLOPT_TCP_KEEPCNT constant (8.9.0) (#15446)
devnexen Aug 16, 2024
d87fd35
Merge branch 'PHP-8.2' into PHP-8.3
zeriyoshi Aug 16, 2024
05d92db
Merge branch 'PHP-8.3'
zeriyoshi Aug 16, 2024
5df1b55
[ci skip] fix NEWS
zeriyoshi Aug 16, 2024
f0d0293
Merge branch 'PHP-8.3'
zeriyoshi Aug 16, 2024
4c5767f
PHP 8.4 | Exit as function: fix incorrect parameter name (#15433)
jrfnl Aug 16, 2024
565a31c
Autotools: Simplify PHP_SELECT_SAPI in apache2handler SAPI (#15444)
petk Aug 16, 2024
a400298
Add hash extension to soap dependencies (#15449)
petk Aug 16, 2024
8db3d36
Autotools: Remove redundant SAPI_SHARED assignment (#15453)
petk Aug 17, 2024
b86dfd7
Remove php_win32_init_gettimeofday declaration (#15451)
petk Aug 17, 2024
b2640ee
Autotools: Replace obsolete backticks with $(...) in apache2handler (…
petk Aug 17, 2024
0064c42
Autotools: Simplify PHP_PDO_DBLIB conditions
petk Aug 17, 2024
a3196b3
Drop support for MYSQL_TEST_SKIP_CONNECT_FAILURE (#15461)
cmb69 Aug 17, 2024
0dfafdb
Remove PHP 6 leftovers and fix mysqli tests (#15464)
kamil-tekiela Aug 17, 2024
a1b1a6c
[skip ci] Remove dead code
Girgias Aug 17, 2024
6050a99
Autotools: Sync CS in pdo_odbc (#15466)
petk Aug 17, 2024
82c4db6
Autotools: Remove PHP_LIBDIR adjustment in pdo_dblib (#15463)
petk Aug 17, 2024
41709ac
Update ext/mbstring and ext/snmp dependencies (#15469)
petk Aug 17, 2024
d472866
Drop erroneous CLEAN section
cmb69 Aug 17, 2024
7e5171d
Clean up mysqli tests (#15473)
kamil-tekiela Aug 17, 2024
8c704ab
ext/bcmath: Optimize `bcdiv` processing (#14660)
SakiTakamachi Aug 18, 2024
7fa2dbf
Drop support for MYSQL_TEST_EXPERIMENTAL (GH-15467)
cmb69 Aug 18, 2024
f16cb18
Fix ZEND_FASTCALL definition wrt. x64 Windows clang builds (GH-15425)
cmb69 Aug 18, 2024
4a77ce2
Remove unnecessary Windows specific time formatting (GH-15474)
cmb69 Aug 18, 2024
dffe25b
Autotools: Move AWK finder to PHP_INIT_BUILD_SYSTEM (#15478)
petk Aug 18, 2024
7a9120e
Avoid multiple connects in SKIPIF sections (GH-15470)
cmb69 Aug 18, 2024
ed2b456
Don't skip tests which are supposed to fail; mark them as xfail (#15472)
cmb69 Aug 18, 2024
80d7846
Add date extension to dependencies (#15475)
petk Aug 18, 2024
d713e36
ext/sockets: adding SO_BINDTOIFINDEX.
devnexen Aug 18, 2024
35ae152
Remove mysqli_change_user_get_lock.phpt (#15482)
kamil-tekiela Aug 18, 2024
3e05c86
ext/standard: Remove deprecated php_uint32 and php_int32 typedefs
Girgias Aug 17, 2024
3813ad1
Remove unused ext/standard/basic_functions.h header inclusions
Girgias Aug 17, 2024
c6e1e30
ext/standard: Throw a RequestParseBodyException instead of InvalidArg…
Girgias Aug 18, 2024
962aba3
ext/standard/mail.c: Reduce scope of some variable declarations
Girgias Aug 13, 2024
312c919
ext/standard/mail.c: change return type of php_mail() to bool
Girgias Aug 13, 2024
a171b20
ext/standard/mail.c: Move macros out of the header
Girgias Aug 12, 2024
ebfef25
ext/standard/mail.c: Move php_mail_header_value_error_type enum out o…
Girgias Aug 12, 2024
ac3cdf5
[skip ci] Add UPGRADING.INTERNALS entry for EXIT opcode
Girgias Aug 18, 2024
c316382
Remove MYSQLI_STMT_ATTR_PREFETCH_ROWS constant (#15485)
kamil-tekiela Aug 19, 2024
8f1c430
Drop mysqli_stmt_result_metadata_sqltests.phpt (#15488)
kamil-tekiela Aug 19, 2024
4baf6a6
Fix error message and add UPGRADING entry
kamil-tekiela Aug 19, 2024
6c7ff08
Drop MYSQLI_CURSOR_TYPE_FOR_UPDATE & MYSQLI_CURSOR_TYPE_SCROLLABLE (#…
kamil-tekiela Aug 19, 2024
144c086
Fix a mistake in mysqli test
kamil-tekiela Aug 19, 2024
770616b
Fix param with hooks but no visibility not treated as cpp (GH-15442)
iluuu1994 Aug 19, 2024
36b1977
Fix missing compile error when declaring hooked props on readonly cla…
iluuu1994 Aug 19, 2024
60f87f2
Fix various hooked object iterator issues (GH-15394)
iluuu1994 Aug 19, 2024
b6d7c01
Fix virtual properties in get_class_vars() (GH-15494)
iluuu1994 Aug 19, 2024
40217b2
Autotools: Move auto_cflags marker to PHP_INIT_BUILD_SYSTEM (#15487)
petk Aug 19, 2024
775ca03
ext/standard/crc32: Use zend_result return type and remove unused header
Girgias Aug 20, 2024
3ed5eee
[skip ci] Fix bug71162.phpt xfail message (GH-15506)
cmb69 Aug 20, 2024
b363a60
Merge branch 'PHP-8.3'
cmb69 Aug 20, 2024
57f02e2
Merge branch 'PHP-8.3'
cmb69 Aug 20, 2024
9684007
Cater to raised requirement of fbclient 3.0+ for pdo_firebird (GH-15498)
cmb69 Aug 20, 2024
b75775e
Revert "Merge branch 'PHP-8.3'"
cmb69 Aug 20, 2024
efe0e73
Merge branch 'PHP-8.3'
cmb69 Aug 20, 2024
3059ada
ext/standard: Improve checking of allowed_classes option (#15267)
Girgias Aug 20, 2024
588029a
[skip ci] Update NEWS/UPGRADING for allowed_classes option checks
Girgias Aug 20, 2024
a2313ce
Merge branch 'PHP-8.3'
cmb69 Aug 20, 2024
c9ea4d7
Revert "Merge branch 'PHP-8.3'"
cmb69 Aug 20, 2024
a1ab846
MySQL 9: Add support for VECTOR type (#15431)
kamil-tekiela Aug 20, 2024
c5ae122
Update UPGRADING
kamil-tekiela Aug 20, 2024
327588a
Replace OBJ_PROP_PTR_TO_NUM() with zend_get_property_info_for_slot()
iluuu1994 Aug 20, 2024
660a860
Fix GH-15501: Windows HAVE_<header>_H macros defined to 1 or undefine…
petk Aug 20, 2024
69d9c12
Fix mysqli_stmt_get_result.phpt (#15495)
kamil-tekiela Aug 20, 2024
d6113ba
fixes #13773: DatePeriod does not take microseconds into account
marc-mabe Jun 16, 2024
0f7aebb
Add NEWS entry
derickr Aug 21, 2024
cce27c6
Merged pull request #14581
derickr Aug 21, 2024
c290996
Remove MYSQLI_TYPE_INTERVAL constant
kamil-tekiela Aug 20, 2024
0775b99
Fix mysqli_fetch_field_types.phpt
kamil-tekiela Aug 20, 2024
d4263dd
Fix rename_variation12*.phpt parallel test conflicts (GH-15518)
cmb69 Aug 21, 2024
369eeb7
ext/standard/file.c: Use RETURN_BOOL() instead of if-else
Girgias Aug 21, 2024
9147687
ext/standard/file.c: Use more appropriate types
Girgias Aug 21, 2024
c69d29e
Merge branch 'PHP-8.3'
petk Aug 21, 2024
602a4ac
Merge branch 'PHP-8.3'
petk Aug 21, 2024
96d572a
Zend: Add helper for "cannot be empty" ValueError
Girgias Aug 18, 2024
e7c4d54
Use new helper function for "cannot be empty" ValueErrors
Girgias Aug 18, 2024
1073814
ext/standard/exec.c: Use ZPP path modifier to check for nul bytes
Girgias Aug 18, 2024
f6c464f
ext/gettext: Remove duplicate domain length checks
Girgias Aug 18, 2024
ad84803
ext/dba: Remove duplicate check for empty mode
Girgias Aug 18, 2024
6d9a74c
ext/dom: Use standard wording for ValueError
Girgias Aug 18, 2024
997199e
ext/standard/string.c: use standard wording for ValueError in str_pad()
Girgias Aug 18, 2024
9a2fdbe
ext/mbstring: Use standard wording for ValueError
Girgias Aug 18, 2024
c811d58
ext/pcntl: Use standard wording for ValueError
Girgias Aug 18, 2024
5853cdb
Use "must not" instead of "cannot" wording
Girgias Aug 20, 2024
6b809c8
Autotools: Fix stack direction check (#15528)
petk Aug 21, 2024
ff69f33
ext/session: Warn when providing invalid values for session.gc_probab…
jorgsowa Aug 22, 2024
450740c
[skip ci] Fix typos in XFAIL reasons
cmb69 Aug 22, 2024
e5a3027
Support AVX-512 builds on Windows (GH-15159)
cmb69 Aug 22, 2024
15ea82d
ext/mysqli: Minor clean-up (#15526)
Girgias Aug 22, 2024
35fbb00
main/network: Use more appropriate types (#15511)
Girgias Aug 22, 2024
6a51062
Drop unused, but confusing macro definition (GH-15541)
cmb69 Aug 22, 2024
e7874f2
Autotools: Move Zend/zend_config.h to AC_CONFIG_COMMANDS (#15538)
petk Aug 22, 2024
4e193b4
Autotools: Move abs_srcdir and abs_builddir to init macro (#15537)
petk Aug 22, 2024
1b3c204
Autotools: Add min-version argument to PHP_PROG_PHP macro (#15477)
petk Aug 22, 2024
c79e723
Autotools: Check re2c version with AS_VERSION_COMPARE (#15465)
petk Aug 22, 2024
0c73553
Update extension skeleton .gitignore (#15542)
zeriyoshi Aug 22, 2024
f952263
Fix Solaris 10 build: missing libproc.h (#15525)
petk Aug 22, 2024
597ec91
wip
nielsdos Aug 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ext/standard: Minor refactoring to URL scanner code (php#15321)
  • Loading branch information
Girgias authored Aug 10, 2024
commit edc88ee62962b61c18c7a904da62b829fecf5872
14 changes: 7 additions & 7 deletions ext/standard/url_scanner_ex.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ PHP_MSHUTDOWN_FUNCTION(url_scanner_ex);
PHP_RINIT_FUNCTION(url_scanner_ex);
PHP_RSHUTDOWN_FUNCTION(url_scanner_ex);

PHPAPI char *php_url_scanner_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen, int encode);
PHPAPI int php_url_scanner_add_session_var(const char *name, size_t name_len, const char *value, size_t value_len, int encode);
PHPAPI int php_url_scanner_reset_session_var(zend_string *name, int encode);
PHPAPI int php_url_scanner_reset_session_vars(void);
PHPAPI int php_url_scanner_add_var(const char *name, size_t name_len, const char *value, size_t value_len, int encode);
PHPAPI int php_url_scanner_reset_var(zend_string *name, int encode);
PHPAPI int php_url_scanner_reset_vars(void);
PHPAPI char *php_url_scanner_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen, bool encode);
PHPAPI zend_result php_url_scanner_add_session_var(const char *name, size_t name_len, const char *value, size_t value_len, bool encode);
PHPAPI zend_result php_url_scanner_reset_session_var(zend_string *name, int encode);
PHPAPI zend_result php_url_scanner_reset_session_vars(void);
PHPAPI zend_result php_url_scanner_add_var(const char *name, size_t name_len, const char *value, size_t value_len, bool encode);
PHPAPI zend_result php_url_scanner_reset_var(zend_string *name, int encode);
PHPAPI zend_result php_url_scanner_reset_vars(void);

#include "zend_smart_str_public.h"

Expand Down
94 changes: 45 additions & 49 deletions ext/standard/url_scanner_ex.re
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ static void tag_dtor(zval *zv)
free(Z_PTR_P(zv));
}

static int php_ini_on_update_tags(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage, int type)
static zend_result php_ini_on_update_tags(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage, bool is_session)
{
url_adapt_state_ex_t *ctx;
char *key;
char *tmp;
char *lasts = NULL;

if (type) {
if (is_session) {
ctx = &BG(url_adapt_session_ex);
} else {
ctx = &BG(url_adapt_output_ex);
Expand Down Expand Up @@ -102,22 +102,22 @@ static int php_ini_on_update_tags(zend_ini_entry *entry, zend_string *new_value,

static PHP_INI_MH(OnUpdateSessionTags)
{
return php_ini_on_update_tags(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, 1);
return php_ini_on_update_tags(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ true);
}

static PHP_INI_MH(OnUpdateOutputTags)
{
return php_ini_on_update_tags(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, 0);
return php_ini_on_update_tags(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ false);
}

static int php_ini_on_update_hosts(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage, int type)
static zend_result php_ini_on_update_hosts(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage, bool is_session)
{
HashTable *hosts;
char *key;
char *tmp;
char *lasts = NULL;

if (type) {
if (is_session) {
hosts = &BG(url_adapt_session_hosts_ht);
} else {
hosts = &BG(url_adapt_output_hosts_ht);
Expand Down Expand Up @@ -152,12 +152,12 @@ static int php_ini_on_update_hosts(zend_ini_entry *entry, zend_string *new_value

static PHP_INI_MH(OnUpdateSessionHosts)
{
return php_ini_on_update_hosts(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, 1);
return php_ini_on_update_hosts(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ true);
}

static PHP_INI_MH(OnUpdateOutputHosts)
{
return php_ini_on_update_hosts(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, 0);
return php_ini_on_update_hosts(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ false);
}

/* FIXME: OnUpdate*Hosts cannot set default to $_SERVER['HTTP_HOST'] at startup */
Expand Down Expand Up @@ -349,7 +349,7 @@ static inline void passthru(STD_PARA)
}


static int check_http_host(char *target)
static zend_result check_http_host(char *target)
{
zval *host, *tmp;
zend_string *host_tmp;
Expand All @@ -375,7 +375,7 @@ static int check_http_host(char *target)
return FAILURE;
}

static int check_host_whitelist(url_adapt_state_ex_t *ctx)
static zend_result check_host_whitelist(url_adapt_state_ex_t *ctx)
{
php_url *url_parts = NULL;
HashTable *allowed_hosts = ctx->type ? &BG(url_adapt_session_hosts_ht) : &BG(url_adapt_output_hosts_ht);
Expand Down Expand Up @@ -583,7 +583,7 @@ stop:
}


PHPAPI char *php_url_scanner_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen, int encode)
PHPAPI char *php_url_scanner_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen, bool encode)
{
char *result;
smart_str surl = {0};
Expand Down Expand Up @@ -647,26 +647,24 @@ static char *url_adapt_ext(const char *src, size_t srclen, size_t *newlen, bool
return retval;
}

static int php_url_scanner_ex_activate(int type)
static void php_url_scanner_ex_activate(bool is_session)
{
url_adapt_state_ex_t *ctx;

if (type) {
if (is_session) {
ctx = &BG(url_adapt_session_ex);
} else {
ctx = &BG(url_adapt_output_ex);
}

memset(ctx, 0, XtOffsetOf(url_adapt_state_ex_t, tags));

return SUCCESS;
}

static int php_url_scanner_ex_deactivate(int type)
static void php_url_scanner_ex_deactivate(bool is_session)
{
url_adapt_state_ex_t *ctx;

if (type) {
if (is_session) {
ctx = &BG(url_adapt_session_ex);
} else {
ctx = &BG(url_adapt_output_ex);
Expand All @@ -677,16 +675,14 @@ static int php_url_scanner_ex_deactivate(int type)
smart_str_free(&ctx->tag);
smart_str_free(&ctx->arg);
smart_str_free(&ctx->attr_val);

return SUCCESS;
}

static inline void php_url_scanner_session_handler_impl(char *output, size_t output_len, char **handled_output, size_t *handled_output_len, int mode, int type)
static inline void php_url_scanner_session_handler_impl(char *output, size_t output_len, char **handled_output, size_t *handled_output_len, int mode, bool is_session)
{
size_t len;
url_adapt_state_ex_t *url_state;

if (type) {
if (is_session) {
url_state = &BG(url_adapt_session_ex);
} else {
url_state = &BG(url_adapt_output_ex);
Expand Down Expand Up @@ -720,15 +716,15 @@ static inline void php_url_scanner_session_handler_impl(char *output, size_t out

static void php_url_scanner_session_handler(char *output, size_t output_len, char **handled_output, size_t *handled_output_len, int mode)
{
php_url_scanner_session_handler_impl(output, output_len, handled_output, handled_output_len, mode, 1);
php_url_scanner_session_handler_impl(output, output_len, handled_output, handled_output_len, mode, /* is_session */ true);
}

static void php_url_scanner_output_handler(char *output, size_t output_len, char **handled_output, size_t *handled_output_len, int mode)
{
php_url_scanner_session_handler_impl(output, output_len, handled_output, handled_output_len, mode, 0);
php_url_scanner_session_handler_impl(output, output_len, handled_output, handled_output_len, mode, /* is_session */ false);
}

static inline int php_url_scanner_add_var_impl(const char *name, size_t name_len, const char *value, size_t value_len, int encode, int type)
static inline void php_url_scanner_add_var_impl(const char *name, size_t name_len, const char *value, size_t value_len, bool encode, bool is_session)
{
smart_str sname = {0};
smart_str svalue = {0};
Expand All @@ -739,7 +735,7 @@ static inline int php_url_scanner_add_var_impl(const char *name, size_t name_len
php_output_handler_func_t handler;
bool should_start = false;

if (type) {
if (is_session) {
url_state = &BG(url_adapt_session_ex);
handler = php_url_scanner_session_handler;
} else {
Expand All @@ -748,10 +744,10 @@ static inline int php_url_scanner_add_var_impl(const char *name, size_t name_len
}

if (!url_state->active) {
php_url_scanner_ex_activate(type);
php_url_scanner_ex_activate(is_session);
should_start = true;
url_state->active = 1;
url_state->type = type;
url_state->type = is_session;
}

if (url_state->url_app.s && ZSTR_LEN(url_state->url_app.s) != 0) {
Expand Down Expand Up @@ -792,27 +788,27 @@ static inline int php_url_scanner_add_var_impl(const char *name, size_t name_len
if (should_start) {
php_output_start_internal(ZEND_STRL("URL-Rewriter"), handler, 0, PHP_OUTPUT_HANDLER_STDFLAGS);
}

return SUCCESS;
}


PHPAPI int php_url_scanner_add_session_var(const char *name, size_t name_len, const char *value, size_t value_len, int encode)
PHPAPI zend_result php_url_scanner_add_session_var(const char *name, size_t name_len, const char *value, size_t value_len, bool encode)
{
return php_url_scanner_add_var_impl(name, name_len, value, value_len, encode, 1);
php_url_scanner_add_var_impl(name, name_len, value, value_len, encode, /* is_session */ true);
return SUCCESS;
}


PHPAPI int php_url_scanner_add_var(const char *name, size_t name_len, const char *value, size_t value_len, int encode)
PHPAPI zend_result php_url_scanner_add_var(const char *name, size_t name_len, const char *value, size_t value_len, bool encode)
{
return php_url_scanner_add_var_impl(name, name_len, value, value_len, encode, 0);
php_url_scanner_add_var_impl(name, name_len, value, value_len, encode, /* is_session */ false);
return SUCCESS;
}


static inline void php_url_scanner_reset_vars_impl(int type) {
static inline void php_url_scanner_reset_vars_impl(bool is_session) {
url_adapt_state_ex_t *url_state;

if (type) {
if (is_session) {
url_state = &BG(url_adapt_session_ex);
} else {
url_state = &BG(url_adapt_output_ex);
Expand All @@ -827,21 +823,21 @@ static inline void php_url_scanner_reset_vars_impl(int type) {
}


PHPAPI int php_url_scanner_reset_session_vars(void)
PHPAPI zend_result php_url_scanner_reset_session_vars(void)
{
php_url_scanner_reset_vars_impl(1);
php_url_scanner_reset_vars_impl(true);
return SUCCESS;
}


PHPAPI int php_url_scanner_reset_vars(void)
PHPAPI zend_result php_url_scanner_reset_vars(void)
{
php_url_scanner_reset_vars_impl(0);
php_url_scanner_reset_vars_impl(false);
return SUCCESS;
}


static inline int php_url_scanner_reset_var_impl(zend_string *name, int encode, int type)
static inline zend_result php_url_scanner_reset_var_impl(zend_string *name, int encode, bool is_session)
{
char *start, *end, *limit;
size_t separator_len;
Expand All @@ -854,7 +850,7 @@ static inline int php_url_scanner_reset_var_impl(zend_string *name, int encode,
bool sep_removed = 0;
url_adapt_state_ex_t *url_state;

if (type) {
if (is_session) {
url_state = &BG(url_adapt_session_ex);
} else {
url_state = &BG(url_adapt_output_ex);
Expand Down Expand Up @@ -911,7 +907,7 @@ static inline int php_url_scanner_reset_var_impl(zend_string *name, int encode,
}
/* Remove all when this is the only rewrite var */
if (ZSTR_LEN(url_state->url_app.s) == end - start) {
php_url_scanner_reset_vars_impl(type);
php_url_scanner_reset_vars_impl(is_session);
goto finish;
}
/* Check preceding separator */
Expand All @@ -933,7 +929,7 @@ static inline int php_url_scanner_reset_var_impl(zend_string *name, int encode,
if (!start) {
/* Should not happen */
ret = FAILURE;
php_url_scanner_reset_vars_impl(type);
php_url_scanner_reset_vars_impl(is_session);
goto finish;
}
/* Get end of form var */
Expand Down Expand Up @@ -961,15 +957,15 @@ finish:
}


PHPAPI int php_url_scanner_reset_session_var(zend_string *name, int encode)
PHPAPI zend_result php_url_scanner_reset_session_var(zend_string *name, int encode)
{
return php_url_scanner_reset_var_impl(name, encode, 1);
return php_url_scanner_reset_var_impl(name, encode, /* is_session */ true);
}


PHPAPI int php_url_scanner_reset_var(zend_string *name, int encode)
PHPAPI zend_result php_url_scanner_reset_var(zend_string *name, int encode)
{
return php_url_scanner_reset_var_impl(name, encode, 0);
return php_url_scanner_reset_var_impl(name, encode, /* is_session */ false);
}


Expand Down Expand Up @@ -1000,7 +996,7 @@ PHP_RINIT_FUNCTION(url_scanner)
PHP_RSHUTDOWN_FUNCTION(url_scanner)
{
if (BG(url_adapt_session_ex).active) {
php_url_scanner_ex_deactivate(1);
php_url_scanner_ex_deactivate(true);
BG(url_adapt_session_ex).active = 0;
BG(url_adapt_session_ex).tag_type = 0;
BG(url_adapt_session_ex).attr_type = 0;
Expand All @@ -1009,7 +1005,7 @@ PHP_RSHUTDOWN_FUNCTION(url_scanner)
smart_str_free(&BG(url_adapt_session_ex).url_app);

if (BG(url_adapt_output_ex).active) {
php_url_scanner_ex_deactivate(0);
php_url_scanner_ex_deactivate(false);
BG(url_adapt_output_ex).active = 0;
BG(url_adapt_output_ex).tag_type = 0;
BG(url_adapt_output_ex).attr_type = 0;
Expand Down