1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 01:48:26 +02:00
Commit Graph

4671 Commits

Author SHA1 Message Date
Nikita Popov d37d418927 Merge branch 'PHP-7.4' 2019-07-23 11:28:10 +02:00
George Peter Banyard 6d6d954d0d Cleanup of remaining E_STRICT in tests 2019-07-23 11:27:23 +02:00
Nikita Popov a1e2c8870e Merge branch 'PHP-7.4' 2019-07-22 17:26:01 +02:00
Nikita Popov d59aac58b3 Report errors from stream read and write operations
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.

As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).

I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
2019-07-22 17:17:28 +02:00
Nikita Popov 36db71df47 Merge branch 'PHP-7.4' 2019-07-22 12:28:40 +02:00
Nikita Popov b3f74b0b7d Deprecate allow_url_include 2019-07-22 11:39:52 +02:00
Nikita Popov 964de035a7 Deprecate restore_include_path() 2019-07-22 11:39:52 +02:00
Nikita Popov b3668aabf7 Deprecate convert_cyr_string() 2019-07-22 11:39:52 +02:00
Nikita Popov e41b7f6db4 Deprecate (real) cast 2019-07-22 11:39:52 +02:00
Nikita Popov 46b982409a Deprecate implode() with swapped parameter order 2019-07-22 11:39:52 +02:00
Nikita Popov 4e190691e2 Deprecate is_real() function 2019-07-22 11:39:52 +02:00
Nikita Popov b1cdf06673 Deprecate money_format() 2019-07-22 11:39:52 +02:00
Nikita Popov 4e4d8a4a6c Deprecate hebrevc() 2019-07-22 11:39:52 +02:00
Nikita Popov e9e2fa4ad4 Deprecate ezmlm_hash() 2019-07-22 11:39:52 +02:00
Nikita Popov 3121b7174f Deprecate Reflection export() methods
And remove the Reflector::export() interface method.
2019-07-22 11:39:52 +02:00
Nikita Popov 0ba7c3eadf Deprecate array_key_exists() on objects 2019-07-22 11:39:52 +02:00
Nikita Popov b2ea507bea Deprecate get_magic_quotes_gpc() and get_magic_quotes_runtime() 2019-07-22 11:39:52 +02:00
Nikita Popov a5fb908e31 Merge branch 'PHP-7.4' 2019-07-19 10:59:10 +02:00
Nikita Popov aa2e2c3f93 Merge Linux & Windows fwrite test
The test files are the same, just with a different OS check...
2019-07-19 10:59:02 +02:00
Nikita Popov da68dc85a3 Merge branch 'PHP-7.4' 2019-07-18 11:13:38 +02:00
George Peter Banyard 3a5664fdfe Convert E_STRICT into E_NOTICE for htmlentities() function 2019-07-18 11:13:18 +02:00
Nikita Popov 96aae524bf Merge branch 'PHP-7.4' 2019-07-17 15:59:31 +02:00
Nikita Popov 56a2ea7aa2 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-17 15:59:22 +02:00
Nikita Popov 79efd55fc3 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-17 15:59:14 +02:00
Nikita Popov b864abfe23 Fixed bug #69100 2019-07-17 15:58:29 +02:00
Nikita Popov b32e9a9227 Merge branch 'PHP-7.4' 2019-07-17 10:41:34 +02:00
Nikita Popov a986e70991 Avoid double buffering in Zend streams
Disable buffering in PHP streams, to avoid storing and copying the
file contents twice.

