Commit Graph

737 Commits

Author SHA1 Message Date
Remi Collet
587ab00698 NEW and UPGRADING 2018-07-05 06:34:08 +02:00
Dmitry Stogov
3a8f26060c Argument unpacking with Traversables and non-integer keys.
Changed error message, added UPGRADING note and test.
2018-07-04 22:34:36 +03:00
Rudi Theunissen
30156d588c Fixed bug #63217
Don't automatically convert literal string keys to integers on
array access, as we may be dealing with an ArrayAccess object,
rather than a plain array.
2018-07-02 16:41:59 +02:00
Jakub Zelenka
ce0721bee5 Update NEWS, UPGRADING and default php.ini files with syslog changes 2018-07-01 18:27:36 +01:00
Christoph M. Becker
3f241f3caa Update UPGRADING wrt. PCRE2
The upgrade to PCRE2 should mostly be transparent to existing code, but
apparently there are some minor differences, which warrant a note in
UPGRADING (and consequently, in the migration guide).
2018-06-27 15:19:41 +02:00
Nikita Popov
2543e61aed Fixed bug #76509
In PHP static properties are shared between inheriting classes,
unless they are explicitly overwritten. However, because this
functionality was implemented using reference, it was possible
to break the implementation by reassigning the static property
reference.

This is fixed by switching the implementation from using references
to using INDIRECTs, which cannot be affected by userland code.
2018-06-25 15:04:09 +02:00
Nikita Popov
490a49d0bb Use COPY_DEREF for DIM_IS and LIST_R as well
Also add an upgrading note for the behavior change, not that we
expect anyone to be affected...
2018-06-25 14:23:06 +02:00
Christoph M. Becker
d169d06d30 Remove useless PHPDBG_* constants
The sole purpose of `PHPDBG_FILE`, `PHPDBG_METHOD`, `PHPDBG_LINENO` and
`PHPDBG_FUNC` has been to be passed as first argument to `phpdbg_break`.
However, this functions is replaced as of PHP 5.6.3 by
`phpdbg_break_file`, `phpdbg_break_method` and 'phpdbg_break_func`,
respectively.  Therefore, we're finally removing the useless constants.
2018-06-25 11:42:54 +02:00
Charles R. Portwood II
55277a6684 RFC: Argon2 Password Hash Enhancements Implementation of Argon2id per RFC https://wiki.php.net/rfc/argon2_password_hash_enhancements
- m4 and Windows configure scripts now forces Argon2 reference library version >= 20161029
- Implementation tested against 20161029 and 20171227 for Argon2id support
- Updates Argon2 ext/standard/password/tests to run tests for both Argon2i and Argon2id
2018-06-21 13:26:57 +02:00
Gabriel Caruso
fc775f6915 Report unknown variables passed to compact() 2018-06-19 12:50:15 +02:00
Nikita Popov
d04917c7b3 Fixed bug #75218
I've introduced a new CompileError type, from which ParseError
inherits. These errors are not parse errors in the narrow sense
of the term, even though they happen to be generated during
parsing in our implementation. Additionally reusing the ParseError
class for this purpose would change existing error messages (if
the exception is not caught) from a "Fatal error:" to a "Parse
error:" prefix, and also the error kind from E_COMPILE_ERROR to
E_PARSE.
2018-06-16 12:41:03 +02:00
Victor Csiky
71c04324b7 Fixe bug #76386
..that is also a duplicate of #67122
2018-06-15 07:23:31 +02:00
Nikita Popov
f2be6e732a Update data tables for Unicode 11 2018-06-11 20:25:37 +02:00
Christoph M. Becker
3cbf594dfd Deprecate image2wbmp()
According to https://wiki.php.net/rfc/image2wbmp, we deprecate
`image2wbmp()`, rename the `$threshold` parameter to `$foreground`, and
remove superfluous code.
2018-06-10 00:33:42 +02:00
Anatol Belski
e147eb24b2 [ci skip] Add UPGRADING note 2018-06-02 20:58:39 +02:00
Nikita Popov
c70468b8d3 Add note about heredoc BC break 2018-05-28 22:14:04 +02:00
Nikita Popov
cc98b88087 UPGRADING tweaks
Fix a typo and clarify that Reflection changes only affect string
export. No API relevant return values are changed.

