Commit Graph

67639 Commits

Author SHA1 Message Date
Jorg Adam Sowa
21fa5e15f9
ext/session: session_create_id() now throws a ValueError for large prefix (#15338) 2024-08-15 11:10:18 +01:00
Christoph M. Becker
4b2dc58651
Fix format specifiers and arguments in com_dotnet (GH-15398)
This is mostly about minor glitches (signedness or length confusion),
but also fixes two occasions where `zend_string`s still have been
regarded as `char *`.

We also add a regression test case for failing property name lookup,
since that is the most relevant issue we're fixing here.
2024-08-15 10:59:10 +02:00
Gina Peter Bnayard
04320d2fba ext/phar: Use standard C types 2024-08-15 01:02:33 +02:00
Gina Peter Banyard
8093893496
ext/dba: Remove arg num check prior to ZPP checks (#15401) 2024-08-14 20:20:11 +01:00
Gina Peter Banyard
059fe6c28b
ext/standard/php_string.h: Remove declarations that do not have an implementation (#15402)
This was overlooked, by my younger self, in GH-8195.
2024-08-14 20:04:51 +01:00
Christoph M. Becker
390088bf55
Remove detection of unsupported Windows versions (GH-15399)
Windows 2008 and Vista are no longer supported as of PHP 7.2.0, and
Windows 2008 R2 and Windows 7 are no longer supported as of PHP 8.3.0.
Therefore we remove the respective detection code, and assert that
these versions can no longer be used.
2024-08-14 19:52:47 +02:00
Tim Düsterhus
a2a3c5ba8a
hash: Consistently check for PHP_HASH_INTRIN_SHA_* to guard compilation of SHA256_Transform_shani (#15404)
This fixes the build for amd64 platforms that do not have
`HAVE_FUNC_ATTRIBUTE_TARGET`, specifically Alpine/Musl as of now.

Closes GH-15384.
Related to GH-15312.
2024-08-14 15:18:07 +02:00
Gina Peter Banyard
74bf894950
ext/standard/info.c: Throw ValueErrors on invalid inputs to php_uname() (#15385) 2024-08-14 13:20:26 +01:00
Gina Peter Banyard
a79c70f574
[RFC] Convert exit (and die) from language constructs to functions (#13483)
RFC: https://wiki.php.net/rfc/exit-as-function
2024-08-14 12:44:12 +01:00
Gina Peter Banyard
02177848e4
Replace uses of php_dirname() with zend_dirname() (#15393)
This removes some needs to include the php_string.h header
2024-08-14 12:35:47 +01:00
Ilija Tovilo
65a101f3a7
Disable LSAN for crashing SOAP tests (GH-14562) 2024-08-14 11:44:03 +02:00
Peter Kokot
b56f81cddc
Add configure phase dependencies to mysqlnd extension (#15380)
The hash extension is required in mysqlnd extension for using sha
functions when extended SSL is enabled (MYSQLND_HAVE_SSL).
2024-08-14 01:18:28 +02:00
Gina Peter Bnayard
0b8fbacd58 ext/standard/info.c: Remove unreachable conditional branch 2024-08-13 22:26:14 +02:00
David Carlier
445ea01edf
Merge branch 'PHP-8.3' 2024-08-13 20:57:21 +01:00
David Carlier
f1e5c63837
Checks getrandom availability on solaris.
To fix part of GH-15381.
gcc nor clang provides a constant to distinguish illumos and solaris
not the system provides a kernel version stamp like the BSD.
thus, we simply check the symbol and remaing purposely conservative in
the existing logic, using it only for solaris to avoid unexpected
breakages for other systems. would need a different fix for higher
branches.

Close GH-15390
2024-08-13 20:54:12 +01:00
David Carlier
5c9c275743
Checks getrandom availability on solaris.
To fix part of GH-15381.
gcc nor clang provides a constant to distinguish illumos and solaris
not the system provides a kernel version stamp like the BSD.
thus, we simply check the symbol and remaing purposely conservative in
the existing logic, using it only for solaris to avoid unexpected
breakages for other systems. would need a different fix for higher
branches.

Close GH-15390
2024-08-13 20:50:15 +01:00
Christoph M. Becker
56703e5390
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test expectation
2024-08-13 19:25:04 +02:00
Christoph M. Becker
1b52ecd78a
Fix test expectation 2024-08-13 19:23:53 +02:00
Gina Peter Bnayard
d63caf006b ext/standard/info.c: Minor refactoring to php_get_uname() 2024-08-13 15:57:26 +01:00
Gina Peter Bnayard
ac7ed28573 ext/standard/info.c: Minor refactoring to php_get_windows_name() 2024-08-13 15:57:26 +01:00
Gina Peter Bnayard
e0f6e3de34 ext/standard/info.c: Make some functions static 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
5078eb080e ext/standard/info.c: Use size_t type where appropriate 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
739805d099 ext/standard/info.c: Removed php_info_html_esc() 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
67a15cf457 ext/standard/head.c: Change return type of php_header() to bool 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
2297e50772 ext/standard/head.c: Remove some useless casts
The field type is size_t
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
91aca96a8e ext/standard/filters.c: Use bool type where possible for persistent field/param 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
9cfe9e10ba ext/standard/filters.c: Use zend_result return type instead of int 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
2baadf3807 ext/standard/filters.c: Voidify php_conv_base64_decode_ctor()
It always returned SUCCESS
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
54cc76fdb4 ext/standard/filters.c: Remove some register keywords 2024-08-13 14:10:06 +02:00
Máté Kocsis
587110c5bf
Deprecate Soft-deprecated DOMDocument and DOMEntity properties (#15369)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#formally_deprecate_soft-deprecated_domdocument_and_domentity_properties
2024-08-13 12:39:20 +01:00
Peter Kokot
a6d7d5234b
Autotools: Fix pdo_firebird shared build (#15371)
Follow-up of GH-15230:

- Redundant variables removed
- Redundant duplicate middle newlines removed
- PHP_CXX_COMPILE_STDCXX macro arguments quoted
- When extension is built as shared the PHP_ADD_SOURCES works
  differently, and PHP_ADD_SOURCES_X needs to be used so this can be
  used:

    ./configure --with-pdo-firebird=shared
2024-08-13 10:36:26 +02:00
Peter Kokot
3b24b853ec
Autotools: Sync CS in ext/pdo_firebird (#15372)
- Obsolete backticks replaced with the recommended $(...)
- AS_VAR_IF used
2024-08-13 10:33:57 +02:00
Peter Kokot
540b9f5bc7
Autotools: Wrap long texts with m4_text_wrap (#15368)
The m4_text_wrap macro wraps the text into a single space separated
string which is wrapped to not exceed the line lenght of 79 characters
by default.
2024-08-13 10:33:17 +02:00
David Carlier
d052d612d9
ext/sockets: adding SOCK_CLOEXEC/SOCK_NONBLOCK options.
targetted for socket_create_pair/socket_create, they re not considered
as socket type but to be ORed with these (to avoid socketpair2/socket2
likely), set O_CLOEXEC/O_NONBLOCK respectively on the file descriptors.

close GH-15322
2024-08-13 08:35:44 +01:00
Simonov Denis
225034dbbc
pdo_firebird: Formatting time zone types
As a follow-up to the commit which introduced support for Firebird 4.0+
data types[1], we add support for formats for types with time zones.

Since this uses the newer Firebird C++ API, pdo_firebird now requires a
C++ compiler to be built.

[1] <https://github.com/php/php-src/pull/14897>

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-15230.
2024-08-13 01:25:48 +02:00
Christoph M. Becker
266192372c
Skip fb4_datatypes*.phpt for Firebird server < 4.0.0 (GH-15354)
Using a newer fbclient version with an older server is generally
supported, and as such we must not only skip these tests for older
fbclients, but also for older servers.

In lack of some readily available function, we're querying the server
to find its version.
2024-08-13 00:14:23 +02:00
Arnaud Le Blanc
81150187fb
Ensure proper alignment of zend_accel_shared_globals.interned_strings (#15359) 2024-08-12 21:43:43 +02:00
Peter Kokot
8c4f019cc6
Autotools: Sync CS in gd extension (#15364)
- Obsolete PHP_* variables checks removed (there was once the 'pdf'
  extension bundled in PHP that also had the same --with-*-dir configure
  options (3be17e3f26). When combined with
  the gd extension, options need to be executed conditionally; first one
  won), this is no longer relevant neither recommended practice to
  duplicate configure options inside the php-src context. Ideally,
  all configure options should be prefixed with an extension namespace
  --with-<extension-name>-<option> to be unique.
- AS_* macros used
2024-08-12 21:38:30 +02:00
Gina Peter Banyard
f5ae5ac804
ext/standard: Throw ValueErrors in str_getcsv() for invalid inputs (#15365)
This was forgotten when adjusting the behaviour of other CSV functions
2024-08-12 17:56:02 +01:00
Gina Peter Bnayard
6114379ad2 ext/gmp: Refactor gmp_import_export_validate() 2024-08-12 17:30:10 +02:00
Gina Peter Bnayard
f8626638c4 ext/gmp: Use zend_string to GMP object function directly 2024-08-12 17:30:10 +02:00
Gina Peter Bnayard
d74b513f68 ext/gmp: Add test about manually (un)serializing 2024-08-12 17:30:10 +02:00
Gina Peter Banyard
c818d944cf
ext/(standard|spl): Deprecate passing a non-empty string as the $enclosure parameter (#15362) 2024-08-12 16:09:56 +01:00
Ayesh Karunaratne
81b49cd062
ext/curl: Add HTTP/3 constants (#15350)
This intends to supersede the two following PRs:
 - #12000 because it does not modify the stub file, but only update the
   arginfo file. It also proposes to merge to GA branches, and is
   currently marked as Requires RM Approval.
 - #12543 Essentially the same as this PR and from the same author, as
   this, but its about a year old and requires rebasing anyway.

This adds the `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY`
constants on relevant versions (7.66 and 7.88 respectively).

It is possible to use HTTP/3 without having these constants declared,
but having them declared in PHP makes things more approachable and
"official".
2024-08-12 14:26:24 +01:00
Peter Kokot
6cb6cc6f74
Autotools: Refactor iconv implementation checks (#15357)
This uses AS_* macros and checks for an iconv implementation in a single
cache check block for easier configure log output and possible future
adjustments when iconv is built-in the C library (like on Alpine and
some other systems where it isn't recognized as such yet exactly).
2024-08-12 14:43:24 +02:00
Peter Kokot
d334382eb8
[skip ci] Fix typo s/dissasembly/disassembly 2024-08-12 14:37:22 +02:00
Kamil Tekiela
8ca8d7750d
Deprecate MYSQLI_REFRESH_* constants (#15358) 2024-08-12 13:24:32 +01:00
Peter Kokot
cdf0a9b9a0
Autotools: Use AS_CASE in ext/pdo_odbc (#15355) 2024-08-12 14:21:20 +02:00
Kamil Tekiela
e6ecd83ea5
Update arginfo for mysqli and spl_fixedarray (#15356) 2024-08-12 13:37:30 +02:00
Peter Kokot
9fcc1bca8a
Remove redundant middle newlines in "Autotools" related files
This syncs few minor left-overs in "Autotools" related files:
- redundant middle newlines removed (in man pages the duplicate newlines
  are also ignored and are not visible in the man page anyway)
- Minor mixed indentation synced

[skip ci]
2024-08-12 13:18:32 +02:00
Peter Kokot
634708a14f
Add pcre as a configure step dependency to fileinfo (#15349)
The pcre is a required dependency in fileinfo extenstion. This marks it
as a configure step dependency for consistency with other extensions
and to have extensions properly sorted in the generated
internal_functions* files.
2024-08-12 00:17:29 +02:00
Peter Kokot
693ec809b9
Autotools: Remove PDO dependency related errors (#15347)
Follow-up of GH-15344 (687eb9125a)

This removes the customized error messages in PDO extensions when PDO is
not enabled (--disable-all or --disable-pdo) in favor of the default
error done by PHP_ADD_EXTENSION_DEP.
2024-08-11 21:35:36 +02:00
Gina Peter Banyard
4f58d5b0df
ext/mysqli: Deprecate passing the parameter to mysqli_store_result() (#15311)
And deprecate the MYSQLI_STORE_RESULT_COPY_DATA constant.

RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_the_second_parameter_to_mysqli_store_result
2024-08-11 19:25:35 +01:00
Gina Peter Banyard
857ce2c9e0
ext/mysqli: Mark return type as zend_return (#15345) 2024-08-11 19:24:53 +01:00
Peter Kokot
bb35da336d
Autotools: Sync CS in extensions (#15343)
- Redundant double quotes removed
- AS_* macros used
- Few nits adjusted here and there
2024-08-11 17:42:26 +02:00
Peter Kokot
687eb9125a
Autotools: Remove dependency related errors (#15344)
- ext/dom
- ext/xsl

These use the PHP_ADD_EXTENSION_DEP macro which throws error when one of
the dependencies is disabled or not configured properly.

For example:
    ./configure --disable-all --enable-dom

or
    ./configure --disable-all --with-xsl

Will throw default PHP dependency error info, when using
PHP_ADD_EXTENSION_DEP.

These errors were once done when PHP_ADD_EXTENSION_DEP macro wasn't yet
available.
2024-08-11 17:39:31 +02:00
Gina Peter Bnayard
5d1db3dd56 ext/mysqli: Improve variable name and type 2024-08-11 17:27:09 +02:00
Gina Peter Bnayard
c2bdb31b6a ext/mysqli: Remove PHP 6 remnants 2024-08-11 17:27:09 +02:00
Gina Peter Bnayard
0c827f6b25 ext/mysqli: Use an assertion for condition that is checked by ZPP 2024-08-11 17:27:09 +02:00
Gina Peter Bnayard
efd33f57c7 ext/mysqli: mysqli_report() only ever returns true 2024-08-11 17:27:09 +02:00
Gina Peter Banyard
1950d661ea
ext/mysqli: Mark function pointer as returning zend_result (#15342) 2024-08-11 15:47:57 +01:00
Jorg Adam Sowa
c4eccf33e9
ext/session: session.save_handler - add tests fortwo uncovered cases (#15337) 2024-08-11 15:39:56 +01:00
Peter Kokot
f2e50eb61f
Autotools: Sync CS in ext/pcntl (#15341)
- AC_CHECK_TYPE long list of arguments split into a newline
- Long lists in AC_CHECK_DECLS can be split across multiple lines, even
  without m4_normalize, but the end quote needs to be done properly
  after the last item without space or newline. Here the m4_normalize
  ensures all trailing blanks are trimmed and having the possibility to
  put the ending quotes on newlines also
2024-08-11 15:12:37 +02:00
Gina Peter Bnayard
caae950ff7 ext/xml: Add an explicit test case about unsetting a handler with empty string 2024-08-11 15:00:27 +02:00
Peter Kokot
b0091c4172
Autotools: Sync CS in opcache extension (#15340)
- AS_* macros used
- Overquoted AC_RUN_IFELSE macros arguments reduced
- Redundant double quoted single variables assignments removed
- i*86 and x86* patterns joined into a single case
2024-08-11 14:51:27 +02:00
Jorg Adam Sowa
6bf7b7220d
ValueError on null byte in session_name() (#15286) 2024-08-11 13:26:54 +01:00
Peter Kokot
a5f8cbd93d
Autotools: Refactor mysql_config checks in pdo_mysql (#15336)
- Scattered if blocks moved together as PDO_MYSQL_UNIX_ADDR is defined
  only when mysql_config is available
- Obsolete backticks command substitutions `...` replaced with the
  recommended $(...)
2024-08-11 12:18:27 +02:00
Niels Dossche
e1c8329b8c Update TODOs in com_dotnet 2024-08-10 23:24:26 +02:00
Niels Dossche
3f54be8053 Get rid of le_dispatch 2024-08-10 23:24:26 +02:00
Niels Dossche
b7be849fad Get rid of le_istream 2024-08-10 23:24:26 +02:00
David Carlier
1d198c660c
ext/sockets: controlling ephemeral port ranges on *BSD.
whether ephemeral ports are onto the privileged low port ranges
     or a range more fit for restricted scenarios.

close GH-15335
2024-08-10 22:16:51 +01:00
Peter Kokot
e5f6387569
Autotools: Refactor pdo_mysql checks (#15334)
- Main checks wrapped in AS_CASE
- s/UNIX/Unix
- Redundant MYSQL_SOCK variable removed
2024-08-10 21:52:38 +02:00
Gina Peter Banyard
edc88ee629
ext/standard: Minor refactoring to URL scanner code (#15321) 2024-08-10 20:12:54 +01:00
Niels Dossche
8d7365b6f0
Fix GH-15331: dom: Element::$substitutedNodeValue test failed
Bug in libxml, amend test to accept both outputs.
2024-08-10 19:43:21 +02:00
Christoph M. Becker
9b41c8b1b5
Declare gdImageGetInterpolationMethod() for bundled GD (GH-15329)
When this function has been added to our bundled GD[1], it had been
overlooked to also declare it in gd.h, like it's done in libgd.  While
MSVC doesn't have any issues with this, clang reports an error.

[1] <03bd4333f6>
2024-08-10 16:57:48 +02:00
Niels Dossche
db5ea45f0f
Fix incorrect type check in removeAttributeNode 2024-08-10 16:31:23 +02:00
Christoph M. Becker
9c537de8a5
Fix some -Wimplicit-function-declaration errors on Windows (GH-15325)
While clang is picky about these, MSVC doesn't seem to care and would
only report the calls to undeclared functions as errors during link
time.  Still, obviously, MSVC is fine with having the declarations
during compile time.
2024-08-10 16:25:28 +02:00
Arnaud Le Blanc
c02c1d4474
Change YIELD/YIELD_FROM to do not increment opline (#15328)
YIELD and YIELD_FROM increment opline before returning, but in most places
we need the opline to point to the YIELD and YIELD_FROM.

Here I change YIELD / YIELD_FROM to not increment opline. This simplifies the
code and fixes GH-15275 in a better way.

Closes GH-15328
2024-08-10 16:09:47 +02:00
Niels Dossche
0122be574a
Simplify document standalone setter (#15320)
The logic was very weird as it just should check whether the boolean is
true or not. And in fact the code is equivalent because zval_get_long()
will only return 0/1 because the type is a bool, and ZEND_NORMALIZE_BOOL
won't change that value.
2024-08-10 15:35:04 +02:00
Christoph M. Becker
ee02e4be6a
Fix violation of the one definition rule in ext/com_dotnet (GH-15327)
The definition of the class entries in the internal header file is not
correct, since that file is included several times, and even the
comment above the definition hints at com_extension.c where the actual
definition is.  We fix this by declaring these variables as `extern`.
2024-08-10 15:27:32 +02:00
David Carlier
d5c7f3b0e6
ext/standard: enabling feature detection auxiliary vector on OpenBSD.
close gh-15175
2024-08-10 12:36:10 +01:00
Peter Kokot
fcd4d391fa
Autotools: Refactor mysqli extension checks (#15323)
- AS_* macros used
- s/UNIX/Unix
- The --with-mysql result value moved into the check when extension is
  enabled
- List of source files normalized with m4_normalize
- Redundant variables omitted
- CS synced
2024-08-10 10:08:17 +02:00
Peter Kokot
dbdc79df95
Autotools: Fix SNMP checks (#15263)
This is a follow-up of GH-15242
(0b25e26b4e)

because the usmHMAC192SHA256AuthProtocol and usmHMAC384SHA512AuthProtocol
are not functions but arrays. The AC_CHECK_DECL might be more
appropriate and portable way to find these.
2024-08-10 09:15:28 +02:00
Kamil Tekiela
7801f40449
Deprecate mysqli_kill (#11926) 2024-08-09 19:50:35 +02:00
Gina Peter Banyard
42497c1ea5
ext/soap: Deprecate passing an int to SoapServer::addFunction() (#15310)
Also deprecate SOAP_FUNCTIONS_ALL constant.

RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_soap_functions_all_constant_and_passing_it_to_soapserveraddfunction
2024-08-09 17:41:02 +01:00
Kamil Tekiela
cbcad9fdaf
Deprecate mysqli_ping (#11945) 2024-08-09 18:32:21 +02:00
Peter Kokot
3a30c29d73
Autotools: Add pkg-config support for NET-SNMP library (#15261)
NET-SNMP has pkg-config support since 5.8.1

This optionally finds the NET-SNMP library using pkg-config or falls
back to find library on the system with net-snmp-config. The configure
option argument (--with-snmp=DIR) works like before (path to the
net-snmp-config).

When explicitly using the DIR argument, the pkg-config check is silently
skipped.

When not using DIR argument, the SNMP_CFLAGS and SNMP_LIBS can be also
used to find the NET-SNMP library:

    ./configure --with-snmp \
        SNMP_CFLAGS=-I/path/to/net-snmp/include \
        SNMP_LIBS="-L/path/to/net-snmp -lnetsnmp"

Co-authored-by: Calvin Buckley <calvin@cmpct.info>
2024-08-09 18:08:32 +02:00
Peter Kokot
8044db121f
Update mysql preprocessor macros help texts (#15288)
This adds missing help texts for preprocessor macros defined in
mysqli and pdo_mysql extensions.

[skip ci]
2024-08-09 18:07:05 +02:00
Peter Kokot
72fb00b644
Update gd extension preprocessor macros help texts (#15296)
PHP_GD_CHECK_FORMAT macro 2nd argument is changed from automatic
AC_DEFINE_UNQUOTED to manual action for easier usage.
2024-08-09 18:06:02 +02:00
Gina Peter Banyard
1e3d918936
ext/core: Deprecate passing E_USER_ERROR to trigger_error() (#15308)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
2024-08-09 15:51:07 +01:00
Kamil Tekiela
42336e1359
Deprecate mysqli_refresh (#11929) 2024-08-09 15:47:49 +01:00
Peter Kokot
bd77462c7c
Update sqlite3 and pdo_sqlite preprocessor macros help texts (#15291) 2024-08-09 14:51:05 +02:00
Ilija Tovilo
46ee0fb304
Disallow indirect modification on readonly properties within __clone() (#15012)
Indirect modification isn't allowed in __construct() because it allows
references to leak, so it doesn't make much sense to allow it in __clone().
2024-08-09 11:56:16 +02:00
Ilija Tovilo
7a2d5efa0f
[JIT] Avoid generating fast property assign path for readonly properties (#15260)
readonly properties will usually be IS_UNDEF on assignment, dodging the fast
path anyway. The fast path does not handle the readonly scope check. The
alternative would be handling scope there, but since there are some many
variants that might be more trouble than it's worth.
2024-08-09 11:49:40 +02:00
Peter Kokot
42c9963133
Autotools: Quote PHP_CXX_COMPILE_STDCXX macro arguments
[skip ci]
2024-08-09 10:39:16 +02:00
Peter Kokot
e8f2e530b0
Autotools: Sync CS in hash extension (#15302)
- AS_* macros used
- list of source files added to argument directly and normalized with
  m4_normalize()
- hash_sha3.c source file simplified
2024-08-09 01:45:50 +02:00
Gina Peter Banyard
25b4696530
ext/xml: Deprecate xml_set_object() and passing non-callable strings as handlers (#15293) 2024-08-08 23:37:49 +01:00
Tim Düsterhus
6eca7839af
hash: Add SHA-NI implementation of SHA-256 (#15152)
* hash: Add SSE2 implementation of SHA-256

Implementation taken from
tarsnap/libcperciva@661752aee8.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>

* zend_cpuinfo: Add ZEND_CPU_FEATURE_SHA

* hash: Add SHA-NI implementation of SHA-256

Implementation taken from
tarsnap/libcperciva@661752aee8.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

* NEWS / UPGRADING

---------

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2024-08-08 22:19:33 +02:00
Gina Peter Banyard
c8b45aa59a
ext/spl: Follow-up on GH-9704 (#15295)
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2024-08-08 19:31:51 +01:00
Gina Peter Banyard
bb2836eced
ext/dba: Deprecate passing null|false to dba_key_split() (#15297)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_null_and_false_to_dba_key_split
2024-08-08 18:59:30 +01:00
Niels Dossche
746b1cf43e
Access long value directly for call to count() in simplexml (#15278)
Because the signature is checked at compile time, we know that the only
possible return value (if there is no exception) is IS_LONG. So we can
avoid some work.
2024-08-08 19:28:03 +02:00
Tyson Andre
43def0af46
Deprecate SplFixedArray::__wakeup() (#9704)
GH-9354 added the `__serialize` and `__unserialize` method,
so unserialize() and other unserializers will call `__unserialize`
instead of `__wakeup` for SplFixedArray and userland subclasses.

RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_splfixedarraywakeup
2024-08-08 16:16:42 +01:00
Peter Kokot
80ae7f7979
Update pgsql extensions preprocessor macros help texts (#15290)
[skip ci]
2024-08-08 16:14:43 +02:00
Peter Kokot
bf5de048e0
Update ext/tidy preprocessor macros help texts (#15269)
[skip ci]
2024-08-08 08:29:43 +02:00
Peter Kokot
f661223685
Update ext/sodium preprocessor macro help texts (#15270)
The sodium extension was initially named "libsodium" in PECL and was
renamed to sodium when it was bundled to php-src. The HAVE_LIBSODIUMLIB
symbol here could indicate that PHP extension sodium is available.

Otherwise the macro is not used in the current code base. Header
php_libsodium.h became "installed"/public as of PHP-8.4.

[skip ci]
2024-08-08 08:27:22 +02:00
David Carlier
f503cc0234
Merge branch 'PHP-8.3' 2024-08-07 22:38:48 +01:00
David Carlier
cad0ce5382
CI disable leak sanitizer on two libedit tests temporarily.
the libedit dependency has a leak on wcsdup call on ubuntu focal

close GH-15279
2024-08-07 22:38:30 +01:00
Peter Kokot
ca57d763ce
Update ext/zip preprocessor macros help texts (#15271)
[skip ci]
2024-08-07 17:03:59 +02:00
Niels Dossche
027b210d42
Merge branch 'PHP-8.3'
* PHP-8.3:
  Revert "Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)"
2024-08-07 10:04:58 +02:00
Niels Dossche
1d56340831
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Revert "Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)"
2024-08-07 10:03:35 +02:00
Niels Dossche
28290655e8
Revert "Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)"
This reverts commit 476706165a.

Although the fix is correct, people are relying on the bug and their
code stopped working, see GH-15252.
2024-08-07 10:03:12 +02:00
Peter Kokot
a49e0a42a1
Autotools: Quote AC_PATH_PROG arguments in ext/pdo_firebird
[skip ci]
2024-08-07 09:19:40 +02:00
Peter Kokot
5fc68d8bab
Update preprocessor macros help texts for enchant and snmp extensions (#15255)
[skip ci]
2024-08-06 23:22:28 +02:00
Niels Dossche
74eff98c84
Deprecate passing incorrect data types for options to ext/hash functions (#15236)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_incorrect_data_types_for_options_to_exthash_functions
2024-08-06 19:13:09 +02:00
Quentin Dreyer
7b32a145d9
Fix GH-15155: Keep stream context in filtered streams
Closes GH-15156
2024-08-06 16:42:33 +01:00
Christoph M. Becker
9c4aa2b4fc
Output diagnostics when SQLFetch with SQL_ERROR
These diagnostics can be useful, and if not for users, at least for the
ext/odbc maintainers.  We only call `odbc_sql_error()` if the previous
`SQLFetch()` or `SQLFetchExtended()` return `SQL_ERROR`, because
otherwise the diagnostic would be unhelpful ("Failed to fetch error
message, SQL state HY000").

Note that the diagnostic is emitted as `E_WARNING` so technically this
is a small BC break.

Closes GH-15256.
2024-08-06 16:59:47 +02:00
Christoph M. Becker
0ca3018887
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix odbc_data_source_001.phpt
2024-08-06 16:55:57 +02:00
Christoph M. Becker
e811bff3bb
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix odbc_data_source_001.phpt
2024-08-06 16:54:58 +02:00
Christoph M. Becker
6713d51631
Fix odbc_data_source_001.phpt
As of PHP 8.1.0, passing `null` to an `int` parameter is deprecated,
and as such the deprecation notice breaks the test.  So we instead pass
an integer, and to avoid hard-coding a value we just add the two
supported constants (which are supposed to have the values `1` and `2`,
respectively).

Closes GH-15254.
2024-08-06 16:54:19 +02:00
David CARLIER
b9da6cb3a2
ext/standard: disable one ipv2long test. (#15200)
atypical leading zeros are accepted on this platform.
2024-08-06 12:26:19 +01:00
Peter Kokot
0c3b7677f9
Autotools: Add pkg-config for GMP library (#15166)
GMP has pkg-config integration since 2019-08-22 (version ~6.2.0).

This optionally finds the GMP library using pkg-config or falls back to
find library on the system or with the provided configure option
argument (--with-gmp=DIR).

When using DIR argument, the pkg-config check is silently skipped.

When not using DIR argument, the GMP_CFLAGS and GMP_LIBS can be also
used to find the GMP library:

        ./configure --with-gmp \
            GMP_CFLAGS=-I/path/to/gmp/include \
            GMP_LIBS="-L/path/to/gmp -lgmp"
2024-08-06 10:16:42 +02:00
Peter Kokot
da5362c9b8
Autotools: Add ext/readline preprocessor macros help texts (#15241)
This adds the missing macros help texts for easier understanding. The
AC_DEFINE can be called with only 2 arguments if there is another
definition in the code where template (see AH_TEMPLATE Autoconf macro)
is read by autoheader (the 2nd AC_DEFINE sets the template for all other
definitions with the same name).
2024-08-06 09:21:58 +02:00
Niels Dossche
bb299a03e9
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix crash when converting array data for array in shm in xxh3
2024-08-05 22:07:06 +02:00
Niels Dossche
c38c6acfa8
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix crash when converting array data for array in shm in xxh3
2024-08-05 22:07:01 +02:00
Niels Dossche
ca84662c87
Fix crash when converting array data for array in shm in xxh3
Closes GH-15237.
2024-08-05 22:06:11 +02:00
Niels Dossche
a0c29f0889
Use unsigned int instead of int for refcount for libxml objects (#15247) 2024-08-05 22:04:24 +02:00
Niels Dossche
0c7cd92414
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix SoapFault property destruction
2024-08-05 22:04:10 +02:00
Niels Dossche
e681d933d4
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix SoapFault property destruction
2024-08-05 22:03:21 +02:00
Niels Dossche
11fbe8801b
Fix SoapFault property destruction
Two issues:
1) We should not modify the object when we pass invalid values
2) We should reset the properties to their default value otherwise we
   get a UAF.

Regressed in df219ccf9d

Closes GH-15248.
2024-08-05 22:02:51 +02:00
Tim Düsterhus
31e2d2b86c
random: Optimize Randomizer::getBytes() (#15228)
This patch greatly improves the performance for the common case of using a
64-bit engine and requesting a length that is a multiple of 8.

It does so by providing a fast path that will just `memcpy()` (which will be
optimized out) the returned uint64_t directly into the output buffer,
byteswapping it for big endian architectures.

The existing byte-wise copying logic was mostly left alone. It only received an
optimization of the shifting and masking that was previously applied to
`Randomizer::getBytesFromString()` in 1fc2ddc996.

Co-authored-by: Saki Takamachi <saki@php.net>
2024-08-05 19:12:29 +02:00
Peter Kokot
11094d5f24
[skip ci] Fix typo in ext/gd 2024-08-05 16:23:38 +02:00
Peter Kokot
9049d86a78
[skip ci] Fix typo in ext/gd 2024-08-05 16:22:36 +02:00
Peter Kokot
cff39cc400
[skip ci] Fix typo 2024-08-05 16:15:19 +02:00
Peter Kokot
0b25e26b4e
Fix bug #51558: shared readline build fails (#15242)
The 'rl_pending_input' is a variable in Readline library and checking it
with PHP_CHECK_LIBRARY wouldn't find it on some systems.

Library check works on most systems but not on the mentioned AIX in the
bug as it exports variables and functions differently whereas the linker
couldn't resolve the variable as a function.

This should fix the build on systems where this caused issues, such as
AIX.

The <readline/readline.h> is not self-contained header and needs to also
have <stdio.h> included before to have FILE type available. This fixes
the issue on unpatched default readline installations, such as macOS.

Checking this variable ensures that the found library is the correct
library and also that it is of minimum version needed by current PHP
code (https://bugs.php.net/48608).

The library check:

```c
| char rl_pending_input ();
| int main (void) {
|     return rl_pending_input ();
| }
```

The declaration check:

```c
| #include <stdio.h>
| #include <readline/readline.h>
| int main (void) {
| #ifndef rl_pending_input
| #ifdef __cplusplus
|     (void) rl_pending_input;
| #else
|     (void) rl_pending_input;
| #endif
| #endif
| ;
|     return 0;
| }
```

Closes https://bugs.php.net/51558
2024-08-05 15:54:50 +02:00
Peter Kokot
31f256492e
Add and update ext/odbc preprocessor macros help texts (#15223) 2024-08-05 10:12:16 +02:00
Peter Kokot
8bfcbdc5ee
Fix HAVE_LIBGD usage (#15226)
When PHP gd extension uses the external system GD library, the
HAVE_LIBGD preprocessor macro gets defined in Autotools. On Windows it
was previously always defined when bundled library is used. This fixes
the usage and adds help texts.
2024-08-05 09:35:13 +02:00
Peter Kokot
125190186e
Autotools: Check for cross_compiling=yes (#15238)
The cross_compiling variable can initially be "yes", "no", or
"maybe" (when only --host option is added). Autoconf otherwise after
AC_PROG_CC resets it to "no" in such case but to be sure, this
checks for value "yes" instead. The HAVE_FNMATCH template can be also
set after the AC_DEFINE as autoheader scans the templates overall the
source code.
2024-08-05 08:52:09 +02:00
Niels Dossche
d9eb3783bd
Remove DOMImplementation::getFeature() (#15233)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_domimplementationgetfeature_feature_version
2024-08-04 23:30:52 +02:00
Peter Kokot
77ad57c6c6
Add and update ext/dba preprocessor macros help texts (#15221) 2024-08-04 23:23:38 +02:00
Niels Dossche
0aec0faa27
Deprecate DOM_PHP_ERR (#15234)
* Deprecate DOM_PHP_ERR

RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_dom_php_err_constant

* Apply suggestions from code review

Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>

---------

Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2024-08-04 22:00:01 +02:00
Peter Kokot
97eb89afd6
Autotools: Improve --with-mm configure option check (#15212)
The mm check code block needs to done only when session is enabled to
prevent redundant mm library linkage in edge case mistakes like:

    ./configure --disable-session --with-mm

CS is synced with AC_* macros. The 'm4_text_wrap' macro joins the given
text with single space characters and limits it to 79 characters width.

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-08-04 21:16:15 +02:00
Niels Dossche
f0b3e3bac7
[ci skip] Fix typo in test file name 2024-08-04 20:32:01 +02:00
Jorg Adam Sowa
b9fef523c1
Deprecate date_sunrise and date_sunset constants (#12978)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
2024-08-04 20:07:52 +02:00
Tim Düsterhus
49d0d7bcd7
standard: Stop using php_combined_lcg() in uniqid() (#15217)
Fall back to the fallback generator if the CSPRNG fails instead. This removes
the last internal user of `php_combined_lcg()`.
2024-08-04 18:26:40 +02:00
Tim Düsterhus
6910167c48
random: Remove engine_combinedlcg.c (#15216)
The standalone engine cannot be usefully used for any other purpose. Remove it
and inline the implementation into the `php_combined_lcg()` function.
2024-08-04 18:26:15 +02:00
Tim Düsterhus
e8ff7c70f9
session: Deprecate session.sid_length and session.sid_bits_per_character (#15213)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
2024-08-04 18:25:31 +02:00
Tim Düsterhus
f5f9294153
random: Deprecate lcg_value() (#15211)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
2024-08-04 18:24:21 +02:00
Tim Düsterhus
ecd11b9687
unserialize: Deprecate the 'S' tag (#12309)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
2024-08-04 18:23:19 +02:00
Peter Kokot
d6a75e19d1
Sync preprocessor macros help texts (#15218)
This partially syncs help texts a bit further for:
- ext/ffi
- ext/ldap
- ext/opcache
- ext/pcre
- ext/pdo_mysql
- ext/readline
- ext/standard
2024-08-04 12:52:16 +02:00
Peter Kokot
f16ab75171
Refactor HAVE_SQLDATASOURCES check (#15222)
On Windows, this preprocessor macro is moved to odbc extension, in
Autotools check CS is synced and some basic help text is added.
2024-08-04 11:57:01 +02:00
Peter Kokot
dcdcb3cbfe
Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209)
This replaces the AC_MSG_ERROR with AC_MSG_FAILURE, where appropriate.

The AC_MSG_ERROR outputs given message and exits the configure step. The
AC_MSG_FAILURE does the same but also automatically outputs additional
message "See 'config.log' for more details." which might help directing
the user where to look further.

The AC_MSG_ERROR is used for errors where current test step isn't logged
in the config.log and wouldn't make sense, and AC_MSG_FAILURE is mostly
used in cases of library checks, compilation tests, headers checked with
AC_CHECK_HEADER* and similar tests that are also logged in the
config.log.

AC_MSG_ERROR([Sanity check failed.]) output:

```
configure: error: Sanity check failed.
```

AC_MSG_FAILURE([Sanity check failed.]) output:

```
configure: error: in '/path/to/php-src':
configure: error: Sanity check failed.
See 'config.log' for more details
```
2024-08-04 07:36:37 +02:00
Peter Kokot
cf6bbdfb0c
Autotools: Improve ftp and mysqlnd SSL configure options (#15164)
This makes the configure log messages and help text more intuitive what
is being enabled and when.
2024-08-03 22:13:36 +02:00
Peter Kokot
4f07cdc584
Replace PHP_OUTPUT with AC_CONFIG_FILES (#15186)
This is a follow-up of GH-15177
(c96f08aa70)
and GH-15185
(9467ffb43c)

The PHP_OUTPUT macro was introduced in the very early phase of the build
system due to AC_OUTPUT handling issues in the old Autoconf versions
before the AC_CONFIG_FILES, AC_CONFIG_COMMANDS etc were introduced with
the AC_OUTPUT signature without arguments. The PHP_OUTPUT was also
helping Makefile.in back then being properly generated based on whether
all files were generated or only some (when using the obsolete
CONFIG_FILES=... ./config.status invocation instead of the new
./config.status --file=...). Another issue is that PHP_OUTPUT can't be
used by extensions when using phpize.

This replaces the PHP_OUTPUT invocations with default AC_CONFIG_FILES.

The obsolete "REDO_ALL" feature at the config.status invocation is also
removed with a simpler unconditional generation.

In phar extension the "ext/phar" is replaced with $ext_dir variable to
be able to use phpize.
2024-08-03 21:52:14 +02:00
Peter Kokot
16d9bd0aae
Sync AC_DEFINE help texts (#15207) 2024-08-03 09:47:39 +02:00
Niels Dossche
3ad9f4d441
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15179: Segmentation fault (null pointer dereference) in ext/standard/url_scanner_ex.re
2024-08-03 02:05:44 +02:00
Niels Dossche
9913b83ce5
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15179: Segmentation fault (null pointer dereference) in ext/standard/url_scanner_ex.re
2024-08-03 02:05:35 +02:00
Niels Dossche
67ce8759e8
Fix GH-15179: Segmentation fault (null pointer dereference) in ext/standard/url_scanner_ex.re
Based on analysis by Ilija: https://github.com/php/php-src/issues/15179#issuecomment-2261546902

* Apply suggestions from code review

Closes GH-15206.

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2024-08-03 02:05:06 +02:00
Niels Dossche
e119c72894
Add a test for setting the innerHTML on a prefixed XML element (#15204) 2024-08-03 00:14:04 +02:00
Niels Dossche
76ad89ccff
Fix GH-15192: Segmentation fault in dom extension (html5_serializer)
When cloning a document, doc will not be equal to the actual new
document clone->doc. clone->doc will always point to the correct
document so use that instead when comparing document nodes.

Closes GH-15198.
2024-08-02 18:22:17 +02:00
Ilija Tovilo
85fa983fe6
Add ReflectionProperty::getSettableType() test for get-only backed property
Fix test name while we're at it.
2024-08-02 17:48:08 +02:00
Ilija Tovilo
2e9cc9bc30
Allow optimizer to depend on preloaded symbols (#15021)
* Allow optimizer to depend on preloaded symbols

It is safe for the optimizer to rely on preloaded symbols. This can occur when
compiling non-preloaded files, referencing preloaded ones.

* Disable inline pass for observer test

* Move duplicated code into functions

* Add comment to specific optimization value

* Optimizer should only rely on preloaded symbols in the symbol table

* Fix skipif for windows
2024-08-02 17:35:27 +02:00
Peter Kokot
f66feaec0f
Sync HAVE_<extension> help texts (#15167)
This syncs all help texts of extension preprocessor macros to the same
style "Define to 1 if the PHP extension '<ext>' is available.".
[skip ci]
2024-08-02 01:41:47 +02:00
Peter Kokot
079f82a8ec
Sync CPP macros in ext/iconv (#15191)
This syncs and adds help texts for CPP macros defined when iconv
extension is configured.
2024-08-02 00:49:18 +02:00
Peter Kokot
eed66e6183
Autotools: Fix ffi checks (#15197)
When libffi is installed on non-default places, also the calling
convention checks need adjusted compilation flags to be able to find the
ffi.h header file.
2024-08-02 00:32:36 +02:00
Peter Kokot
28a7c6243c
[skip ci] Add HAVE_XSL_EXSLT help text (#15174) 2024-08-01 00:46:20 +02:00
Tim Düsterhus
a578c27a51
Improve link styling in PHPInfo (#15077)
* Improve link styling in PHPInfo

The previous styling with the fixed background color didn't work well in dark
mode. Remove the background and make links inherit the regular text color. To
make them visually detectable the underlining behavior is reversed. The
underline is now shown when not hovering and hidden when hovering.

* Preserve the headline linking behavior
2024-07-31 12:10:16 +02:00
David CARLIER
b7e43bd2b7
ext/readline: readline_info fix usage when the buffer is not initialised (#15139)
rl_initialise is only called when readline() is used so the global
 buffer might not be initialised yet.
2024-07-31 11:04:44 +01:00
Niels Dossche
3c68661ec9
Minor cleanup in dom_character_data_append_data (#15173) 2024-07-30 23:05:12 +02:00
Niels Dossche
ceca599649
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix UAF when removing doctype and using foreach iteration
2024-07-30 20:07:48 +02:00
Niels Dossche
4049594adf
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix UAF when removing doctype and using foreach iteration
2024-07-30 20:03:30 +02:00
Niels Dossche
b282dd749f
Fix UAF when removing doctype and using foreach iteration
This is an old bug, but this is pretty easy to fix.
It's basically applying the same fix as I did for e878b9f.
Reported by YuanchengJiang.

Closes GH-15143.
2024-07-30 20:01:22 +02:00
Saki Takamachi
60afeb5537
RFC: Change GMP bool cast behavior (#15151)
Implementation of "RFC: Change GMP bool cast behavior"

https://wiki.php.net/rfc/fix_up_bcmath_number_class

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2024-07-31 00:41:49 +09:00
Peter Kokot
79af1b5280
Autotools: Remove unused variable FREETYPE2_FOUND
Follow-up of 19d8a6b771.
2024-07-30 11:25:24 +02:00
Peter Kokot
8356dadb59
Autotools: Fix xml extension dependency (#15162)
The PHP_ADD_EXTENSION_DEP Autoconf macro needs to be called after
PHP_NEW_EXTENSION to be fully effective. This simplifies the code and
checks. Also, due to the current order_by_dep.awk script implementation
it needs to be on its own line with arguments unquoted so that awk can
parse the config.m4 file. Until order_by_dep.awk script is fixed.
2024-07-30 09:17:11 +02:00
Peter Kokot
0970fd439a
Autotools: Sync CS in enchant extension 2024-07-30 07:54:32 +02:00
Peter Kokot
8c18ae7899
Autotools: Sync CS in bz2 extension (#15163)
- AS_* macros used
- Checking message refactored
2024-07-30 07:52:48 +02:00
Peter Kokot
4d46f26327
Autotools: Update skeleton extension config.m4 template (#15147)
- Comments refactored to a bit more guide way
- Basic help text added to the HAVE_<EXTENSION>* preprocessor macro definitions
- Raw shell ifs replaced with AS_VAR_IF M4 macros
- Code wrapped inside the line length of 80 characters
- pkg-config functionality added on top
- non-pkg-config functionality added afterwards
- The loop refactored a bit with a break and check message done
  afterwards

[skip ci]
2024-07-30 00:48:19 +02:00
Dmitry Stogov
53b329e278
Fix GH-15101: _ir_RSTORE: Assertion `ctx->control' (#15153) 2024-07-29 19:17:25 +03:00
Saki Takamachi
28080dce62
round(): Corrected test name and fixed UPGRADING (#14943)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2024-07-29 20:39:35 +09:00
Peter Kokot
7fd54f9d12
Remove duplicate ZEND_ENABLE_STATIC_TSRMLS_CACHE flag (#15080) 2024-07-29 10:17:23 +02:00
Peter Kokot
9ea290b72b
Sync HAVE_ICONV preprocessor macro usage (#15148)
HAVE_ICONV marks that PHP extension 'iconv' is available, and not only
that iconv library or its functions/headers are available.
2024-07-29 10:12:57 +02:00
Peter Kokot
7d927075ea
Autotools: Sync shared argument CS (#15141)
The 3rd argument of the PHP_NEW_EXTENSION can be "shared" or "yes" to
mark the extension as shared, or anything else to mark that extension as
not shared. This syncs the argument values across the build system to be
"no" as in other always-enabled extensions.
2024-07-29 10:12:32 +02:00
Peter Kokot
9cc63e1de9
Autotools: Normalize headers arguments (#15149)
Refactor all "long" arguments into blank-or-newline-separated list of
files with m4_normalize.
2024-07-29 10:08:17 +02:00
Peter Kokot
f3c48f1acd
Autotools: Append hash and opcache build directories (#15132)
When building in out-of-source directory, instead of creating these
build directories right away, this appends them to the list and creates
them at the end of configure phase. These don't need to be created
immediately as no files are generated in these extensions before the
configure phase is finished.

Also, the PHP_ADD_BUILD_DIR is moved after the PHP_NEW_EXTENSION when
the more common $ext_builddir variable is available (the ext/<extension>
isn't available when building with phpize).
2024-07-29 10:02:11 +02:00
Peter Kokot
1ceadaed52
Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144)
This adds Autoconf quote characters to all PHP_NEW_EXTENSION arguments
and syncs the CS across the php-src Autotools build system.
2024-07-29 00:14:59 +02:00
Pol Dellaiera
664c1d18df
Fix: add missing PHPAPI (#15142)
Issue introduced in commit 5905857fd2 from PR https://github.com/php/php-src/pull/14833
2024-07-28 20:38:52 +02:00
Niels Dossche
e0a2e2e59c
Fix GH-15123: var_dump doesn't actually work on XMLReader (#15130) 2024-07-28 19:36:07 +02:00
Peter Kokot
2b97c84d4c
Autotools: Quote PHP_CHECK_LIBRARY arguments (#15136)
This syncs the quotes across the PHP_CHECK_LIBRARY macro arguments.
2024-07-28 18:39:14 +02:00
David Carlier
a7d856d9bf
ext/readline: fix global readline vars when updating rl_line_buffer.
if the new value was larger, rl_line_buffer_length was never updated.
neither was rl_end (on unixes).

close GH-15120
2024-07-28 14:12:26 +01:00
Niels Dossche
177fd88452
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix CI failure on macOS after Curl update
2024-07-28 14:34:47 +02:00
Niels Dossche
9f570163b3
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix CI failure on macOS after Curl update
2024-07-28 14:34:35 +02:00
Niels Dossche
fdae7c23f0
Fix CI failure on macOS after Curl update 2024-07-28 14:34:26 +02:00
Gina Peter Banyard
a50adda19e
ext/gmp: Make GMP class final (#15121)
* ext/gmp: Make GMP class final

RFC: https://wiki.php.net/rfc/gmp-final

* Update UPGRADING

Co-authored-by: Peter Kokot <peterkokot@gmail.com>

---------

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
2024-07-28 13:03:26 +01:00
Niels Dossche
9d7e6090df
Fix GH-15137: Unexpected null pointer in Zend/zend_smart_str.h (#15138)
This regressed when I optimized $wholeText. The previous code used xmlStrcat
which implicitly checked for a NULL argument, but now it's a direct memcpy
which you shouldn't pass null pointers to, although it won't result in a
crash because memcpy doesn't do anything if the length is 0.
2024-07-28 13:53:30 +02:00
Peter Kokot
dee29442ba
Autotools: Fix ext/standard sources (#15131)
This appends source files to the PHP_NEW_EXTENSION call and adds the
possible compilation flag -DZEND_ENABLE_STATIC_TSRMLS_CACHE when
building objects as done on all ext/standard sources already. Also, the
PHP_EXT_DIR Autoconf macro doesn't accept any argument.
2024-07-28 10:12:17 +02:00
Peter Kokot
590786adb3
Autotools: Replace PHP_EXT_DIR with $ext_dir (#15133)
- Sync Autoconf syntax
- The PHP_EXT_DIR macro doesn't accept any arguments and since this is
  called after PHP_NEW_EXTENSION, the $ext_dir variable can be used
  instead.
2024-07-28 10:09:26 +02:00
Peter Kokot
32210ce967
Autotools: Sync CS in XML related extensions (#15110)
- PHP_SETUP_LIBXML arguments quoted
- Help texts updated for HAVE_LIBXML, HAVE_DOM, HAVE_XMLREADER,
  HAVE_XMLWRITER, HAVE_SOAP, HAVE_SIMPLEXML, and HAVE_XML CPP macros
- Duplicate HAVE_LIBXML symbol definition in PHP_SETUP_LIBXML M4 macro
  removed (the HAVE_LIBXML marks that PHP libxml extension is available and
  not only that libxml2 library is available)
2024-07-27 22:48:51 +02:00
Niels Dossche
5270ada34c
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix nightly failure in test variation due to number of temp variables varying when observers are enabled
2024-07-27 16:37:14 +02:00
Niels Dossche
950d010cc5
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix nightly failure in test variation due to number of temp variables varying when observers are enabled
2024-07-27 16:37:09 +02:00
Niels Dossche
4df858602a
Fix nightly failure in test variation due to number of temp variables varying when observers are enabled 2024-07-27 16:37:01 +02:00