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

136158 Commits

Author SHA1 Message Date
Derick Rethans
99950bde3b Merged pull request #14375 2024-05-30 15:06:20 +01:00
Derick Rethans
92d18b2bec Fixed rounding error with new DateTime[Immutable]::createFromTimestamp method 2024-05-30 14:08:39 +01:00
Peter Kokot
471aa1141f Refactor fopencookie check (#14346)
- This checks for a type cookie_io_functions_t and defines the
  HAVE_FOPENCOOKIE based on type check result and the fopencookie()
  function presence.
- Fixed -Wunused... warnings in config.log on stricter compiler
  configurations
- The run check for off64_t is wrapped into AC_CACHE_CHECK for having
  the php_cv_type_cookie_off64_t cache variable available to customize
  possible cross-compilation edge cases
- Comment about glibcs 2.1.2 removed because also some other earlier
  versions provided this type already
2024-05-30 14:56:47 +02:00
Gina Peter Banyard
cd44826c1a [skip ci] Update UPGRADING after Intl refactoring 2024-05-30 13:02:44 +01:00
Gina Peter Banyard
33f1cf202e ext/intl: Various refactoring (#14360)
* ext/intl: Small extension cleanup

* ext/intl: Normalize cloning error handling behaviour

Always throw a Error exception as we cannot progress from here

* ext/intl: idn.c use ValueErrors where appropriate

Drive-by refactoring

* ext/intl: Remove some unused headers

Probably more cleanup can be done
2024-05-30 12:51:36 +01:00
Arnaud Le Blanc
1ab4520c30 Add zend_atomic_int (#14242)
Extend the zend_atomic API for ints. Also add `zend_atomic_*_compare_exchange()`, `ZEND_ATOMIC_*_INITIALIZER()`.
2024-05-30 12:53:44 +02:00
Peter Kokot
d8da8d88e0 Remove obsolete Makefile .NOEXPORT target (#13734)
This was once used on GNU Make from versions 3.59 to 3.63 (released in
1994) to not export all variables, otherwise a system limit may be
exceeded. This was the case for the obsolete UNIX System V (SysV) and is
on current systems not applicable anymore, with such target ignored.
2024-05-30 12:41:12 +02:00
Máté Kocsis
c08535c804 Fix regex for searching for constant lists
0242577b33 partly fixed the detection of external constant lists referenced on Predefined Constants pages, but changing the file search regex is needed too in order to fully fix the underlying issue in case of cURL constants.
2024-05-30 09:46:56 +02:00
Peter Kokot
de0415e705 Remove PROG_SENDMAIL from Makefile (#14355)
PROG_SENDMAIL is not used in the generated Makefile. For the
main/build-defs.h it is substituted automatically with AC_PATH_PROG.
2024-05-30 00:53:07 +02:00
Máté Kocsis
0242577b33 Also check constants in referenced constant lists
Some constants are extracted from Predefined Constants pages (e.g. https://github.com/php/doc-en/pull/3413), which should alsobe checked when verifying the manual.
2024-05-29 23:50:46 +02:00
Niels Dossche
c7797fc8c0 Fix bug GH-11941: soap with session persistence will silently fails when "seession" built as a shared object (#14362)
This adds an optional dependency on the session extension and adds the
necessary APIs to make the functionality work with lazy binding.

This can be tested by configuring PHP with `--enable-session=shared` and
`--enable-soap=shared` and running the test suite, in particular the
buggy behaviour can be observed by the existing test `server009.phpt`.
2024-05-29 19:51:49 +02:00
Niels Dossche
5db05955c8 Move more common code into php_dom_next_in_tree_order() (#14363) 2024-05-29 19:50:41 +02:00
Tim Düsterhus
8a87206211 reflection: Add ReflectionGenerator::isClosed() (#14358)
* reflection: Add `ReflectionGenerator::isClosed()`

see https://github.com/php/php-src/pull/14167#issuecomment-2133641998

* Fix test expectation

* Drop `{{{` / `}}}` comments around `ReflectionGenerator::isClosed()`
2024-05-29 19:07:09 +02:00
Niels Dossche
f90a32c9bf Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix build
2024-05-29 18:50:13 +02:00
Niels Dossche
edc130910f Fix build 2024-05-29 18:50:07 +02:00
Niels Dossche
acfa564e72 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix bug #47925 again (#14348)
  Fix GH-14343: Memory leak in xml and dom (#14347)
2024-05-29 17:52:00 +02:00
Niels Dossche
fe0214bb55 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bug #47925 again (#14348)
  Fix GH-14343: Memory leak in xml and dom (#14347)
2024-05-29 17:51:47 +02:00
Niels Dossche
ce7ed6e040 Fix bug #47925 again (#14348)
The naming of the userland functions is terrible and confused me.
gzdecode() is actually the function to decompress a gzip stream, and
gzuncompress() is the one to decompress a deflate stream...
See zlib.c to see the internal function -> type mapping.
2024-05-29 17:50:20 +02:00
Niels Dossche
88ff32a25b Fix GH-14343: Memory leak in xml and dom (#14347)
If there is no root, the namespace cannot be attached to it,
so we have to attach it to the old list.

This isn't a problem in "new DOM" because namespaces are managed in a
separate structure there.
2024-05-29 17:49:07 +02:00
Niels Dossche
e6abca4d24 Use helper macro in ext/exif (#14352) 2024-05-29 17:48:43 +02:00
Máté Kocsis
0f64901316 Document stubs (#13677)
Co-authored-by: Derick Rethans <github@derickrethans.nl>
2024-05-29 14:18:22 +02:00
Ilija Tovilo
9771302e29 Merge branch 'PHP-8.3'
* PHP-8.3:
  Attempt to fix mysql_native_password error for 32-bit build
2024-05-29 12:49:51 +02:00
Ilija Tovilo
3250457242 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Attempt to fix mysql_native_password error for 32-bit build
2024-05-29 12:49:43 +02:00
Ilija Tovilo
a05301e783 Attempt to fix mysql_native_password error for 32-bit build
Closes GH-14356
2024-05-29 12:48:47 +02:00
Gina Peter Banyard
48d5ae98e7 ext/standard: Refactor exec.c public APIs to use zend_string pointers (#14353)
* Pull zend_string* from INI directive

* Ensure that mail.force_extra_parameters INI directive does not have any nul bytes

* ext/standard: Make php_escape_shell_cmd() take a zend_string* instead of char*

This saves on an expensive strlen() computation

* Convert E_ERROR to ValueError in php_escape_shell_cmd()

* ext/standard: Make php_escape_shell_arg() take a zend_string* instead of char*

This saves on an expensive strlen() computation

* Convert E_ERROR to ValueError in php_escape_shell_arg()
2024-05-29 10:59:17 +01:00
Ilija Tovilo
06fcf3c029 Merge branch 'PHP-8.3'
* PHP-8.3:
  Re-add 32-bit push build
2024-05-29 11:50:45 +02:00
Ilija Tovilo
9f77c1f995 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Re-add 32-bit push build
2024-05-29 11:49:49 +02:00
Ilija Tovilo
69dbfadd1e Re-add 32-bit push build
32-bit fails more commonly that I had assumed.

Closes GH-14300
2024-05-29 11:47:24 +02:00
Peter Kokot
e45d2d6046 Sync HAVE_BUNDLED_PCRE #if/ifdef/defined (#14354)
Follow up of GH-5526 (-Wundef)
2024-05-29 07:53:36 +02:00
Peter Kokot
cb2c5de3db Add PHP_SBINDIR (#13363)
The PHP_SBINDIR symbol was defined on *nix systems but never used. This
adds the constant similar to PHP_BINDIR also to PHP. On Windows it is
the value of prefix configuration when PHP was built (same value as
PHP_BINDIR).
2024-05-29 07:04:05 +02:00
Niels Dossche
7278364f9c Remove useless RETURN_NULLs() (#14350)
These functions are void, their use of RETURN_NULL() was mildly
confusing.
2024-05-28 22:59:37 +02:00
Peter Kokot
1d0cdd1b41 Remove unused ext/fileinfo/libmagic/elfclass.h file (#14344)
Usage was removed via 919abf0cb1 due to
redundand code in php-src. This also updates the appended libmagic patch
file.
2024-05-28 21:43:38 +02:00
Máté Kocsis
cf004ed47e Fix implicitly nullable type detection in stubs 2024-05-28 21:06:00 +02:00
Máté Kocsis
661c5ee546 Fix implicitly nullable parameter type for pg_put_copy_end() 2024-05-28 20:11:01 +02:00
David Carlier
162a311cc8 ext/pgsql: adding pg_put_copy_data/pg_put_copy_end.
pg_put_copy_data allows to send COPY commands to the server.
pg_put_copy_end signals the end of the n commands.

Both return 3 states ; 1, 0 and -1 when 1 is success, 0 the buffer queue
is full then -1 for errors.

Close GH-14325
2024-05-28 18:35:40 +01:00
Arnaud Le Blanc
cc6d9523d9 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix TLS access in JIT on FreeBSD/amd64
2024-05-28 15:45:45 +02:00
Arnaud Le Blanc
5e895dda15 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix TLS access in JIT on FreeBSD/amd64
2024-05-28 15:43:59 +02:00
Arnaud Le Blanc
79862f24da Fix TLS access in JIT on FreeBSD/amd64
DTV elements are 8 bytes in size a per ABI [1], and the index is offset by 1
on FreeBSD [2]

[1] http://people.redhat.com/drepper/tls.pdf
[2] bf56e8b9c8/libexec/rtld-elf/rtld.c (L5260)

Closes GH-13928
2024-05-28 15:42:57 +02:00
Arnaud Le Blanc
7c5d6557e1 Merge branch 'PHP-8.3'
* PHP-8.3:
  Use ITIMER_REAL for timeout handling on MacOS / Apple Silicon system
2024-05-28 15:27:32 +02:00
Arnaud Le Blanc
3b2764bc76 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Use ITIMER_REAL for timeout handling on MacOS / Apple Silicon system
2024-05-28 15:26:53 +02:00
Manuel Kress
272da51bfd Use ITIMER_REAL for timeout handling on MacOS / Apple Silicon system
setitimer(ITIMER_PROF) fires too early on MacOS 14 when running on Apple
Silicon. See https://openradar.appspot.com/radar?id=5583058442911744.

Fixes GH-12814
Closes GH-13567
2024-05-28 15:25:46 +02:00
Peter Kokot
2d66562e4b Sync HAVE_IPV6 and HAVE_GETADDRINFO in #if/ifdef/defined (#14341)
Follow up of GH-5526 (-Wundef)
2024-05-28 11:52:25 +02:00
Dmitry Stogov
5109cf1010 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix incorrect conditions
2024-05-28 08:38:00 +03:00
Dmitry Stogov
034bd85ad1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix incorrect conditions
2024-05-28 08:37:48 +03:00
Dmitry Stogov
48ae025c33 Fix incorrect conditions 2024-05-28 08:37:20 +03:00
Valentin Udaltsov
b6b16a1758 [RFC] Implement dereferencable for new exprs with constructor args
https://wiki.php.net/rfc/new_without_parentheses

Closes GH-13029
2024-05-28 00:23:12 +02:00
Máté Kocsis
cc477ff3bb Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix gen_stub.php errors (#14335)
2024-05-27 22:49:59 +02:00
Máté Kocsis
9ac59d08e4 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix gen_stub.php errors (#14335)
2024-05-27 22:47:24 +02:00
Valentin Udaltsov
583ac15cd6 Fix gen_stub.php errors (#14335) 2024-05-27 22:46:50 +02:00
Valentin Udaltsov
be19e7954d Fix gen_stub.php errors (#14335) 2024-05-27 22:11:23 +02:00