Commit graph

826 commits

Author SHA1 Message Date
Nikita Popov
b8b00263c5 Merge branch 'PHP-7.4' 2019-04-12 10:37:27 +02:00
Nikita Popov
1ef5b79b6b Merge branch 'PHP-7.3' into PHP-7.4 2019-04-12 10:37:17 +02:00
Nikita Popov
354a1c27aa Merge branch 'PHP-7.2' into PHP-7.3 2019-04-12 10:37:08 +02:00
Nikita Popov
3b53d28e60 Fix key leaks in mb_convert_encoding() 2019-04-12 10:36:58 +02:00
Nikita Popov
47c74e780d Merge branch 'PHP-7.4' 2019-04-11 12:36:10 +02:00
Nikita Popov
cd8312a77e Merge branch 'PHP-7.3' into PHP-7.4 2019-04-11 12:36:01 +02:00
Nikita Popov
a61d24e4d8 Avoid onig match param unused variable warning 2019-04-11 12:35:24 +02:00
Stanislav Malyshev
63e0c22037 Merge branch 'PHP-7.4'
* PHP-7.4:
  Unfortunately, travis CI has old oniguruma library
  Update NEWS & UPGRADING
  Add fallbacks for older oniguruma versions
  Add mbstring.regex_stack_limit to php.ini-*
  Implement RF bug #72777 - ensure stack limits on mbstring functions.
2019-04-01 00:32:49 -07:00
Stanislav Malyshev
077ce33aa9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Update NEWS & UPGRADING
  Add fallbacks for older oniguruma versions
  Add mbstring.regex_stack_limit to php.ini-*
  Implement RF bug #72777 - ensure stack limits on mbstring functions.
2019-04-01 00:05:36 -07:00
Stanislav Malyshev
e12c069d33 Add fallbacks for older oniguruma versions 2019-03-30 23:18:33 -07:00
Matteo Beccati
d02c8ede15 Merge branch 'PHP-7.4'
* PHP-7.4:
  Removed declaration inside for loops
2019-03-29 14:24:40 +01:00
Matteo Beccati
4726c35ca3 Removed declaration inside for loops 2019-03-29 14:24:09 +01:00
Yasuo Ohgaki
738016bd88 Implement RF bug #72777 - ensure stack limits on mbstring functions.
The patch creates new config: mbstring.regex_stack_limit, which
defaults to 100000.
2019-03-28 00:31:57 -07:00
Nikita Popov
d7348cd2b4 Merge branch 'PHP-7.4' 2019-03-22 10:30:15 +01:00
Nikita Popov
e7e2056d1a Remove HAVE_PCRE/HAVE_BUNDLED_PCRE checks
PCRE is always available.
2019-03-22 10:29:18 +01:00
Nikita Popov
e683c189f2 Merge branch 'PHP-7.4' 2019-02-12 16:43:34 +01:00
legale
d77ad27415 Implement mb_str_split()
RFC: https://wiki.php.net/rfc/mb_str_split
2019-02-12 16:42:51 +01:00
Nikita Popov
779b9bfe02 Merge branch 'PHP-7.4' 2019-02-11 15:00:52 +01:00
Nikita Popov
d1c1481081 Unbundle oniguruma
And also switch detection over to pkg-config.
2019-02-11 14:53:19 +01:00
Peter Kokot
623911f993 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove local variables
2019-02-03 21:23:18 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Zeev Suraski
38c337f22e Remove year range from copyright notice 2019-01-30 11:00:23 +02:00
Nikita Popov
ff780feca4 Require second argument on (mb_)parse_str()
This was deprecated in PHP 7.2 as part of
https://wiki.php.net/rfc/deprecations_php_7_2.
2019-01-28 15:58:24 +01:00
Nikita Popov
331e56ce38 Remove mbstring.func_overload
Deprecated in PHP 7.2 as part of
https://wiki.php.net/rfc/deprecations_php_7_2.
2019-01-28 15:58:23 +01:00
Nikita Popov
93a221ec4b Merge branch 'PHP-7.3' 2019-01-14 10:24:11 +01:00
Nikita Popov
d6212835f2 Merge branch 'PHP-7.2' into PHP-7.3 2019-01-14 10:23:44 +01:00
Nikita Popov
3ad0ebdf5c Fixed bug #77454 2019-01-14 10:22:48 +01:00
Nikita Popov
e219ec144e Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2

