Commit graph

67489 commits

Author SHA1 Message Date
Peter Kokot
80825672d1
Autotools: Fix external PCRE JIT check (#15430)
If using a custom PCRE library installation, also CFLAGS and LIBS
variables need to be adapted for the JIT check to be able to find it.
2024-08-16 19:21:13 +02:00
Gina Peter Banyard
3e226af533
ext/opcache/ZendAccelerator.c: Restrict MD5 header include to Windows (#15418)
As it is only ever used in accel_gen_uname_id() which is Windows only
2024-08-15 11:12:04 +01:00
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
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
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