Commit graph

135288 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
072e67fd01
Fix unused variable warning in sapi/litespeed (#13718) 2024-03-15 08:56:35 +01:00
Peter Kokot
d2eb3e54ea
Check asm goto support with AC_LINK_IFELSE (#13716)
The '__asm__ goto' support is properly recognized by a simpler linking
check instead of a run check for easier cross-compilation. The
compile only check (AC_COMPILE_IFELSE) might produce false positives
results with certain compiler options.
2024-03-15 06:44:27 +01: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
Saki Takamachi
94d18cb1d3
[skip ci] CODEOWNERS 2024-03-14 07:47:53 +09: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
7c63a43deb
Merge branch 'PHP-8.3'
* PHP-8.3:
  random: Initialize the `mode` field when seeding in `php_random_default_status()` (#13690)
2024-03-13 20:16:02 +01: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
Peter Kokot
18dffa6b73
Fix defined but not used warnings (#13678)
This fixes two warnings when building litespeed SAPI:

```
.../php-src/sapi/litespeed/lscriu.c:312:14: warning:
'LSCRIU_Error_File_Name' defined but not used
[-Wunused-function]
  312 | static char *LSCRIU_Error_File_Name(char *pchFile, int max_len)
      |              ^~~~~~~~~~~~~~~~~~~~~~
.../php-src/sapi/litespeed/lscriu.c:102:12: warning:
's_criu_debug' defined but not used [-Wunused-variable]
  102 | static int s_criu_debug = 0;
      |            ^~~~~~~~~~~~
```
2024-03-12 17:49:07 +01:00
Ilija Tovilo
980f7bd2c9
Implement INIT_FCALL offset optimization
Closes GH-13634
2024-03-12 14:13:57 +01:00
Claudio Jeker
4bf4c24aa8 Implement fcontext handling for sparc64_sysv_elf.
This was tested on OpenBSD sparc64 and all fiber related tests pass.
On OpenBSD stackghost prevents the modification of the return address
and therefor an extra trampoline is needed in make_fcontext(). This
should not matter on other OS implementing sysv ABI and the trampoline
should work there as well.

Close GH-13382.
2024-03-12 11:06:18 +00:00
Peter Kokot
a04577fb4a
Mark sapi/embed as non experimental (#13668)
The embed SAPI has been around for quite a while now, and many apps
already use it in production. It can be marked as non experimental to
avoid confusion.

[skip ci]
2024-03-11 22:19:27 +01:00
Ayesh Karunaratne
47949101ae
ext/sodium: Add new AEGIS constants to UPGRADING file (#13673)
Follow-up to #12867
[ci skip]
2024-03-11 22:16:22 +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
1b5d9f657b [ci skip] NEWS 2024-03-11 15:14:28 +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
809446d3d1 [ci skip] NEWS 2024-03-11 15:13:03 +01:00