This is a squash of PR #3734, which is a squash of PR #3313.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Nikita Popov
8f2f80668e Merge branch 'PHP-7.3' 2018-11-15 17:17:06 +01:00
Nikita Popov
dee5a450d9 Fixed bug #77165
Also add some helper macros for PROTECT/UNPROTECT that check for
IMMUTABLE. These checks are needed for nearly any use of
PROTECT/UNPROTECT.
2018-11-15 17:16:39 +01:00
Gabriel Caruso
5ae1524dc3
Remove unused variables 2018-11-15 12:32:00 -02:00
Nikita Popov
6da3eac56a Add missing null initialization 2018-10-29 20:57:21 +01:00
Nikita Popov
837843ff4a Remove redundant mbfl_string_init calls
No need to do this if we already fully initialize the string.
2018-10-29 20:29:23 +01:00
Nikita Popov
a7d6b2c1fb Use zend_string for mbstring last encoding cache
Saves us a string duplication, as well as case-insensitive string
comparisons for the likely case of an interned string encoding.
2018-10-29 20:29:22 +01:00
Nikita Popov
493b534c84 Merge branch 'PHP-7.3' 2018-10-29 18:56:43 +01:00
Nikita Popov
09c7108f74 Fix mb_strrpos() with encoding passed as 3rd param 2018-10-29 18:56:17 +01:00
Nikita Popov
900ee5705f Remove unnecessary HASH_OF uses in mbstring 2018-10-11 13:04:08 +02:00
Christoph M. Becker
70ecb6e50b Fix #76706: mbstring.http_output_conv_mimetypes is ignored
_php_mb_match_regex() is supposed to return != 0 on success, and 0 on
failure.  pcre2_match() returns >= 0 on success, and < 0 on failure.
We map the result accordingly.

Since this patch fixes four failing tests, there is no need to add
another.
2018-08-04 23:24:04 +02:00
Christoph M. Becker
5dc74d9e70 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #76704: mb_detect_order return value varies based on argument type
2018-08-04 13:50:48 +02:00
Christoph M. Becker
db8bcdba80 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #76704: mb_detect_order return value varies based on argument type
2018-08-04 12:57:05 +02:00
Christoph M. Becker
c00f5e6531 Fix #76704: mb_detect_order return value varies based on argument type
php_mb_parse_encoding_list() and php_mb_parse_encoding_array() are
supposed to return SUCCESS and FAILURE, not 1 and 0, respectively.
2018-08-04 12:51:57 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Christoph M. Becker
1c01b1ab48 Fix #76594: Bus Error due to unaligned access in zend_ini.c OnUpdateLong
Since commit ea83b69[1] changed the type of mbstring.strict_detection
from `long` to `zend_bool`, we have to update the `on_modify` callback
as well.

[1] http://git.php.net/?p=php-src.git;a=commit;h=ea83b69883f3f77fd27e4663fa854c88f141ab41
2018-07-09 00:54:36 +02:00
Anatol Belski
0630e3bc03 Reduce error buffer size
120 bytes is ample, the doc says.
2018-07-05 17:24:38 +02:00
Dmitry Stogov
265c3ed6cf Fixed incorrrecr zval_dtor() usage to replace value of argument passed by reference, that may lead to memory leaks. 2018-07-05 10:57:49 +03:00
Anatol Belski
a34ba6f30c Fix mbstring fallback when --disable-mbregex used 2018-06-11 17:44:34 +02:00
Dmitry Stogov
0b90cf85a6 Removed "dead" code (zend_hash_update() never fails) 2018-06-01 11:58:57 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Nikita Popov
9d63f4dec1 Fixed bug #76319
While at it, also make sure that mbstring case conversion takes
into account the specified substitution character and substitution
mode.
2018-05-25 11:33:13 +02:00