Commit graph

66096 commits

Author SHA1 Message Date
David Carlier
f714aa49ee ext/sockets: addiong few constants for NetBSD.
SOCK_CONN_DGRAM (and its alias SOCK_DCCP) for connection orientated
datagram.
2024-03-17 21:39:43 +00:00
Máté Kocsis
b06c95b631
Declare the missing true return types (#13709) 2024-03-16 07:26:37 +01:00
Niels Dossche
fcdcfe924a Merge branch 'PHP-8.3'
* PHP-8.3:
  Add missing DOM dependency in config.m4 for ext/xsl
2024-03-15 22:56:49 +01:00
Niels Dossche
7d1637a48c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add missing DOM dependency in config.m4 for ext/xsl
2024-03-15 22:56:40 +01:00
Niels Dossche
afdabb1247 Add missing DOM dependency in config.m4 for ext/xsl
Closes GH-13715.
2024-03-15 22:56:25 +01:00
Peter Kokot
c6f4c26e1b
Check major, minor and makedev with Autoconf's AC_HEADER_MAJOR (#13706)
The non-standard major(), minor(), and makedev() can be defined as
macros. These are usually used together with the Autoconf macro
AC_HEADER_MAJOR, which defines the MAJOR_IN_MKDEV if sys/mkdev.h is
available, or MAJOR_IN_SYSMACROS if sys/sysmacros.h is available.

On Solaris/illumos they are in the sys/mkdev.h header (macro defined to
libc implementation) and in sys/sysmacros.h (macro defined with binary
operators and bits shifting). On systems with musl and glibc 2.28 or
later they are defined in sys/sysmacros.h, in glibc 2.27 and earlier
they were in sys/types.h. On BSD-based systems and macOS they are in the
sys/types.h.

Autoconf 2.70 has fixed the AC_HEADER_MAJOR macro, so it detects the
headers properly due to glibc 2.25 throwing deprecation warnings when
using the macros from sys/types.h. With Autoconf 2.69 and earlier the
ac_cv_header_sys_types_h_makedev cache variable can skip the
improper sys/types.h check in the macro.

This change syncs the usage within the ext/fileinfo/libmagic bundled
library and ext/posix.

When sys/mkdev.h header is available, code includes that, otherwise
it conditionally includes the sys/sysmacros.h. The ext/posix has
additional check whether linker sees the makedev, otherwise it checks
if makedev is declared within the given set of headers accoring to the
AC_HEADER_MAJOR logic. Previously the AC_CHECK_FUNCS didn't detect it.
2024-03-15 21:18:05 +01:00
Peter Kokot
e1181a64d4
Remove HAVE_MYSQL (#13719)
The ext/pdo_mysql symbol has been once used together with the removed
ext/mysql extension and isn't defined on Windows neither used in the
code anymore.
2024-03-15 20:33:59 +01:00
Saki Takamachi
54ee85ba88
Merge branch 'PHP-8.3'
* PHP-8.3:
  Changed the test expected value of `mysqli::info` to `%s` (#13723)
2024-03-16 00:15:20 +09:00
Saki Takamachi
1f7df80b43
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Changed the test expected value of `mysqli::info` to `%s` (#13723)
2024-03-16 00:14:38 +09:00
Saki Takamachi
23eb6a00e2
Changed the test expected value of mysqli::info to %s (#13723)
Closes #13723
Fixes #13628
2024-03-16 00:14:18 +09:00
Peter Kokot
ec394cc26a
Fix implicitly marking parameter as nullable deprecation warning (#13714)
A follow up around the php-src code regarding the RFC:
https://wiki.php.net/rfc/deprecate-implicitly-nullable-types
2024-03-14 21:51:55 +01:00
Niels Dossche
2b77e5bc6b Fix compile warning 2024-03-14 21:22:03 +01:00
Niels Dossche
eaf27400e6 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix potential memory leak in XPath evaluation results
2024-03-14 21:13:14 +01:00
Niels Dossche
0f79c22627 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix potential memory leak in XPath evaluation results
2024-03-14 21:11:19 +01:00
Niels Dossche
30c58aba0c Fix potential memory leak in XPath evaluation results 2024-03-14 21:08:25 +01:00
Dmitry Stogov
586153b9ef Update IR
IR commit: 2c5b63d4b89b25a323444f6629e6d7c9e9d17300
2024-03-14 22:23:05 +03:00
David Carlier
250b160886 Merge branch 'PHP-8.3' 2024-03-14 18:59:57 +00:00
David Carlier
c24f621f57 Merge branch 'PHP-8.2' into PHP-8.3 2024-03-14 18:59:44 +00:00
David Carlier
db1f7b1286 zend_test fix copy_file_range test for linux 32 bits
close GH-13708
2024-03-14 18:59:26 +00:00
Niels Dossche
affd175116
Fix parameter hints in php_xsl.stub.php (#13704)
After the spec compliance PR landed, DOMDocument no longer inherits from
DOM\Document, and so the type hint needs to be updated.
2024-03-14 19:27:44 +01:00
Máté Kocsis
577db99462
Verify stub aliases in CI (#13682)
In the same time, let's not verify implementation aliases since they may now legitimately differ from their aliased function/method counterparts (think about the ext/dom refactoring where e.g. many return type declarations have changed). Additionally, unnecessary `@no-verify` tags are cleaned up.
2024-03-13 23:32:35 +01:00
Niels Dossche
cc0260e014
Change return type of DOM\HTMLDocument::saveHTML() (#13701)
Strict error checking is always true for classes in "new DOM".
This means that we always throw an error when calling
`php_dom_throw_error`, and therefore the false return value is not
actually possible.
Also change the stub to reflect this.
2024-03-13 21:49:40 +01:00
Máté Kocsis
330cc5cdb2
Deprecate implicit nullable parameter types (#12959)
RFC: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-03-13 21:40:26 +01:00
David Carlier
b3410360cc ext/gettext: updating apis accepting domain behavior.
to be more in line with the proper usage ; normally domain should not
be empty strings.

Close GH-13691
2024-03-13 20:33:47 +00:00
David Carlier
c2d20f48c5 Merge branch 'PHP-8.3' 2024-03-13 19:35:50 +00:00
David Carlier
bbb6ffa545 Merge branch 'PHP-8.2' into PHP-8.3 2024-03-13 19:35:36 +00:00
David Carlier
334419e157 zend test fix copy_file_range for musl.
normally should no longer need off64_t with glibc anyway.
2024-03-13 19:35:23 +00:00
Tim Düsterhus
0d0375ab91
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  random: Initialize the `mode` field when seeding in `php_random_default_status()` (#13690)
2024-03-13 20:14:42 +01:00
Tim Düsterhus
f34721cabd
random: Initialize the mode field when seeding in php_random_default_status() (#13690)
This is not just an issue due to missing initialization since moving the state
struct directly into the module globals. In earlier versions changing the mode
to `MT_RAND_PHP` within a single request would also affect the mode for
subsequent requests.

Original commit message follows:

This is a follow-up fix for GH-13579. The issue was detected in the nightly
MSAN build.

(cherry picked from commit bf0abd1629)
2024-03-13 20:13:48 +01:00
Dmitry Stogov
3bf4bcc775 Update IR
IR commit: 1d3df9f7dd82fe49001e714a4c31962387b526f6
2024-03-13 21:22:50 +03:00
Niels Dossche
8793f9938b Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13680: Segfault with session_decode and compilation error
2024-03-13 17:59:43 +01:00
Niels Dossche
b58dc6fd1a Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13680: Segfault with session_decode and compilation error
2024-03-13 17:49:31 +01:00
Niels Dossche
6985aff7c3 Fix GH-13680: Segfault with session_decode and compilation error
It's illegal to return from a bailout because that doesn't restore the
original bailout data. Return outside of it.

Test by YuanchengJiang

Closes GH-13689.
2024-03-13 17:47:25 +01:00
guangwu
f1a22d0943
fix: typos (#13694)
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
2024-03-13 09:30:33 +01:00
Niels Dossche
7ff78f7b10 Add test case for bug #48339
This now works in spec-compliant DOM.

Test by: greatwhitepine at bigfoot dot com
2024-03-12 22:45:39 +01:00
Ayesh Karunaratne
94a12d5b31
ext/curl: Cleanup config.w32 to remove superfluous checks and outdated comments (#13684)
- Remove a check for an always-true curl version check
- Remove a `TODO` comment for curl_version_info check that should be always available since libcurl 7.10
2024-03-12 17:56:07 +01:00
Niels Dossche
3c33430d27
Fix 32-bit DOM characterdata failures (#13663) 2024-03-11 21:16:13 +01:00
Arnaud Le Blanc
ef8dcbda49 Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] NEWS
  [ci skip] NEWS
  Fix GH-13508: JITed QM_ASSIGN may be optimized out when op1 is null (#13610)
2024-03-11 15:15:36 +01:00
Arnaud Le Blanc
a4d769ccb3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS
  Fix GH-13508: JITed QM_ASSIGN may be optimized out when op1 is null (#13610)
2024-03-11 15:13:56 +01:00
Arnaud Le Blanc
0ea80126ea
Fix GH-13508: JITed QM_ASSIGN may be optimized out when op1 is null (#13610)
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2024-03-11 15:10:12 +01:00
Ilija Tovilo
d667e73f46
Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Mark another openssl test as xfail
2024-03-10 15:15:40 +01:00
Ilija Tovilo
be72bc4b07
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Mark another openssl test as xfail
2024-03-10 15:15:32 +01:00
Ilija Tovilo
bc6a1c933f
[skip ci] Mark another openssl test as xfail 2024-03-10 15:15:12 +01:00
Niels Dossche
d0e15c8502
Fix external pcre2 build (#13662)
PCRE2_EXTRA_CASELESS_RESTRICT is only available as of pcre2 10.43.
Note: no check is necessary for pcre2_set_compile_extra_options because
it is available since pcre2 10.30, which is the minimum version PHP
requires.
2024-03-10 13:15:15 +01:00
Niels Dossche
cfdbf7743d Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix nightly failure due to type in file_put_contents_5gb.phpt
2024-03-10 11:28:15 +01:00
Niels Dossche
5fc3518426 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix nightly failure due to type in file_put_contents_5gb.phpt
2024-03-10 11:28:05 +01:00
Niels Dossche
65593e10ef Fix nightly failure due to type in file_put_contents_5gb.phpt 2024-03-10 11:27:47 +01:00
Niels Dossche
539d8d9259 Use common helper macro for getting the node in property handlers 2024-03-10 11:08:46 +01:00
Niels Dossche
649394d357 Remove redundant namespace define 2024-03-10 11:08:46 +01:00
Niels Dossche
d57e7a920b Use BAD_CAST consistently 2024-03-10 11:08:46 +01:00