Commit Graph

762 Commits

Author SHA1 Message Date
Nikita Popov
fc18f44213 Deprecate unbinding of $this of non-static methods
Static calls to non-static methods have been fully deprecated in
PHP 7.0 as part of https://wiki.php.net/rfc/reclassify_e_strict.

A combination of ReflectionMethod::getClosure() ("fake closures")
and Closure::bindTo() etc can be used to achieve the same behavior.
This commit ensures that a deprecation notice will be thrown also
in this case.
2018-09-29 21:01:27 +02:00
Nikita Popov
96da1fe8a9 Fixed bug #76737
Explicitly prohibit serialization and unserialization of reflection
objects.
2018-09-29 14:47:57 +02:00
Nikita Popov
74235ca5f3 Bump minimum libxml version to 2.7.6
Released Oct 2009, part of RHEL 6.
2018-09-23 15:51:09 +02:00
Christoph M. Becker
7b9b398daa Update NEWS and UPGRADING wrt. PR 2760 2018-09-21 15:15:40 +02:00
Nikita Popov
1a55c3607d Drop --without-libzip option from Travis
We need to build against the system libzip now.

Also add an UPGRADING note.
2018-09-18 12:16:55 +02:00
Christoph M. Becker
6da3a1e3ce Revert "Implement #67331: Have parse_ini_file add empty entries"
This reverts commit 3f3e914df3.

The commit broke some tests on Windows, and generally needs more
though.
2018-09-15 17:08:58 +02:00
Christoph M. Becker
3f3e914df3 Implement #67331: Have parse_ini_file add empty entries
Some INI processors allow to specify empty values by just giving the
key without the equals sign, for instance MySQL and Python.  It appears
to be sensible to add this possibility to our INI parser, so that it
can be used for such INI files as well.  We choose NULL as the value of
empty values.

This syntactical enhancement is a (minor) BC break, though, as can be
seen by the necessary change to bug49692.ini.  The “comment” formerly
has been simply ignored, but now it would be parsed as key with an
empty value.

This PR is based on Adam's former patch.
2018-09-15 15:37:01 +02:00
Christoph M. Becker
01912f93c3 Change default of $variant param of idn_to_ascii() and idn_to_utf8()
According to the “Deprecate and remove INTL_IDNA_VARIANT_2003” RFC[1],
we change the default of the $variant parameter of `idn_to_ascii()` and
`idn_to_utf8()` from `INTL_IDNA_VARIANT_2003` to
`INTL_IDNA_VARIANT_UTS46`.

[1] <https://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003>
2018-09-15 14:41:30 +02:00
Christoph M. Becker
8a4c2f1621 Require ICU ≥ 50.1
Given that ICU is a set of lively developed libraries, that ICU 50.1
has been released on 2012-11-05, and PHP 7.4 is scheduled to be
released seven years after it, we consider it appropriate to ditch
these legacy versions.

Particularly, that would be a reasonable groundwork to implement part
two of the “Deprecate and remove INTL_IDNA_VARIANT_2003” RFC[1], namely
to default idn_to_ascii()'s and idn_to_utf8()'s $variant parameter to
INTL_IDNA_VARIANT_UTS46, which is not defined in ICU < 4.6.

See also the related discussion on internals@[2].

[1] <https://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003>
[2] <http://news.php.net/php.internals/101626>ff
2018-09-15 13:59:54 +02:00
Dmitry Stogov
0fbd2e6a16 Renumber ZEND_ACC_... flags 2018-09-11 17:21:17 +03:00
Christoph M. Becker
bccf0dfba1 Prepare UPGRADING(.INTERNALS) for PHP 7.4
We also add this as task to README.RELEASE_PROCESS, so that it's not
overlooked next time.
2018-07-31 15:54:03 +02:00
Christoph M. Becker
bf5cf79456 Fix UPGRADING 2018-07-31 13:31:28 +02:00
Christoph M. Becker
974abd8b43 Update UPGRADING wrt. samesite cookie RFC
Cf. <https://wiki.php.net/rfc/same-site-cookie>.
2018-07-31 12:48:33 +02:00
Jakub Zelenka
e5a9956336 Update NEWS and UPGRADING with info about syslog.filter 2018-07-22 16:36:36 +01:00
Nikita Popov
4a528d46f5 Add UPGRADING notes for deprecations 2018-07-21 22:48:42 +02:00
Trevor Rowbotham
fb0faf0208 [ci skip] Add new global MBString constants to UPGRADING
The constants are mentioned further up in the New Features section,
but weren't explicitly listed under the New Global Constants section.
2018-07-20 13:17:48 +02:00
Enno Woortmann
50516a6e1f Add implementation and tests for new methods - array_key_first(array $a) Returns the key of the first element or null - array_key_last(array $a) Returns the key of the last element or null 2018-07-17 11:31:00 +02:00
Christoph M. Becker
79a27ccf3f FILTER_FLAG_(SCHEME|HOST)_REQUIRED are now deprecated 2018-07-17 11:01:44 +02:00
Nikita Popov
3588d8af12 Deprecate case-insensitive constants
RFC: https://wiki.php.net/rfc/case_insensitive_constant_deprecation
2018-07-16 19:16:55 +02:00
Andrea Faulds
e4e9cd8355 Export stdClass objects using (object) cast (fixes #48016)
Before this change, var_export()'s output for stdClass objects calls
the non-existent stdClass::__set_state method, and is therefore useless.

This commit makes var_export() output an (object) cast from an array
instead, which when evaluated, will produce a stdClass object. Other
classes see unchanged output.
2018-07-12 13:22:26 +02:00
Kalle Sommer Nielsen
a8dce31957 Added the 'add_slashes' sanitization filter (FILTER_SANITIZE_ADD_SLASHES) as an alias to 'magic_quotes' (FILTER_SANITIZE_MAGIC_QUOTES) so we can move past our "magical" legacy. 2018-07-09 03:58:20 +02:00
Jakub Zelenka
2a78006adb Update NEWS and UPGRADING for fpm_get_status addition 2018-07-07 12:53:08 +01:00
seliver
95013042bf Fixed bug #76136 (stream_socket_get_name enclosed IPv6 in brackets)
The IPv6 IP of a socket is provided by inet_ntop() as a string, but
this function doesn't enclose the IP in brackets. This patch adds
them in the php_network_populate_name_from_sockaddr() function.
2018-07-07 11:47:50 +02:00
Nikita Popov
04e3523b7d Warn if continue is used on switch
Supersedes RFC https://wiki.php.net/rfc/continue_on_switch_deprecation
by generating a warning instead of deprecating and removing this
functionality.
2018-07-07 11:12:48 +02:00
Nikita Popov
41a6625c09 Add UPGRADING for mb_ereg changes
Also some minor code cleanup.
2018-07-07 11:06:29 +02:00
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