1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Commit Graph

65920 Commits

Author SHA1 Message Date
Niels Dossche 586adf964f Remove unimplemented, unreferenced function from php_xmlreader.c 2024-02-25 16:25:52 +01:00
Máté Kocsis f2e199e878 Implement "support doc comments for internal classes and functions" (#13266)
Fixes #13130
2024-02-25 08:41:31 +01:00
Máté Kocsis 4b405d8520 Display class constant and property doc comments via reflection (#13499) 2024-02-25 08:39:41 +01:00
Niels Dossche a74da53fc4 Remove useless write to LIBXML(stream_context)
The value will always be overwritten.
2024-02-25 00:28:30 +01:00
Niels Dossche 30621b2ab4 Add test for overwriting an existing stream context using libxml_set_streams_context
This was previously untested and the branch was not covered according to
codecov.
2024-02-25 00:28:30 +01:00
Niels Dossche ad29afd4e8 Document xsl:keys handling better in ext/xsl 2024-02-24 21:31:01 +01:00
Peter Kokot 92dffb7efd Check posix_spawn_file_actions_addchdir_np with AC_CHECK_FUNCS
This simplifies the check and defines the symbol with description.
2024-02-24 19:13:59 +01:00
Niels Dossche 25dbe5374a Add test with quoting multibyte GBK vs utf8mb4 in PDO 2024-02-23 23:52:24 +01:00
Jorg Sowa 9c4beac8d3 Remove inet_aton
This removes the deprecated inet_aton and its Windows implementation.
The inet_aton can be replaced with platform agnostic inet_pton.

Closes GH-13479
2024-02-23 23:16:43 +01:00
Niels Dossche 657167f17b Destroy xpath callbacks at the time when the reconstruction happens 2024-02-23 19:35:38 +01:00
Niels Dossche 01f1c60008 Cleanup xpath.c by merging some declarations and assignments 2024-02-23 19:35:38 +01:00
Niels Dossche 85217a044a Mark DOMXPath as uncloneable
This never resulted in a working XPath object anyway, as trying to query
or evaluate anything resulted in an "Invalid XPath context" error.
Supporting this is more trouble than it's worth, so just block the clone
operation.
2024-02-23 19:35:38 +01:00
Niels Dossche 9c2c0c3d02 Remove always-true check 2024-02-23 19:35:38 +01:00
divinity76 2f9320c00f DOMXPath::quote(string $str): string (#13456)
Method to quote strings in XPath, similar to PDO::quote() / mysqli::real_escape_string.

Sample usage: $xp->query("//span[contains(text()," . $xp->quote($string) . ")]")

The algorithm is derived from Robert Rossney's research into XPath quoting published at https://stackoverflow.com/a/1352556/1067003
But using an improved implementation I wrote myself, originally for https://github.com/chrome-php/chrome/pull/575
2024-02-22 20:30:21 +01:00
Saki Takamachi 703ead5a26 Extend the maximum precision round can handle by one digit
Closes #12222
2024-02-23 01:12:25 +09:00
Peter Kokot 3693ad2d93 Refactor union semun in ext/sysvsem (#13473)
The union semun is always defined in php-src code. Current systems
require user to define it manually as done in the ext/sysvsem/sysvsem.c.
The conditional checks for HAVE_SEMUN were unused. The PHP 3.0.12 AIX
bug bugs.php.net/2149 was fixed by the removal of __GNU_LIBRARY__ check,
so this now further simplifies the code. The Autoconf AC_CHECK_TYPES
checks if system by any chance has the union semun, and by default
defines the HAVE_UNION_SEMUN.
2024-02-22 15:48:12 +01:00
David CARLIER 9a3a4b5ba2 ext/intl: IntlDateFormatter class removing redundant error message info. (#13465)
Also correcting new IntlChar class constants typos.
2024-02-21 23:23:09 +00:00
Dmitry Stogov b2b5b0101e Update IR
IR commit: 1164842ac28ba141c604c6fae8ec960f9aec369b
2024-02-22 00:24:20 +03:00
Dmitry Stogov 793ddc7c8a Update IR
IR commit: 0b557c0e4578cbfdbf8017f4adac335d795156dc
2024-02-21 23:36:52 +03:00
David Carlier 037855fcd3 ext/intl: level up c++ runtime std for icu 74 and onwards.
to align with what is required to build icu 74 itself.

Close GH-13422.
2024-02-21 16:11:47 +00:00
David Carlier 211dc60044 ext/intl: adding new UCHAR_IDS_UNARY_OPERATOR/UCHAR_ID_COMPAT_MATH_START/UCHAR_ID_COMPAT_MATH_CONTINUE.
Close GH-13420.
2024-02-21 16:11:09 +00:00
David Carlier 22a3866f0c ext/intl: Timezone::getIanaID method addition.
returns the primary IANA zone ID from the provided timezone ID.
Most of the time, timezone ID==IANA ID.
available from icu >= 74.

Close GH-13419.
2024-02-21 16:09:22 +00:00
Peter Kokot e72f0c887b Simplify prctl and procctl Autoconf checks (#13450)
The AC_CHECK_FUNCS checks whether the linker sees the function in the
usual libraries, in this case libc. This is a simple trick to also check
existence of belonging headers, since the code uses HAVE_PRCTL and
HAVE_PROCCTL to include headers and call functions.
2024-02-21 09:04:37 +01:00
Ayesh Karunaratne ba0f9fb501 ext/curl: Add feature_info assoc array to curl_version() (#13439)
The `phpinfo()` section of the Curl extension lists individual features
supported by the particular ext-Curl + libcurl build. However, the
`curl_version()` function return values do not indicate the same level of
details.

`curl_version()` has a `protocols` key that returns an array of all protocols
supported by the build. But the `features` key is a bitmask of all the features.
Checking the availability of certain feature requires knowing the corresponding
`CURL_VERSION` constant, and checking the availability of the constant and a
bitmask check for it in the `features` value.

For example, to determine HTTP2 support, it requires evaluating:

```php
defined('CURL_VERSION_HTTP2') && (curl_version()['features'] & CURL_VERSION_HTTP2 === CURL_VERSION_HTTP2)
```

To make feature availability checks more intuitive, this adds a new
`feature_list` key to `curl_version()` output array.

With it, checking for individual features availability is easier, and does
not require inspecting the availability of the `CURL_VERSION` constant and
the `features` key.

```php
!empty(curl_version()['feature_list']['HTTP2']);
```
2024-02-21 00:46:22 +00:00
Jorg Adam Sowa e630aacf79 Remove HAVE_INET_PTON (#13410) 2024-02-21 00:43:56 +00:00
Dmitry Stogov f5efaa39fa Update IR
IR commit: 873f13dd933acc38ba4cfe2a4aa8558867992a7e
2024-02-21 01:48:38 +03:00
Dmitry Stogov 23aac16d13 Update IR
IR commit: 67477a78251aafe35515eb7a339e309a0e0d4919
2024-02-21 01:13:31 +03:00
Peter Kokot b41a5023f9 Remove malloc.h (#13436)
This removes the deprecated malloc.h header Autoconf check on *nix
systems and its HAVE_MALLOC_H symbol. It can be replaced mostly with the
stdlib.h. The libgd usptream also doesn't include it anymore.

On Windows, it is still used for some memory allocation functions, but
can be replaced with stdlib.h in the future.
2024-02-20 18:02:54 +01:00
Peter Kokot 056c43f848 [skip ci] Sync file permissions in Git repository
Git can track executable (0755) and non-executable (0644) file modes.
This is a minor file permissions sync across the php-src Git repository.

- build/config.guess (0755 as done upstream)
- build/config.sub (0755 as done upstream)
- ext/*/?*.stub.php (0644)
- ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk (0755 due to shebang usage)
2024-02-20 17:58:47 +01:00
Peter Kokot 0ddc3a23fa [skip ci] Fix Intel CET check in ext/pcre
This adds test program body `int main(void) { return 0; }` and fixes the
configure step with cache enabled (`configure -C`).
2024-02-19 14:25:40 +01:00
Dmitry Stogov e3683ea479 Merge branch 'PHP-8.3'
* PHP-8.3:
  Prevent recording traces started from usupported VM instruction
2024-02-19 13:23:14 +03:00
Dmitry Stogov 00259952e4 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Prevent recording traces started from usupported VM instruction
2024-02-19 13:23:05 +03:00
Dmitry Stogov 728b81d92e Prevent recording traces started from usupported VM instruction 2024-02-19 13:22:30 +03:00
Ilija Tovilo fd47cd8b69 [skip ci] Fix ldap skipif 2024-02-19 10:16:13 +01:00
Peter Kokot 711e452037 Rename HAVE_PHP_SOAP symbol on Windows ext/soap (#13426)
This syncs the symbol name with the *nix build, where HAVE_SOAP is
defined.
2024-02-18 18:01:12 +01:00
Niels Dossche 60518e9695 Update error handling when node cannot be added (#13421)
This can only fail on OOM, so be consistent with the other locations and
throw an INVALID_STATE_ERR.
2024-02-18 15:35:41 +01:00
Kamil Tekiela 50598a7097 Tidy up pdo_mysql_attr_max_buffer_size.phpt 2024-02-18 13:09:19 +01:00
Saki Takamachi d433035319 Fixed tests for libmysql (#13424) 2024-02-18 13:08:31 +01:00
Kamil Tekiela 1d45357409 Tidy up UT and add NEWS entry 2024-02-18 12:47:30 +01:00
Saki Takamachi 68f10504de Fixed GH-13167 Fixed the behavior of bindValue and bindParam. (#13384)
Fixed to generate an error when a non-scalar value is passed in
`PDO_PARAM_EVT_EXEC_PRE` of `pdo_mysql_stmt_param_hook` unless
it is a `Stringable` object.
2024-02-18 12:10:21 +01:00
Máté Kocsis 10957e498c Do not generate frameless info items when func info generation is disabled
While here, I fixed newlines around arginfo and function entry generation. Previously, newlines were repeated.
2024-02-18 11:39:00 +01:00
Máté Kocsis 90bf429bae Remove unused register_html_constants() function 2024-02-18 09:17:04 +01:00
Ilija Tovilo 9f1b43f508 Merge branch 'PHP-8.3'
* PHP-8.3:
  Disable JIT on Apple Silicon + ZTS
2024-02-18 00:08:52 +01:00
Ilija Tovilo f057d2b138 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Disable JIT on Apple Silicon + ZTS
2024-02-18 00:08:42 +01:00
Ilija Tovilo 6db95512b4 Disable JIT on Apple Silicon + ZTS
Apple Silicon has stricter rules about rwx mmap regions. They need to be created
using the MAP_JIT flag. However, the MAP_JIT seems to be incompatible with
MAP_SHARED. ZTS requires MAP_SHARED so that some threads may execute code from a
page while another writes/appends to it. We did not find another solution, other
than completely disabling JIT for Apple Silicon + ZTS.

See discussion in https://github.com/php/php-src/pull/13351.

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
Fixes GH-13400
Closes GH-13396
2024-02-18 00:07:46 +01:00
Saki Takamachi ed1c9d8954 ext/standard: Add more tests to round() (#13399) 2024-02-17 13:44:55 +00:00
Niels Dossche ae5beff61b Upgrade bundled pcre2lib to 10.43 (#13413) 2024-02-17 14:15:04 +01:00
David CARLIER 09415077f9 ext/ldap: few new unit tests (tls13 protocol). (#13409) 2024-02-16 18:26:08 +00:00
Jorg Adam Sowa e7b1f2a95b Change long2ip return type (#13395) 2024-02-16 17:11:18 +01:00
Peter Kokot b5c3cbf94b Check sockaddr_storage.ss_family with AC_CHECK_MEMBERS (#13407)
This simplifies the check. On AIX 6 and newer, the ss_family is
available, if compiled without defining COMPAT_43 (BSD 4.3
compatibility).
2024-02-16 14:24:55 +01:00