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

134634 Commits

Author SHA1 Message Date
Tim Düsterhus
b1f5ca59d1 Remove ext/random backwards-compatibility headers (#13108)
When ext/random was initially added in PHP 8.2, these headers started
“forwarding” to the new ext/random/php_random.h to reduce the impact on
existing extensions.

As master already contains some breaking changes of the internal API of
ext/random and as the last PHP version without ext/random will be EOL once
master is released, it appears appropriate to drop these headers now.
2024-01-12 15:18:42 +01:00
Máté Kocsis
2ae2af5e2e Fix missing periods in the NEWS file
[skip-ci]
2024-01-12 14:15:30 +01:00
Max Semenik
a2b2830f9b ext/standard: make debug_zval_dump() output whether the array is packed (#12641) 2024-01-12 00:33:14 +00:00
Máté Kocsis
d6a0b3af68 Implement PDO driver-specific subclasses
RFC: https://wiki.php.net/rfc/pdo_driver_specific_subclasses
Closes GH-12804

Co-Authored-By: Danack <Danack@basereality.com>
2024-01-11 23:22:41 +01:00
David Carlier
b985a31b0a sapi/fpm: setting backlog default to -1 for DragonFlyBSD.
like most of BSD, when negative the syscall sets it internally to
SOMAXCONN.

close GH-13077
2024-01-11 20:39:41 +00:00
Jakub Zelenka
08b9e8ae9c Merge branch 'PHP-8.3' 2024-01-11 16:48:38 +00:00
Jakub Zelenka
1c7dc0f300 Merge branch 'PHP-8.2' into PHP-8.3 2024-01-11 16:48:03 +00:00
Jakub Zelenka
b04b09ef56 Fix GH-12996: Incorrect SCRIPT_NAME with Apache ProxyPassMatch when plus in path
Closes GH-13072
2024-01-11 16:47:08 +00:00
Máté Kocsis
d54e2f9df2 Fix CODEOWNERS rule order
I stopped getting notifications a while ago even though they used to appear from time to time. After reading https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners, it looks like the other rules shadow mine. Therefore I'm putting my rule to the end.
2024-01-11 17:00:00 +01:00
Peter Kokot
c774a8d401 Add bison -Wall flag to Windows build (#13098)
Following the d7d3a1c66e, this adds bison
flag -Wall also to Windows build system.

Flag has been added via 2127a37b83.
2024-01-11 11:05:00 +01:00
Peter Kokot
ad9250183f Remove obsolete _XPG_IV preprocessor directive (#13035)
This was once used on SINIX UNIX variant and MIPS processors with the
last release in 1995 to have working gettimeofday().
2024-01-11 10:54:13 +01:00
Tim Düsterhus
db68565d03 random: Dynamically calculate the state size when seeding with CSPRNG
Instead of hardcoding struct names, or even sizes, we can just determine the
actual size of the target structure using sizeof().
2024-01-11 08:54:18 +01:00
Tim Düsterhus
62aa8fa375 random: Reduce variable scope in Random\Engine\PcgOneseq128XslRr64::__construct()
This is for consistency with xoshiro256**'s constructor.
2024-01-11 08:54:18 +01:00
Peter Kokot
8d7364f0bb Align configure check message results together 2024-01-11 00:02:28 +01:00
David CARLIER
9726721560 general signatures discrepencies fixes (#13122) 2024-01-10 22:19:23 +00:00
hanshenrik
fc16285538 ext/curl: deprecate CURLOPT_BINARYTRANSFER
This is long overdue, CURLOPT_BINARYTRANSFER has been a no-op since PHP5.1.2 in 2004 (ref https://bugs.php.net/bug.php?id=55635 )

Close GH-13114.
2024-01-10 18:16:52 +00:00
Dmitry Stogov
52cc17c665 New test 2024-01-10 17:39:34 +03:00
Dmitry Stogov
d9dfad8ea9 Update IR
IR commit: a6cfbffb0da4e11c45537dd83159c36eece6efa9
2024-01-10 17:38:48 +03:00
divinity76
16c1c49f1b Update re2c and bison version error message "or newer" (#13112)
* nitpick re2c "or newer"
* nitpick bison "or newer"
2024-01-10 12:28:05 +01:00
Peter Kokot
64751a0df0 Merge branch 'PHP-8.3'
* PHP-8.3:
  Set libtool tag per command instead of global one
2024-01-10 09:17:48 +01:00
Peter Kokot
04954f6b2c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Set libtool tag per command instead of global one
2024-01-10 09:13:39 +01:00
Jan Palus
d57a7767a2 Set libtool tag per command instead of global one
Global --tag=CC defined in configure.ac is not correct in all cases. For example
linking objects that were compiled from C++ sources needs to be done with C++
compiler, however for link mode libtool will prefer compiler indicated with
--tag.

Fixes GH-12349
2024-01-10 09:09:45 +01:00
Peter Kokot
fd7342f62f Fix _GNU_SOURCE redefined warnings in config.log
_GNU_SOURCE is already defined when doing these checks and warnings are
emitted otherwise in the configuration step.
2024-01-10 08:39:29 +01:00
David Carlier
b667616fe0 Merge branch 'PHP-8.3' 2024-01-09 22:01:37 +00:00
David Carlier
7d238bf2d5 Merge branch 'PHP-8.2' into PHP-8.3 2024-01-09 22:01:15 +00:00
David Carlier
1e464e5b55 ext/gd: Fix GH-13082
Issue occur when compiling with recent clang releases (> 13) and
 with the '-Os' optimisation level, after using
`imageloadfont` which returns a proper GdFont class leads to
 a subtle bug when attempting to use via the imagefont* function.
2024-01-09 22:01:00 +00:00
haszi
fed9cf6868 Mark ob_start callback parameter nullable 2024-01-09 22:55:49 +01:00
Niels Dossche
5e34bb8916 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13094: range(9.9, '0') causes segmentation fault
2024-01-09 22:12:35 +01:00
Niels Dossche
1d6f344bea Fix GH-13094: range(9.9, '0') causes segmentation fault
`start_type + end_type < 2*IS_STRING` is not right, in this test case
the types are start_type==5 (IS_DOUBLE), end_type==7 (IS_ARRAY).
The IS_ARRAY type is a sentinel to disambiguate single-byte strings.
The path must be taken when one of the types is not a string nor a
single-byte string. Therefore, use < IS_STRING with an OR condition.

Closes GH-13105.
2024-01-09 22:11:45 +01:00
Tim Düsterhus
4cda181c11 [skip ci] Update ext/random year for myself in EXTENSIONS 2024-01-09 20:53:28 +01:00
Tim Düsterhus
162e1dce98 random: Optimize data flow for the generate function of native engines (#13043)
Instead of returning the generated `uint64_t` and providing the size (i.e. the
number of bytes of the generated value) out-of-band via the
`last_generated_size` member of the `php_random_status` struct, the `generate`
function is now expected to return a new `php_random_result` struct containing
both the `size` and the `result`.

This has two benefits, one for the developer:

It's no longer possible to forget setting `last_generated_size` to the correct
value, because it now happens at the time of returning from the function.

and the other benefit is for performance:

The `php_random_result` struct will be returned as a register pair, thus the
`size` will be directly available without reloading it from main memory.

Checking a simplified version of `php_random_range64()` on Compiler Explorer
(“Godbolt”) with clang 17 shows a single change in the resulting assembly
showcasing the improvement (https://godbolt.org/z/G4WjdYxqx):

    - add     rbp, qword ptr [r14]
    + add     rbp, rdx

Empirical testing confirms a measurable performance increase for the
`Randomizer::getBytes()` method:

    <?php
    $e = new Random\Engine\Xoshiro256StarStar(0);
    $r = new Random\Randomizer($e);

    var_dump(strlen($r->getBytes(100000000)));

goes from 250ms (before the change) to 220ms (after the change). While
generating 100 MB of random data certainly is not the most common use case, it
confirms the theoretical improvement in practice.
2024-01-09 19:04:29 +01:00
Dmitry Stogov
d778c24aa2 Merge branch 'PHP-8.3'
* PHP-8.3:
  Disable inlining and inter-procedure-analyses for zend_string_equal_val() function that may be overriden for valgrind (#13099)
2024-01-09 20:06:15 +03:00
Dmitry Stogov
71a1defdfa Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Disable inlining and inter-procedure-analyses for zend_string_equal_val() function that may be overriden for valgrind (#13099)
2024-01-09 20:06:07 +03:00
Dmitry Stogov
6339938c7e Disable inlining and inter-procedure-analyses for zend_string_equal_val() function that may be overriden for valgrind (#13099)
This is a more safely way to fix GH-9068
2024-01-09 20:05:51 +03:00
Ilija Tovilo
d7d0d19d32 Support index.php fallback for files in built-in server
If no router script is used, the built-in webserver will now look for a fallback
index file recursively in all cases, including URLs with a period.

Fixes GH-12604
Closes GH-12992
2024-01-09 16:13:39 +01:00
Ilija Tovilo
8876639d11 Add X-Powered-By header to builtin 404 page (#13092)
As requested by 30929c9a88 (r1434156785).
2024-01-09 16:10:39 +01:00
Ilija Tovilo
59c38969de [skip ci] Remove PHP 8.0 references from CI 2024-01-09 10:39:20 +01:00
Gabriel Caruso
811c5ff2f4 [ci skip] PHP 8.0 is EOL
Following php/web-php#840, 670052c42 and php/web-qa#c7b24521eb1
2024-01-09 01:46:59 +01:00
Peter Kokot
3b73db612b Remove unused symbol HAVE_ODBC2 (#13088) 2024-01-08 23:32:46 +01:00
Peter Kokot
6aad7a07bb Fix DragonFly build (#13085)
On DragonFly by default the BSD make is used with the CSH shell and the
first prerequisite variable `$<` in Makefile doesn't work there. So, we
can simplify this by simply repeating the filename here.
2024-01-08 23:32:30 +01:00
Máté Kocsis
8e38226abf Merge branch 'PHP-8.3'
* PHP-8.3:
  Backport upgrading PHP-Parser to PHP-8.3
2024-01-08 16:18:26 +01:00
Máté Kocsis
10e8a0d17e Backport upgrading PHP-Parser to PHP-8.3 2024-01-08 16:16:45 +01:00
Ilija Tovilo
d8df700e45 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix run-tests.php differ calculateCommonSubsequence for EXPECTF
2024-01-08 13:36:51 +01:00
Ilija Tovilo
379e913e1a Fix run-tests.php differ calculateCommonSubsequence for EXPECTF
calculateCommonSubsequence should not contain regexes.

Fixes GH-13083
Closes GH-13084
2024-01-08 13:36:29 +01:00
Máté Kocsis
281555d02d Migrate to the final version of PHP-Parser 5.0.0 2024-01-08 00:14:13 +01:00
Jorg Adam Sowa
73722df439 Improve preg_* functions warnings for NUL byte (#13068)
* Improve error messages for preg_ functions
* Adjusted tests and fixed formatting
* Removed unnecessary strings from preg_* tests
* Removed ZPP tests
2024-01-07 13:40:54 +00:00
haszi
90800b62bb Change PHP_ZTS and PHP_DEBUG to bool to match their ZEND equivalents (#13079)
Co-authored-by: haszi <haszika80@gmail.com>
2024-01-07 13:38:26 +00:00
Peter Kokot
6f3888fe9a Remove root library check for dlopen() and dlsym() (#13086)
The root library was added here for the Haiku system, to check dlopen()
and dlsym(). However, the root library is already explicitly linked in
the system, and it does not need to be checked neither linked anymore,
since at least ~2013.
2024-01-07 10:07:17 +01:00
Peter Kokot
2fec3e7f41 Remove unused phpdbg build variables (#13078)
- PHP_PHPDBG_CFLAGS and PHP_PHPDBG_FILES were once used in the generated
  Makefile.
- BUILD_PHPDBG check was used together with unused and obsolete phpdbg
  webhelper configuration.
2024-01-06 18:52:55 +01:00
Arnaud Le Blanc
44a246ed6d Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] NEWS
  [ci skip] NEWS
  Fix timer leak (#13027)
2024-01-05 19:47:58 +01:00