1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00
Commit Graph

136240 Commits

Author SHA1 Message Date
Niels Dossche face2abd41 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-11188: Error when building TSRM in ARM64
2024-06-03 21:11:55 +02:00
Niels Dossche 3e8752169c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-11188: Error when building TSRM in ARM64
2024-06-03 21:11:20 +02:00
nielsdos 644d3628e3 Fix GH-11188: Error when building TSRM in ARM64
Although the issue mentioned FreeBSD, this is a broader problem:
the current ARM64 code to load the TLS offset assumes a setup with
the non-default TLS model. This problem can also apply on some
configurations on other platforms.

Closes GH-11236.
2024-06-03 20:28:55 +02:00
Niels Dossche 315f2059b7 Remove dead check in pcre
This isn't reachable since ab32d36, because since then the library
itself checks this condition during compilation. The compilation failure
that results of it makes this code not reachable.

This is split off of GH-14424.
2024-06-03 19:58:22 +02:00
Peter Kokot 6a14730d20 Wrap aligning segments checks in AC_CACHE_CHECK (#14450)
This enables cross-compiling edge cases to override checks with
php_cv_have_common_page_size and php_cv_have_max_page_size cache
variables when target matches one of the conditions in case pattern.

Not done as link check yet due to Clang 9 bug and similar issues:
https://github.com/php/php-src/pull/5123
2024-06-03 15:22:15 +02:00
Peter Kokot df481ef941 Simplify PDO include paths (#14444)
PDO include paths can be simplified and synced as done in other
extensions: either the project root directory or the phpincludedir (for
the system installation). The 'ext' include is automatically appended
when doing phpize build. In php-src it is only present on Windows build.
The PHP_CHECK_PDO_INCLUDES is left intact working as before and checks
if PDO headers are found.
2024-06-03 12:56:21 +02:00
Dmitry Stogov 802612bb54 Update IR
IR commit: 97555e12b525b825ab3b2f12bfdfd5cb6c00b2b4
2024-06-03 12:20:07 +03:00
Peter Kokot bf845d563e Use AC_SUBST for CONFIGURE_COMMAND and CONFIGURE_OPTIONS (#14445)
Instead of the PHP_SUBST_OLD, which also adds redundant variables to the
generated Makefile, these two can be done with AC_SUBST to be
substituted in the generated main/build-defs.h header and
scripts/php-config script.
2024-06-03 08:19:26 +02:00
Peter Kokot 6c034ee7e3 Wrap gdImageCreateFrom* checks in AC_CACHE_CHECK (#14443)
This enables cross-compiling edge cases to manually override the checks
with the php_cv_lib_gd_gdImageCreateFrom* cache variables.
2024-06-03 00:00:44 +01:00
Levi Morrison 07a1921a8c refactor: use ZEND_PARSE_PARAMETERS_NONE() (#14442)
Prefer:

	ZEND_PARSE_PARAMETERS_NONE();

Over:

	if (zend_parse_parameters_none() == FAILURE) {
		RETURN_THROWS();
	}

It's shorter, more modern, and they do the same thing. Technically,
ZEND_PARSE_PARAMETERS_NONE doesn't check that there's an exception,
but it generates one, so it's still cohesive.
2024-06-02 23:58:24 +01:00
Peter Kokot 5afe41bdf3 Update ext/simplexml dependencies (#14446)
This syncs the configure time dependencies for ext/simplexml:
- ext/spl was once optional but since being always available,
  conditional usage was removed
- ext/libxml required
2024-06-02 23:37:50 +02:00
Peter Kokot 354b2636a5 Wrap iconv errno check in AC_CACHE_CHECK (#14438)
Cross-compiling in this case is passed but for the sake of consistency
this check is also cached to enable manual overriding with the
php_cv_iconv_errno cache variable.
2024-06-02 20:41:34 +02:00
Peter Kokot 75033c01c3 Wrap Zend stack limit check in AC_CACHE_CHECK (#14437)
The php_cv_have_stack_limit cache variable enables cross-compiling edge
cases to override the check manually.
2024-06-02 20:13:00 +02:00
Peter Kokot ca55603d8a Wrap ext/opcache AC_RUN_IFELSE checks in AC_CACHE_CHECK (#14436)
Cache variables php_cv_shm_ipc and php_cv_shm_mmap_anon enable manual
overriding of checks when cross-compiling.
2024-06-02 19:51:47 +02:00
Peter Kokot 028cfda994 Wrap clock_get_time check in AC_CACHE_CHECK (#14434)
The php_cv_func_clock_get_time cache variable enables cross-compiling
edge cases to manually override the AC_RUN_IFELSE check.
2024-06-02 19:02:12 +02:00
Gina Peter Banyard d2a932b8af Merge branch 'PHP-8.3'
* PHP-8.3:
  ext/standard: Fix test conflict with I/O tests
2024-06-02 17:03:57 +01:00
Gina Peter Banyard e206b68403 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/standard: Fix test conflict with I/O tests
2024-06-02 17:03:44 +01:00
Gina Peter Banyard 75f6132818 ext/standard: Fix test conflict with I/O tests
Closes GH-14428
2024-06-02 17:03:19 +01:00
Peter Kokot 5b35740098 Sync #if/ifdef/defined for LIBXML_EXPAT_COMPAT (#14435)
This one can be undefined or defined to value 1.
2024-06-02 15:39:42 +02:00
David CARLIER c8a8d8aba3 ext/intl last chunk of fast ZPP conversion (#14431) 2024-06-02 10:19:38 +01:00
David CARLIER 354b64720c ext/intl: calendar/locale use fast ZPP. (#14425) 2024-06-02 08:47:08 +01:00
David CARLIER 9437c32cf4 ext/intl: common use fast ZPP (#14422) 2024-06-01 22:33:12 +01:00
David CARLIER 8c08b03e9b ext/intl: odn, collator, msgformat using fast ZPP (#14421) 2024-06-01 22:25:00 +01:00
David CARLIER c39bcaa225 ext/int: UChar using fast ZPP (#14420) 2024-06-01 21:50:07 +01:00
Peter Kokot 8112889a73 Wrap ttyname_r check in AC_CACHE_CHECK (#14417)
This enables cross-compiling to set the php_cv_func_ttyname_r variable
for adjusting the configuration manually.

In case of cross-compiling the AC_CHECK_FUNCS is additionally used to
guess whether the target has the ttyname_r. Current platforms mostly
either have working ttyname_r compatible with POSIX or not.
2024-06-01 22:42:22 +02:00
David CARLIER bc6f3334d1 ext/intl: further fast ZPP usage. (#14419) 2024-06-01 20:48:55 +01:00
Niels Dossche 2f9de8b9e6 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix reference handling in SpoofChecker
2024-06-01 20:45:01 +02:00
Niels Dossche c87f29f685 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix reference handling in SpoofChecker
2024-06-01 20:40:17 +02:00
David CARLIER d005ab20ea ext/intl converter and formatter using fast ZPP (#14413) 2024-06-01 19:36:40 +01:00
Niels Dossche 5ec26edfb6 Fix reference handling in SpoofChecker
Closes GH-14414.
2024-06-01 20:35:57 +02:00
David CARLIER 694bb32119 ext/intl: timezone using fast ZPP and fixing SpoofChecker (#14415) 2024-06-01 19:16:03 +01:00
Peter Kokot 8b1bb91b3e Sync build system #if/ifdef/defined (#14397)
These are either undefined or defined to value 1:
- HAVE_CRYPT
- HAVE_CRYPT_H
- HAVE_UNISTD_H

Follow up of GH-5526 (-Wundef)
2024-06-01 19:26:38 +02:00
Peter Kokot ec50b178f1 Update ext/session spl dependency (#14410)
The spl dependency is configured so the spl_autoload_register is
available when session_start() is used, meaning the spl extension needs
to be loaded before the session. It is marked as optional to be more
explicit as spl is not directly used nor required in the session
extension.
2024-06-01 19:13:54 +02:00
David CARLIER 4fca8a6027 ext/intl: SpoofChecker using fast ZPP. (#14412) 2024-06-01 17:40:16 +01:00
Peter Kokot dedf8fbffd Add missing pcre dependency definition to zip extension (#14404)
The zip extension also requires the pcre extension.
2024-06-01 17:15:18 +01:00
Gina Peter Banyard 25a5146180 Clean-up unused headers (#14365)
* ext/mbstring.c: clean-up headers and include intrinsics
2024-06-01 17:12:42 +01:00
Gina Peter Banyard c3b3e90cea ext/odbc: Remove unused INI settings (#14399) 2024-06-01 17:06:34 +01:00
Peter Kokot f69c55b5b6 Remove hash dependency from session extension (#14409)
The session extension once depended on the hash extension for having
hash functions available when using the `session.hash_function` INI
directive. This directive was removed in PHP-7.1 via
3467526a65. At the time it could be marked
as optional dependency, because it only needed to be loaded before the
session in that case.

The removed ext/hash/php_hash.h in the ext/session/php_session.h might
cause BC break for PHP extensions if they rely on transitive include and
use hash extension in the code without explicitly including the
ext/hash/php_hash.h header. Solution is to include the
ext/hash/php_hash.h separately.
2024-06-01 17:06:17 +01:00
Niels Dossche ffe225d686 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix bug #76232: SoapClient Cookie Header Semicolon
2024-06-01 17:38:06 +02:00
Niels Dossche 98c8518b39 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bug #76232: SoapClient Cookie Header Semicolon
2024-06-01 17:38:00 +02:00
Niels Dossche 1b1677a8f1 Fix bug #76232: SoapClient Cookie Header Semicolon
According to RFC 6265 [1] the cookies must be separated by "; " not ";",
and it must not end with ";".

[1] https://datatracker.ietf.org/doc/html/rfc6265

Closes GH-14406.
2024-06-01 17:37:30 +02:00
Peter Kokot cf469133a5 Fix ZEND_DEBUG condition (#14408)
ZEND_DEBUG is always defined by the build system automatically, either
to value 0 or value 1.
2024-06-01 16:07:48 +02:00
Niels Dossche 9f89ada76f Struct-pack some soap datatypes (#14403)
While keeping data that belongs together close too.
2024-06-01 14:11:45 +02:00
David CARLIER 1e2306b4c6 ext/exif: moving few instances from memmove to memcpy. (#14400) 2024-06-01 13:05:49 +01:00
Niels Dossche 61191dc313 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)
2024-06-01 13:32:58 +02:00
Niels Dossche d11a3c6579 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)
2024-06-01 13:31:02 +02:00
Niels Dossche 476706165a Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)
There's a hash table that maps type names to class name, but names with
a leading backslash are not supported. The engine has logic to strip
away the leading backslash that we should replicate here.

It works by checking if we need to make an actual copy in case an
unexpected (e.g. invalid data or leading backslash) situations are
detected. Upon making a copy we normalize the data in the table.

Furthermore, previously the code assumed that the key was always valid
and that the structure was a non-packed hash table. This isn't
necessarily the case. The new code fixes this as well.

Closes GH-14398.
2024-06-01 13:29:26 +02:00
Niels Dossche 8dc2391bae Fix bug #79701: getElementById does not correctly work with duplicate definitions
This is a long standing bug: IDs aren't properly tracked causing either
outdated or plain incorrect results from getElementById.

This PR implements a pragmatic solution in which we still try to use the
ID lookup table to a degree, but only as a performance boost not as a
"single source of truth". Full details are explained in the
getElementById code.

Closes GH-14349.
2024-06-01 12:55:05 +02:00
Bob Weinand 5fe799a4c6 Merge branch 'PHP-8.3' 2024-06-01 02:42:49 +02:00
Bob Weinand d98586b6ed Merge branch 'PHP-8.2' into PHP-8.3 2024-06-01 02:41:39 +02:00