This will call stream_set_option() on custom stream wrapper as
well, so the method needs to be implemented to avoid a warning.
2019-07-17 10:40:04 +02:00
Nikita Popov bd38129fa4 Merge branch 'PHP-7.4' 2019-07-16 10:25:14 +02:00
Nikita Popov 26977fdfdd Fix name collisions in fputcsv tests 2019-07-16 10:25:06 +02:00
Remi Collet a7ff3a6483 Fix #78269 password_hash uses weak options for argon2 2019-07-15 14:11:30 +02:00
Remi Collet eab0079c90 Fix #78269 password_hash uses weak options for argon2 2019-07-15 14:10:38 +02:00
Peter Kokot 68c0c812c8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove checks for always enabled spl and pcre
2019-07-13 14:49:00 +02:00
Peter Kokot f5e4771824 Remove checks for always enabled spl and pcre
Closes GH-4397
2019-07-13 14:47:37 +02:00
Christoph M. Becker 156cc1d6c5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78283: no output for explicit environment
2019-07-13 12:03:59 +02:00
Christoph M. Becker 8c76d898a9 Fix #78283: no output for explicit environment
This test does not work on Windows, if the child process has OPcache
enabled via php.ini, since TEMP is not set in the environment, so
OPcache can't find the base address file, and terminates the childs.

To avoid this (and potentially some other issues regarding missing
environment variables, such as PATH), we force the child process to
ignore any ini files.
2019-07-13 12:03:03 +02:00
Christoph M. Becker 3a0dd2d746 Merge branch 'PHP-7.4'
* PHP-7.4:
  Swap implode() argument order in the test helper
2019-07-12 13:28:39 +02:00
Christoph M. Becker 8aa7865997 Swap implode() argument order in the test helper 2019-07-12 13:26:54 +02:00
Nikita Popov 0146bab449 Merge branch 'PHP-7.4' 2019-07-12 12:55:21 +02:00
Nikita Popov 94d37a5dd7 Remove unnecessary uses of allow_url_include in tests 2019-07-12 12:54:34 +02:00
Nikita Popov 9345c191db Remove unnecessary uses of restore_include_path() in tests 2019-07-12 12:54:26 +02:00
Christoph M. Becker a5b095650a Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Temporarily skip test"
2019-07-11 23:34:09 +02:00
Christoph M. Becker d0d02ecc4e Revert "Temporarily skip test"
This reverts commit 4e5a717866.

As of commit 17f7fb7605 the test should
no longer hang.
2019-07-11 23:33:34 +02:00
Nikita Popov 6efb354831 Merge branch 'PHP-7.4' 2019-07-11 17:09:23 +02:00
Nikita Popov 59852c0321 Remove redundant 64-bit ezmlm_hash() test
This test is the same as the as ezmlm_hash_basic.phpt. This function
does not behave differently on 32-bit and 64-bit.
2019-07-11 17:09:18 +02:00
Nikita Popov 74bf7bfb88 Merge branch 'PHP-7.4' 2019-07-11 15:49:02 +02:00
Nikita Popov 6285bb52fa Support redirect+null descriptors in proc_open
This adds support for doing something like:

    [1 => ['pipe', 'w'], 2 => ['redirect', 1]]

This will make descriptor 2 on the child end a dup'd descriptor 1.
This is mainly useful in conjunction with shell-less mode, because
we don't have an easy way to do "2>&1" there.

Additionally we support:

    [1 => ['pipe', 'w'], 2 => ['null']]

Which would be the same as a >/dev/null or >nul redirect, depending
on platform.
2019-07-11 15:48:10 +02:00
Nikita Popov eabe0145d4 Merge branch 'PHP-7.4' 2019-07-11 13:00:06 +02:00
Nikita Popov d20fc5a192 Make proc_open_bug64438.phpt more robust
The test currently assumes that we'll first read the data of
stdout and stderr and then see eof on stdout and stderr. However
we could also read stdout, see eof on stdout, read stderr and see
eof on stderr, depending on timing.

Avoid output ordering issues by collecting events into a per-pipe
array, so interleaving is not visible.
2019-07-11 12:46:56 +02:00
Nikita Popov 106f71cc94 Merge branch 'PHP-7.4' 2019-07-10 12:05:24 +02:00
Nikita Popov c42b7dd6d3 Throw notice on array access on illegal type
No notice is thrown for list() accesses, because we did not come
to an agreement regarding patterns like

    while ([$key, $value] = yield $it->next()) { ... }

where silent null access may be desirable.

No effort is made to suppress multiple notices in access chains
likes $x[0][0][0], because the technical complexity this causes
does not seem worthwhile.

RFC: https://wiki.php.net/rfc/notice-for-non-valid-array-container
2019-07-10 12:02:14 +02:00