1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00
Commit Graph

128970 Commits

Author SHA1 Message Date
David Carlier 7e72c3dc8a [ci skip] NEWS typo 2022-07-15 14:53:42 +01:00
David CARLIER c56e183226 opcache JIT: Adds initial support for macOs Instruments performance measurement.
By default, it is based on the perf_event Linux api, here
we add the proprietary Apple's format using directly its api.

Closes #8914.
2022-07-15 14:27:07 +01:00
Christoph M. Becker d6fc165028 Drop useless TODO comment
Cf. <https://github.com/php/php-src/pull/9018#issuecomment-1185481492>.
2022-07-15 14:23:59 +02:00
jcm 30d89b19cf QA - mb_http_input - function returns FALSE for type 'L' or 'l'
Closes GH-9018.
2022-07-15 14:22:39 +02:00
David Carlier 7dcd8f854d Merge branch 'PHP-8.1' 2022-07-15 12:49:59 +01:00
David Carlier f15cfba39b Merge branch 'PHP-8.0' into PHP-8.1 2022-07-15 12:48:09 +01:00
David CARLIER d830a1f6f0 random extension macOs handling update.
Not such as fix but taking more precautions.
Indeed, the arc4random has two little flaws in this platform,
one already caught upfront by the extension (ie size 0), also
internal use of ccrng_generate which can silently fail in few rare
cases.

Closes #7824.
2022-07-15 12:43:43 +01:00
Cristian Rodríguez 3be9118662 random: whitelist arc4random_buf if glibc
Glibc will soon implement the BSD arc4random API. whitelist its
implementation as safe.