[ci skip]
2018-05-26 21:59:36 +02:00
Nikita Popov
95c9d9d2d7 Add some upgrading notes for mbstring 2018-05-25 12:09:51 +02:00
Anatol Belski
e788708e01 [ci skip] Add upgrading note 2018-05-17 13:18:43 +02:00
Jakub Zelenka
1f474272e5 Update NEWS and UPGRADING for openssl_pkey_derive 2018-05-09 19:56:34 +01:00
Thomas Punt
4887357269 Implement flexible heredoc/nowdoc syntax
RFC: https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes

* The ending label no longer has to be followed by a semicolon or
  newline. Any non-label character is fine.
* The ending label may be indented. The indentation will be stripped
  from all lines in the heredoc/nowdoc string.

Lexing of heredoc strings performs a scan-ahead to determine the
indentation of the ending label, so that the correct amount of
indentation can be removed when calculting the semantic values for
use by the parser. This makes the implementation quite a bit more
complicated than we would like :/
2018-04-13 21:35:37 +02:00
Christoph M. Becker
c8c0bb11e7 [ci skip] Update UPGRADING
Cf. ce1d69a1f6 and
fef879a2d6, respectively.

Patch provided by Gabriel Caruso.
2018-04-12 19:00:22 +02:00
Anatol Belski
39301abbe1 Expose functionality for NFKC_Casefold normalization 2018-04-06 18:14:11 +02:00
Anatol Belski
36014ad23f Replace the deprecated API by the newer one available with ICU 56+ 2018-04-06 10:12:44 +02:00
Christoph M. Becker
a9ab5d473b [ci skip] Update UPGRADING
5c5bd30339 removed support for `--with-libmbfl`.
2018-04-04 14:11:37 +02:00
Tim Bazuin
033907b9a5 Add support for rl_completion_suppress_append and rl_completion_append_character
These options are only available with libreadline.
2018-03-25 18:21:35 +02:00
timurib
f7f48643e7 Remove redundant warning in array_push() and array_unshift()
Cf. https://github.com/php/php-src/pull/3011.
2018-03-25 17:49:04 +02:00
Christoph M. Becker
aed1e358dc Implement #51368: php_filter_float does not allow custom thousand separators
A set of hard-coded thousand separator characters (presently, `',.`) is
somewhat limited (users may prefer other separators, such as spaces or
underscores), as well as somewhat too liberal (arbitrary combinations
of different thousand separators are presently possible).  Therefore we
introduce a `thousand` option analogous to `decimal`, which allows to
define the desired thousand separators as non-empty string, defaulting
to `',.`.  While we easily could support empty strings here as well,
that would not make much sense, since this behavior can more easily be
accomplished by not setting the `FILTER_FLAG_ALLOW_THOUSAND` flag in
the first place.
2018-03-24 15:04:32 +01:00
Paul Crovella
aca0f7e24c [ci skip] Add normalizer_get_raw_decomposition to UPGRADING 2018-03-23 10:37:05 +01:00
Gabriel Caruso
d0ee2a8254 Add is_countable function
RFC: https://wiki.php.net/rfc/is-countable
2018-03-11 16:41:16 +01:00
Jonathan Torres
1cb3c15032
Fix typo in upgrade notes 2018-03-09 12:06:17 +01:00
Nikita Popov
47699a24e6 Bump libcurl requirement to 7.15.5
The existence of the following functions is now guaranteed:
 * curl_escape()
 * curl_unescape()
 * curl_multi_setopt()

libcurl 7.15.5 has been released 11.5 years ago and is available
even in RHEL 5.
2018-02-03 21:11:20 +01:00
Benjamin Morel
85021a3993 Add CURLOPT_REQUEST_TARGET constant 2018-02-03 20:43:18 +01:00
Anatol Belski
b2a1199d33 [ci skip] Fix typos 2018-01-12 19:12:54 +01:00
Anatol Belski
d857703bdb [ci skip] Update UPGRADING 2018-01-12 07:45:39 +01:00
Anatol Belski
45db77ed0d Revert "Add possibility to lower timer resolution"
This reverts commit c3717d9aec.

