1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Commit Graph

135278 Commits

Author SHA1 Message Date
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
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
Peter Kokot
8595bead87 Use default Autoconf's AC_LANG_PROGRAM (#13565)
This adds default test program prologue and body of
`int main(void) { return 0; }` where possible.
2024-03-11 00:24:57 +01:00
Peter Kokot
586a0dd369 Find SELinux library with pkgconf (#13645)
The SELinux library has had pkg-config/pkgconf integration since ~2009.
To ease this change, the check without pkgconf is executed in case the
libselinux.pc file is not found on the system.

A sanity check also covers cases where the library path is overriden:
  /configure --enable-fpm --with-fpm-selinux \
    SELINUX_CFLAGS=-I/path/to/libselinux \
    SELINUX_LIBS="-L/path/to/libselinux -lselinux"

This also removes the redundant symbol HAVE_SELINUX_SELINUX_H since the
selinux/selinux.h header is considered a required part of the SELinux
library package.
2024-03-10 21:31:56 +01:00
Peter Kokot
d2635b10b4 Remove unused php_std_auto_global_callback() (#13656)
Introduced in 4e55747a2b but not used in
current code. There was previous removal attempt via
afa4e41c2f but looks like it didn't make
it into the master branch at that point.
2024-03-10 18:05:51 +01:00
Shivam Mathur
edbef3e4ac Merge branch 'PHP-8.3'
* PHP-8.3:
Fix brew action (#13659)
We patch brew to ensure it overwrites files while linking the dependencies
2024-03-10 20:23:15 +05:30
Shivam Mathur
59e8c267fa Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
    Fix brew action (#13659)
    We patch brew to ensure it overwrites files while linking the dependencies
2024-03-10 20:18:47 +05:30
Shivam Mathur
0e05f26be6 Fix brew action (#13659)
We patch brew to ensure it overwrites files while linking the dependencies
2024-03-10 20:11:24 +05:30
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