Closes #8984.
2022-07-15 12:33:05 +01:00
Arnaud Le Blanc 2673c1dfa1 [ci skip] NEWS 2022-07-15 13:21:39 +02:00
Arnaud Le Blanc 4552941219 Merge branch 'PHP-8.1'
* PHP-8.1:
  [ci skip] NEWS
  Fix `WeakMap` object reference offset causing `TypeError` (#8995)
2022-07-15 13:19:12 +02:00
Arnaud Le Blanc aadb24e817 Merge branch 'PHP-8.0' into PHP-8.1 2022-07-15 13:15:05 +02:00
Arnaud Le Blanc 20473374fa [ci skip] NEWS 2022-07-15 13:14:17 +02:00
Tobias Bachert ede92a86f2 Fix WeakMap object reference offset causing TypeError (#8995) 2022-07-15 13:00:48 +02:00
Ilija Tovilo 63912b5ecd Fix RC func info of str_split (#9016)
Introduced in GH-8945

With RETURN_EMPTY_ARRAY this function can now return an interned array which
has refcount 2.
2022-07-15 11:23:55 +02:00
Rowan Tommins af15923bc3 Extend deprecation notices to is_callable($foo) and callable $foo
Implements https://wiki.php.net/rfc/partially-supported-callables-expand-deprecation-notices
so that uses of "self" and "parent" in is_callable() and callable
type constraints now raise a deprecation notice, independent of the
one raised when and if the callable is actually invoked.

A new flag is added to the existing check_flags parameter of
zend_is_callable / zend_is_callable_ex, for use in internal calls
that would otherwise repeat the notice multiple times. In particular,
arguments to internal function calls are checked first based on
arginfo, and then again during ZPP, so the former suppresses the
deprecation notice.

Some existing tests which raised this deprecation have been updated
to avoid the syntax, but the existing version retained for maximum
regression coverage until it is made an error.

With thanks to Juliette Reinders Folmer for the RFC and initial
investigation.

Closes GH-8823.
2022-07-14 17:07:42 +02:00
David Carlier 37e214bdc2 Merge branch 'PHP-8.1' 2022-07-14 12:20:59 +01:00
Juan Morales 492093ac3d QA - ftp_connect - error behavior when connection fails
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-9002.
2022-07-14 13:16:56 +02:00
Juan Morales 7b301e3a5e QA - pcntl_signal - error when handler is int and not SIG_DFL or SIG_IGN
Closes GH-9001.
2022-07-14 13:13:59 +02:00
David Carlier b44a17c02a Merge branch 'PHP-8.0' into PHP-8.1 2022-07-14 12:13:21 +01:00
guoyiyuan 789a37f144 Prevent potential buffer overflow for large value of php_cli_server_workers_max
Fixes #8989.
Closes #9000.
2022-07-14 12:12:25 +01:00
Juan Morales 492f9c607a QA - pcntl_exec - check stringable parameters error
Closes GH-8990.
2022-07-13 18:29:15 +02:00
Ayesh Karunaratne 9f8e5182a1 INI parser: Fix typo /multipler/multiplier
Closes GH-8987.
2022-07-13 12:16:26 +02:00
Christoph M. Becker 56804e3221 Fix GH-8750: Can not create VT_ERROR variant type
We add support for creating `VT_ERROR` variants via `__construct()`,
and allow casting to int via `variant_cast()` and `variant_set_type()`.
We do not, however, allow type conversion by other means, to avoid
otherwise easily introduced type confusion.  VB(A) also only allows
explicit type conversion.

We also introduce `DISP_E_PARAMNOTFOUND` which might be the most
important `scode` for this purpose, since this allows to skip optional
parameters in method calls.

Closes GH-8886.
2022-07-12 16:43:14 +02:00
Remi Collet 6e24c16c4a add compatibility for tentative-return-type 2022-07-12 15:22:49 +02:00
Christoph M. Becker 5365e1d5f1 [ci skip] Fix NEWS entry 2022-07-12 13:43:41 +02:00
Christoph M. Becker 31b02a13ab Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8923: error_log on Windows can hold the file write lock
2022-07-12 13:39:55 +02:00
Christoph M. Becker 5a459f6783 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8923: error_log on Windows can hold the file write lock
2022-07-12 13:38:35 +02:00
Christoph M. Becker 77e954afaa Fix GH-8923: error_log on Windows can hold the file write lock
On Windows, closing a file which is locked may not immediately remove
the lock.  The `LockFileEx()` documentation states:

| Therefore, it is recommended that your process explicitly unlock all
| files it has locked when it terminates.

We comply, and also use the macro `LOCK_EX` instead of the magic number
`2`.

Closes GH-8925.
2022-07-12 13:36:20 +02:00
Máté Kocsis 227a8576d2 Fix parameter order in gen_stub.php 2022-07-12 13:08:08 +02:00
Tim Düsterhus 342e18f105 Support the actual #[\SensitiveParameter] attribute in stubs (#8836) 2022-07-12 12:43:44 +02:00
Christoph M. Becker f22e0df033 [ci skip] Add missing NEWS entry
Cf. 32cceb75bf.
2022-07-12 12:00:08 +02:00
Christoph M. Becker 2fc9e769e8 Fix GH-8576: Bad interpretation of length when char is UTF-8
For columns of type `SQL_TEXT`, Firebird does not properly report the
actual column length, but rather only the maximum column length, so for
multi-byte encodings like UTF-8, such columns may have trailing
spaces.  We work around that by treating such columns as `SQL_VARYING`
when we ask the server to describe the colum, what yields the desired
results.

Given that this is a work-around, and may break code which expects the
results with trailing spaces, we target "master" only.

Closes GH-8926.
2022-07-12 11:57:25 +02:00
Máté Kocsis bb5be650c6 Require zend_constants.stub.php from zend_exceptions.stubs.php
Because E_ERROR is referenced in this file
2022-07-12 10:35:03 +02:00
Máté Kocsis 0bddbab084 Make the ABI compatibility of generated arginfo files configurable (#8931) 2022-07-12 10:27:53 +02:00
Christoph M. Becker 32cceb75bf Update to libpcre2 10.40 2022-07-11 19:45:46 +02:00
Arnaud Le Blanc c654973c02 .gdbinit: Update print_ht for new compact packed arrays representation (#8966) 2022-07-11 18:04:56 +02:00
Tim Düsterhus 75a9a5f311 Add zend_array_to_list() (#8976)
* Add zend_array_to_list()

* Use `zend_array_to_list()` in `PHP_FUNCTION(array_values)`
2022-07-11 15:29:40 +02:00
Juan Morales 23654a172e QA - Test Cov - ext:pcntl - pcntl_signal() - max signal allowed (#8956)
Co-authored-by: jcm <juan.carlos.morales@tradebyte.com>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-07-11 13:45:42 +01:00
Ayesh Karunaratne a759a7fabc [skip ci] Readme: Add Github Actions nightly workflow status badge (#8971) 2022-07-11 14:14:39 +02:00
Mark Gallagher 327bb21986 FPM: Implement access log filtering
Adds a setting "access.suppress_path" to php-fpm pool configurations
which causes successful GET requests to the specified URIs to be
excluded from the access log. This is to reduce noise caused by
automated health checks.

Requests with response codes outwith the successful range 200 - 299,
requests made with query parameters and requests which have a
Content-Length other than 0 will ignore this setting as a security
precaution.

Closes GH-8174, #80428 [1]

[1] https://bugs.php.net/bug.php?id=80428
2022-07-10 23:21:14 +01:00
Ayesh Karunaratne 5ad056ceae [skip ci] Readme: Fix build-status icon link for Travis CI (#8970) 2022-07-10 23:09:31 +02:00
David Carlier 185d604d56 NEWS/UPGRADING changes 2022-07-10 21:30:08 +01:00
David Carlier dedad408fe sockets introduces socket_set_option SO_ZEROCOPY and MSG_ZEROCOPY for the socket_send* functions. it avoids copy b/w userland and kernel for both TCP and UDP protocols. 2022-07-10 20:06:52 +01:00
Michael Voříšek 6cd5bd1bcd Fix "%f" regex in run-tests.php (#8965)
"-.0.0" and "0." is no longer matched wrongly
2022-07-10 15:33:10 +02:00
Arnaud Le Blanc d217a669fc [ci skip] NEWS 2022-07-10 15:18:51 +02:00
Arnaud Le Blanc 77f73de5bb XFAIL test 2022-07-10 14:49:42 +02:00
Dennis Snell 492af9f88e Add ini_parse_quantity function to convert ini quantities shorthand notation to int (#8454) 2022-07-10 14:48:52 +02:00
Arnaud Le Blanc 61ad0d9136 Fix build 2022-07-09 23:30:15 +02:00
Arnaud Le Blanc da1cbd20c3 Merge branch 'PHP-8.1'
* PHP-8.1:
  [ci skip] NEWS
  Fix GH-8952: std streams can not be deliberately closed (#8953)
  intl extension, build fix for icu >= 69.x release. ubrk/ucnv_safeClone had been deprecated in favor of ubrk/ucnv_clone which does not use user provided stacks but remain thread safe.
2022-07-09 23:01:07 +02:00
Arnaud Le Blanc d86141a891 [ci skip] NEWS 2022-07-09 23:00:52 +02:00