The final mitigation of the consequences with spectre should be
discussed more also with the regard to the happenings on the
developments. Right now a preliminary mitigation might be wrong or
suboptimal, thus reverting this.
2018-01-11 12:40:01 +01:00
Anatol Belski
c3717d9aec Add possibility to lower timer resolution
The recently discovered security flaw Spectre requires a high resolution
timer. To the today's knowledge, PHP can't be used to create an attack for
this flaw. Still some concerns were raised, that there might be impact in
shared hosting environments. This patch adds a possibility to reduce the
timer resolution by an ini setting, thus giving administrators full
control. Especially, as the flaw was also demonstrated by an abuse of
the JS engine in a browser, Firefox reduced several time sources to 20us.
Any programming language, that doesn't compile to JIT, won't be able to
produce an attack vector for Meltdown and Spectre, at least by todays
knowledge. There are also other factors that say that the security
concern on the hrtime feature is to the big part not justified, still we
aim JIT in the future. Thus, adding a possibility to control the timer
resolution is a good and small enough tradeoff for safety and future.
2018-01-10 18:45:15 +01:00
Anatol Belski
83497327e7 Implement high resolution monotonic timer function hrtime() 2018-01-07 16:03:52 +01:00
Xinchen Hui
ec69cb664f Added entry on UPGRADING 2018-01-04 13:50:34 +08:00
Nikita Popov
b2b2b437af Add _IS_NUMBER as cast_object() target type
convert_scalar_to_number() will now call cast_object() with an
_IS_NUMBER argument, in which case the cast handler should return
either an integer or floating point number, whichever is more
appropriate.

Previously convert_scalar_to_number() unconditionally converted
objects to integers instead.

Fixes bug #53033.
Fixes bug #54973.
Fixes bug #73108.
2017-12-26 12:39:06 +01:00
Nikita Popov
688b9136ab Fixed bug #54043 2017-12-23 13:35:08 +01:00
Nikita Popov
161fd75773 Bump libcurl requirement to 7.12.1
The existence of the following functions is now guaranteed:
 * curl_reset()
 * curl_strerror()
 * curl_multi_strerror()
 * curl_share_strerror()

libcurl 7.12.1 has been released more than 13 years ago and is
available even in RHEL 4.
2017-12-19 23:23:56 +01:00
Nikita Popov
e512305581 Remove opcache.inherited_hack
This ini directive has already been ignored since PHP 5.3.
2017-12-18 22:00:54 +01:00
Nikita Popov
43d9f5995d Fix duplicate NEWS entry
Also add an UPGRADING note while at it, as this is potentially
BC breaking.

[ci skip]
2017-12-16 17:41:24 +01:00
Nikita Popov
fc80114a48 Add gmp_kronecker()
Exposes the mpz_kronecker(), mpz_si_kronecker() and
mpz_kronecher_si() for computing the Kronecker symbol.
2017-12-11 19:25:54 +01:00
Nikita Popov
10a336d3d0 Add gmp_perfect_power()
Exposes the mpz_perfect_power_p() function.

We already had the more specific gmp_perfect_square() function.
2017-12-11 19:25:54 +01:00
Nikita Popov
a1d36a1157 Add gmp_lcm()
Exposes mpz_lcm() and mpz_lcm_ui() for calculating the least
common multiple.

We already expose the somewhat complementary gmp_gcd() function.
2017-12-11 19:25:54 +01:00
Nikita Popov
7fea79675c Add gmp_binomial()
Adds PHP bindings for mpz_bin_ui and mpz_bin_uiui, for calculating
binomial coefficients.
2017-12-11 19:25:54 +01:00
David Walker
6d4de4cf05 Implement list() reference assignments
Support list() reference assignments of the form:

    list(&$a, list(&$b, $c)) = $d;

RFC: https://wiki.php.net/rfc/list_reference_assignment
2017-12-09 13:39:52 +01:00
Nikita Popov
9cdd547eca Fixed bug #74372 2017-12-06 23:36:09 +01:00