Commit Graph

856 Commits

Author SHA1 Message Date
Dik Takken
77cf3d7b11 Allow array_merge() / array_merge_recursive() without arguments
This allows writing

    array_merge(...$arrays)

instead of

    array_merge([], ...$arrays)

and is in line with similar changes to array_push() and array_unshift()
in PHP 7.3.

Closes GH-4175.
2019-05-28 11:14:15 +02:00
Hugh McMaster
a8f4e8fe73 ext/xml: Use PKG_CHECK_MODULES to detect the Expat library 2019-05-27 15:16:42 +02:00
Nikita Popov
32f87bb575 Add UPGRADING/NEWS entries 2019-05-24 11:00:13 +02:00
Hugh McMaster
9df3e097b8 Use PKG_CHECK_MODULES to detect unixODBC 2019-05-22 09:04:05 +02:00
Peter Kokot
0f7d641724 Add enchant pkg-config notice in UPGRADING 2019-05-17 19:39:22 +02:00
Peter Kokot
16e910ccfd Update UPGRADING about LiteSpeed 2019-05-17 03:18:02 +02:00
Peter Kokot
c27b531af7 Update changelogs 2019-05-15 00:00:01 +02:00
vladyslavstartsev
a07d422ade Warn about non well-formed arguments in bcmath
Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com>
Co-Authored-By: Christoph M. Becker <cmbecker69@gmx.de>
2019-05-14 15:04:21 +02:00
Peter Kokot
dcfc289732 Update changelog 2019-05-14 03:20:03 +02:00
CHU Zhaowei
e829d08729 Implement spread operator in arrays
RFC: https://wiki.php.net/rfc/spread_operator_for_array

Closes GH-3640.
2019-05-13 14:42:43 +02:00
Christoph M. Becker
357da6bc59 Deprecate and ignore $version parameter of curl_version()
`curl_version()`[1] (of ext/curl) makes `curl_version_info()`[2] (of
libcurl) available to PHP userland.  The latter requires to pass an
`age` argument which usually is `CURLVERSION_NOW`, so that the
information returned by the runtime matches the declarations used
during compile time.  For C programs it is simply necessary to pass
this information, and in rare occasions it might make sense to pass
something else than `CURLVERSION_NOW`.  curl.h notes:

| The 'CURLVERSION_NOW' is the symbolic name meant to be used by
| basically all programs ever that want to get version information.

For the PHP binding, using a newer `age` than available at compile time
will neither provide the PHP program more information, nor would using
an older `age` have tangible benefits.

We therefore deprecate the useless `$version` parameter, and if it is
passed nonetheless, we use `CURLVERSION_NOW` instead of the supplied
value, and raise a warning.

[1] <https://www.php.net/manual/en/function.curl-version.php>
[2] <https://curl.haxx.se/libcurl/c/curl_version_info.html>
2019-05-13 08:53:41 +02:00
Theodore Brown
e96c776bd5 Fix typos in upgrade notes 2019-05-12 17:36:48 +02:00
Hugh McMaster
3ece7df9cf Use PKG_CHECK_MODULES to detect the iODBC library 2019-05-12 01:36:46 +02:00
Hugh McMaster
755f6f6ede Use PKG_CHECK_MODULES to detect the systemd library 2019-05-12 00:19:03 +02:00
Kalle Sommer Nielsen
f13fdeadd6 NEWS and UPGRADING for the scatter filter 2019-05-10 02:37:02 +03:00
Nikita Popov
d0a56f707f Fixed bug #71030
Make sure to always fetch the RHS of a list assignment first, instead
of special casing known self-assignments, which will not detect cases
using references correctly.

As a side-effect, it is no longer possible to do something like
byRef(list($x) = $y). This worked by accident previously, but only
if $y was a CV and the self-assignment case did not trigger.
However it shouldn't work for the same reason that byRef($x = $y)
doesn't. Conversely byRef(list(&$x) = $y) and byRef($x =& $y)
continue to be legal.
2019-05-09 14:31:39 +02:00
Christoph M. Becker
72e1da81b6 Deprecate CURLPIPE_HTTP1
`CURLPIPE_HTTP1` is deprecated and has no effect as of cURL 7.62.0[1].
We therefore deprecate the PHP constant as well, and trigger a warning
that it is no longer supported, if used against cURL 7.62.0 and up.

