Commit Graph

137693 Commits

Author SHA1 Message Date
Dmitry Stogov
eb87de1c87
Fix GH-15502: Crash with JIT and Excimer (#15601) 2024-08-27 21:12:29 +03:00
Dmitry Stogov
f0f1724fb9
Remove unintended ZEND_EXT_API usage (#15602) 2024-08-27 21:11:54 +03:00
David Carlier
c4ae645849
Follow-up on GH-15548: curl_multi_select.
throws a ValueError on timeout overflow.

close GH-15594
2024-08-27 17:05:55 +01:00
Saki Takamachi
8f3dc78da1
[ci skip] Update NEWS for PHP 8.4.0 beta4 2024-08-27 23:19:37 +09:00
Simonov Denis
8487ddb8a3
pdo_firebird: Cleanup code (GH-15510)
Since we're requiring fbclient >= 3.0 anyway, we:

* Remove unneeded `#if FB_API_VER >= 25`, `#if FB_API_VER >= 30`,
  `#ifdef SQL_BOOLEAN`

* Simplify support for new types for query input parameters.
  Support force_null for them.

* fbclient 3.0+ does not have a limit on the length of a SQL query of 64 KB.
  The new limit is 10 MB, no one in their right mind would transmit a query of such length.
2024-08-27 11:35:04 +02:00
David Carlier
3ed884fab7
[ci skip] NEWS 2024-08-27 04:59:06 +01:00
David Carlier
f7186a06e5
Merge branch 'PHP-8.3' 2024-08-27 04:57:45 +01:00
David Carlier
618edb5e15
Merge branch 'PHP-8.2' into PHP-8.3 2024-08-27 04:57:13 +01:00
David Carlier
cc67220ea3
Fixed GH-15547: curl_multi_wait expects a signed int for timeout.
confusion might come from the previous argument type.
PHP expects ms so we check it fits integer boundaries before the cast.
raising a warning at least for stable branches.

close GH-15548
2024-08-27 04:56:32 +01:00
Ilija Tovilo
93799629dc
[skip ci] Add missing UPGRADING note for a-vis 2024-08-27 02:06:38 +02:00
Ilija Tovilo
8df557ac42
[RFC] Asymmetric visibility v2 (GH-15063)
Co-authored-by: Larry Garfield <larry@garfieldtech.com>
2024-08-27 02:04:48 +02:00
Peter Kokot
fef55bc8e4
Autotools: Fix tidy library checks (#15576)
When configuring with tidy library installed in non-standard paths, the
library adding macro must be done before the PHP_CHECK_LIBRARY to be
able to detect it. This fixes these edge cases. For example:

    ./configure --with-tidy=/path/to/custom-tidy-installation
2024-08-27 00:00:20 +02:00
Niels Dossche
baac01f594 Improve virtual property error message
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2024-08-26 21:17:49 +02:00
Niels Dossche
6c63c48a7e Use virtual annotation in XMLReader
All properties of XMLReader are virtual and therefore don't need backing
storage.
2024-08-26 21:17:49 +02:00
Niels Dossche
f78d5cfcd2 Allow ZEND_ACC_VIRTUAL to be used to not have property backing storage without resorting to hooks
This is useful to reduce the memory usage of objects that don't actually
use the backing storage. Examples are XMLReader and DOM. When the
properties were added to the stubs, these objects became much much
bigger, which is a waste of memory.

Closes GH-11644.

Work towards GH-13988.
2024-08-26 21:17:49 +02:00
Ilija Tovilo
606eb849bb
Stop recording of trace when encountering hook
Fixes GH-15178
2024-08-26 17:27:50 +02:00
Ilija Tovilo
b839c5f1af
Fix building of callgraph including preloaded symbols (GH-15545)
This issue was introduced in GH-15021. When building the call graph, we can now
see preloaded functions. However, building the call graph involves adding the
function to the caller list of the callee, which we don't want to do for
functions not coming from the script.

Fixes GH-15490
2024-08-26 17:22:04 +02:00
Florian Engelhardt
b9b317afd4
Export opcache shared globals (#15543) 2024-08-26 14:54:36 +02:00
Ayesh Karunaratne
a3b7cc2217
ext/curl: Add CURLOPT_PREREQFUNCTION (#13255)
Curl >= 7.80.0 supports declaring a function for `CURLOPT_PREREQFUNCTION` option
that gets called after Curl establishes a connection (including the TLS handshake
for HTTPS connections), but before the actual request is made.

The callable must return either `CURL_PREREQFUNC_OK` or `CURL_PREREQFUNC_ABORT` to
allow or abort the request.

This adds support for it to PHP with required ifdef.

 - libc: https://curl.se/libcurl/c/CURLOPT_PREREQFUNCTION.html

Co-authored-by: Gina Peter Bnayard <girgias@php.net>
2024-08-26 13:33:16 +01:00
^_^
555b603d23
mysqlnd: support ER_CLIENT_INTERACTION_TIMEOUT (#13618) 2024-08-26 12:52:26 +09:00
Ayesh Karunaratne
f61aad8f32
[skip ci] UPGRADING: Note Phar::setAlias()/setDefaultStub() return type changes (#15566)
Follow-up to GH-15426 (6836cae)

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-08-25 21:35:38 +01:00
Peter Kokot
3f4028d3d9
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15587: Autotools: fix configure check for aarch64 CRC32 API
2024-08-25 18:02:25 +02:00
Peter Kokot
5c44610093
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15587: Autotools: fix configure check for aarch64 CRC32 API
2024-08-25 18:01:33 +02:00
Bernd Kuhls
5947db6bb8
Fix GH-15587: Autotools: fix configure check for aarch64 CRC32 API
On arm32 bit the check succeeds leading to a build error later on:

/home/autobuild/autobuild/instance-3/output-1/build/php-8.3.10/ext/standard/crc32.c:70:12:
 error: 'armv8-a' does not support feature 'nothing'
   70 | #   pragma GCC target ("+nothing+crc")

Co-authored-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[http://lists.busybox.net/pipermail/buildroot/2024-August/761151.html]
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
2024-08-25 18:00:29 +02:00
Peter Kokot
fefa7d8c07
Autotools: Sync CS in ext/phar (#15586) 2024-08-25 17:26:21 +02:00
Peter Kokot
f88e32d4b5
Autotools: Simplify adding tidy cflags (#15577) 2024-08-25 17:25:54 +02:00
Niels Dossche
690ce6d5d4
Fix GH-15570: Segmentation fault (access null pointer) in ext/dom/html5_serializer.c
Closes GH-15572.
2024-08-25 15:09:30 +02:00
Niels Dossche
2ca4f31bc7
Update Lexbor (#15573)
Updates Lexbor to lexbor/lexbor@31d86445d0
2024-08-25 14:19:11 +02:00
Niels Dossche
904e8dc197
Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] Fix mistake in UPGRADING
2024-08-25 13:19:16 +02:00
Niels Dossche
cd6bac7f9f
[ci skip] Fix mistake in UPGRADING 2024-08-25 13:19:03 +02:00
Kamil Tekiela
195d59a83c Remove dead code 2024-08-25 10:32:50 +02:00
Kamil Tekiela
2446500d97 Remove unsupported mysqlnd options 2024-08-25 10:32:50 +02:00
Kamil Tekiela
082b964dfa Remove ifdefs from stub file 2024-08-25 10:32:50 +02:00
Peter Kokot
207ae12f59
Autotools: Sync CS in ext/tidy (#15561)
- AS_* macros used
- When TIDY_DIR is not set error out in its own "if" sentence
- break 2 used instead of break to exit also the first for loop
2024-08-24 23:17:22 +02:00
Kamil Tekiela
c5bce0d8a2
Deprecate disabling use_only_cookies (#13578) 2024-08-24 16:33:45 +02:00
Orlando Thöny
9c267778d2
FPM: Remove usage of non-existing MAX_LINE_LENGTH constant (#5634) 2024-08-24 15:26:58 +01:00
Flavio Heleno
67aac59cfc
Add PHP-FPM memory peak to the scoreboard
Closes #14153
2024-08-24 15:25:18 +01:00
Niels Dossche
a092bcb4d7
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15565: --disable-ipv6 during compilation produces error EAI_SYSTEM not found
2024-08-24 14:16:40 +02:00
Niels Dossche
8da94cfc41
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15565: --disable-ipv6 during compilation produces error EAI_SYSTEM not found
2024-08-24 14:14:57 +02:00
Niels Dossche
4b6575a1f9
Fix GH-15565: --disable-ipv6 during compilation produces error EAI_SYSTEM not found
Closes GH-15567.
2024-08-24 14:14:20 +02:00
Máté Kocsis
8d12f666ae
Fix registration of internal readonly child classes (#15459)
Currently, internal classes are registered with the following code:

INIT_CLASS_ENTRY(ce, "InternalClass", class_InternalClass_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ...;

This has worked well so far, except if InternalClass is readonly. It is because some inheritance checks are run by zend_register_internal_class_ex before ZEND_ACC_READONLY_CLASS is added to ce_flags.

The issue is fixed by adding a zend_register_internal_class_with_flags() zend API function that stubs can use from now on. This function makes sure to add the flags before running any checks. Since the new API is not available in lower PHP versions, gen_stub.php has to keep support for the existing API for PHP 8.3 and below.
2024-08-24 12:36:54 +02:00
Peter Kokot
6351468a5e
Autotools: Replace break 2 with break (#15563)
As there is not nested loop here, a single break can do as well.
2024-08-24 00:49:13 +02:00
Peter Kokot
dc8f18af0b
Fix GH-15534: Bump minimum libxml2 version to 2.9.4 (#15536)
The xmlDictPtr was moved before the includes in libxml2 2.9.4 so the
<libxml/dict.h> can be included directly but for earlier versions the
<libxml/tree.h> needs to be included before. Since PHP requires libxml2
2.9.0 or later and this also fixes builds on Solaris 10.

As earlier 2.9.0-2.9.3 libxml2 versions also include several security
issues, this change bumps the required minimum libxml2 version to 2.9.4

On Windows, a check for minimum libxml2 version is also added.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2024-08-23 23:14:38 +02:00
Peter Kokot
2cbde5ae77
Autotools: Use a no-op command in PKG_CHECK_MODULES (#15562)
Instead of using a space for the "do nothing" command in the
PKG_CHECK_MODULES 2nd argument when libexslt is not found, the no-op
command ":" is perhaps a bit clearer and is in most cases used in such
scenarios and macro arguments.
2024-08-23 22:35:59 +02:00
Peter Kokot
2e3132b3fd
Autotools: Sync CS in ext/standard (#15560)
- Overquoted arguments reduced
- Added missing quotes in algorithms checks
- Synced indentations for algorithms checks
2024-08-23 22:30:09 +02:00
Gina Peter Banyard
01c6b48e31
Phar offset exist issue with entry classes not based on PharFileInfo (#14503)
* ext/phar: expand test to cover issue with offsetGet

* ext/phar: offsetExists should return false when file entry is not based on PharFileInfo
2024-08-23 21:06:28 +01:00
Niels Dossche
6a07400699
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15551: Segmentation fault (access null pointer) in ext/dom/xml_common.h
2024-08-23 19:43:32 +02:00
Niels Dossche
8a00faa2bb
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15551: Segmentation fault (access null pointer) in ext/dom/xml_common.h
2024-08-23 19:42:36 +02:00
Niels Dossche
9af574c26e
Fix GH-15551: Segmentation fault (access null pointer) in ext/dom/xml_common.h
Closes GH-15556.
2024-08-23 19:40:42 +02:00
Niels Dossche
d32b97a1c7
Fix NULL pointer dereference with NULL content in legacy nodes in title getting (#15558) 2024-08-23 19:38:13 +02:00