[1] <https://curl.haxx.se/libcurl/c/CURLMOPT_PIPELINING.html>
2019-05-07 17:05:07 +02:00
Nikita Popov
09ea55cb4e Deprecate left-associative ternary
Deprecate nesting ternary operators without explicit parentheses.

RFC: https://wiki.php.net/rfc/ternary_associativity
2019-05-07 14:06:29 +02:00
Peter Kokot
88f64d4a7b [ci skip] Add password registry RFC to changelog 2019-05-07 02:22:29 +02:00
Peter Kokot
6be6cac6f4 [ci skip] Move wddx to dedicated section 2019-05-06 00:58:21 +02:00
Nikita Popov
f3e5bbe6f3 Implement arrow functions
Per RFC: https://wiki.php.net/rfc/arrow_functions_v2

Co-authored-by: Levi Morrison <levim@php.net>
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
2019-05-02 15:04:03 +02:00
Kalle Sommer Nielsen
c8a20dfdca NEWS for ext/interbase unbundling 2019-05-01 23:35:30 +03:00
Nikita Popov
55ecfe4ef3 Add UPGRADING entries 2019-04-29 14:17:44 +02:00
Christoph M. Becker
c68dc6b5e3 Extend CURLFile to support streams
Due to former restrictions of the libcurl API, curl multipart/formdata
file uploads supported only proper files.  However, as of curl 7.56.0
the new `curl_mime_*()` API is available (and already supported by
PHP[1]), which allows us to support arbitrary *seekable* streams, which
is generally desirable, and particularly resolves issues with the
transparent Unicode and long part support on Windows (see bug #77711).

Note that older curl versions are still supported, but CURLFile is
still restricted to proper files in this case.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=a83b68ba56714bfa06737a61af795460caa4a105>
2019-04-29 10:21:07 +02:00
Nikita Popov
3cfbbf2956 Make DateInterval objects uncomparable
Arbitrary DateInterval objects don't have well-defined comparison
semantics. Throw a warning and treat the objects as uncomparable.

Support for comparing DateInterval objects returned by
DateTime::diff() may be added in the future.
2019-04-23 13:12:06 +02:00
Peter Kokot
a353d4c218 Update changelogs 2019-04-20 16:16:18 +02:00
Hugh McMaster
9f0c9b7ad6 Rename --enable-libxml to --with-libxml to meet naming guidelines 2019-04-18 13:08:02 +02:00
Nikita Popov
e2ea0f105c Fix bug #77866: Port Serializable SPL classes to use __unserialize()
Payloads created using Serializable are still supported.
2019-04-10 09:36:39 +02:00
Florian Berberich
07df6594b5 Added range options to the float validation filter
php_filter_int (called via the constant FILTER_VALIDATE_INT) has the options min_range
and max_range. they allow the user to not only test if a value is a double but also if
the value is inside a specific range. php_filter_float (called via the constant
FILTER_VALIDATE_FLOAT) didn't provide this yet, making validation of numeric but
not-only-int values more complicated for the user.
this commits implements the options min_range and max_range for the function
php_filter_float to fix this inconsistency.
2019-04-08 13:22:26 +02:00
Nikita Popov
d373c11e71 Implement new custom object serialization mechanism
RFC: https://wiki.php.net/rfc/custom_object_serialization
2019-03-22 10:43:06 +01:00
Nikita Popov
6311581ac6 Fix bug #73948
If PREG_UNMATCHED_AS_NULL is used, make sure that unmatched capturing
groups at the end are also set to null, rather than just those in the
middle.
2019-03-21 09:50:20 +01:00
Kalle Sommer Nielsen
26f98ecd19 Sync the changes to ext/filter with 7.4, now that it works.
- Removed --with-pcre-dir
- The filter extension can now be built as shared on Unix with ./configure
2019-03-20 20:09:45 +02:00
Christoph M. Becker
6bbb18a0b6 Unbundle ext/wddx
The extension is now available from <https://pecl.php.net/package/wddx>.

Cf. <https://wiki.php.net/rfc/deprecate-and-remove-ext-wddx>.
2019-03-20 14:15:50 +01:00
Nikita Popov
12bcdd68b4 Fix #77094: Add flags support for pcre_replace_callback(_array) 2019-03-19 10:38:21 +01:00
Nikita Popov
2b9acd37f0 Fixed bug #72685
We currently have a large performance problem when implementing lexers
working on UTF-8 strings in PHP. This kind of code tends to perform a
large number of matches at different offsets on a single string. This
is generally fast. However, if /u mode is used, the full string will
be UTF-8 validated on each match. This results in quadratic runtime.

This patch fixes the issue by adding a IS_STR_VALID_UTF8 flag, which
is set when we have determined that the string is valid UTF8 and
further validation is skipped.

A limitation of this approach is that we can't set the flag for interned
strings. I think this is not a problem for this use-case which will
generally work on dynamic data. If we want to use this flag for other
purposes as well (mbstring?) then it might be worthwhile to UTF-8 validate
strings during interning. But right now this doesn't seem useful.
2019-03-18 16:58:48 +01:00
Joe Watkins
b003e0a0f5
weakrefs upgrading note 2019-03-12 06:52:43 +01:00
Andrew Brampton
c79ce48ddb Fix #71890: Add support for crc32c Castagnoli's polynomial.
This variant of crc32 is heavily used by storage systems, such as iSCSI, SCTP,
Btrfs, ext4, and is increasingly being used in API (such as Google Cloud
Storage, and Apache Kafka).
2019-03-11 10:19:35 +01:00
Nikita Popov
deb44d405e Revert "Detect invalid uses of parent:: during compilation"
This reverts commit a9e6667817.

Breakage found in the wild: Mockery uses a parent:: call in the
implementation regardless of whether the class has a parent or not:
4324afeaf9/library/Mockery/Mock.php (L600)

This change is not worth the compat break in 7.4.
2019-03-04 12:24:02 +01:00
Nikita Popov
7be0e06b48 Remove mysqli embedded server support
This code is not compatible with PHP 7.0. The fact that nobody
complained that the mysqli embedded server functionality doesn't
build anymore seems like a strong signal that we can drop it...
2019-02-28 12:55:16 +01:00
Tyson Andre
12ffee57d6 Fixed bug #77631
Do not include unbound anonymous classes in get_declared_classes().

Note that earlier PHP versions would include the anonymous class in
get_declared_classes(), and return false until the class was bound,
but would not crash.
2019-02-19 10:07:40 +01:00
Remi Collet
b537203d20 use pkg-config for libedit 2019-02-19 09:10:06 +01:00
Pedro Magalhães
40278879fd UPGRADING entry for pcntl_unshare [skip ci] 2019-02-18 19:58:56 +00:00
Christoph M. Becker
fae22461f9 Deprecate case-insensitive constants via typelib import
As of PHP 7.3.0, case-insensitive constants are deprecated.  We catch
up on this with regard to ext/com_dotnet, which allows to import
constants from typelibs, by triggering a deprecation notice whenever
`com_load_typelib()` is called with `$case_sensitive` being `false`,
and whenever `com.autoregister_casesensitive` is set to `false`,
regardless of whether there are actually constants in the typelib which
would be imported.
2019-02-15 13:07:56 +01:00
Nikita Popov
6347f0b937 Implement ReflectionReference
RFC: https://wiki.php.net/rfc/reference_reflection
2019-02-13 12:21:18 +01:00
Anatol Belski
34122ede21 Update NEWS and UPGRADING [ci skip] 2019-02-12 19:14:32 -08:00
legale
d77ad27415 Implement mb_str_split()
RFC: https://wiki.php.net/rfc/mb_str_split
2019-02-12 16:42:51 +01:00
kasper Franz
c4b77e03b1 Correct section number in UPGRADING
This make the top list follow the bottom numbering

[ci skip]
2019-02-12 15:09:09 +01:00
David Carlier
4e87e56e22 Adding bunch of FreeBSD socket options flags specifics.
SO_USER_COOKIE primarly to be traced via dtrace instrumentation.
If SO_USER_COOKIE is available, the rest is so the former is
two years old while the rest is from around 2008.
2019-02-12 10:27:33 +01:00
Christoph M. Becker
6ac8b0a783 Deprecate ext/wddx
Cf. <https://wiki.php.net/rfc/deprecate-and-remove-ext-wddx>.
2019-02-11 19:31:46 +01:00
Nikita Popov
a6c535e658 Add UPGRADING notes for oniguruma unbundling 2019-02-11 15:00:33 +01:00