Commit Graph

1113 Commits

Author SHA1 Message Date
Sara Golemon
bd62f5ac47 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Suppress deprecation warning on IDNA2003 ICU methods
2019-08-16 12:41:32 -04:00
Sara Golemon
a192499d2a Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Suppress deprecation warning on IDNA2003 ICU methods
2019-08-16 12:41:02 -04:00
Sara Golemon
725f439778
Suppress deprecation warning on IDNA2003 ICU methods 2019-08-16 12:40:20 -04:00
Sara Golemon
4d3be2a995 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Revert "Move to non deprecated API on suitable ICU versions"
2019-08-16 11:40:01 -04:00
Sara Golemon
9b9814fa77
Revert "Move to non deprecated API on suitable ICU versions"
This reverts commit 13a2f2d041.

The APIs used by this commit aren't entirely equivalent to the original ones.
2019-08-16 11:39:05 -04:00
George Peter Banyard
1c1de0c41a Convert all php_error_docref0 to php_error_docref
Closes GH-4394
2019-07-13 02:05:17 +02:00
Nikita Popov
b53bb3c15b Fix UConverter leak 2019-06-25 14:28:58 +02:00
Nikita Popov
77f7ec5152 Fix TimeZone leak in intl MessageFormat
I'm just giving each format a distinct owned object here ... sharing
it looks complicated.
2019-06-25 14:28:58 +02:00
Nikita Popov
608097a901 Fix various instances of memcpy null ub 2019-06-19 17:27:09 +02:00
Dmitry Stogov
457392fa64 Cheaper checks for exceptions thrown from __toString() 2019-06-06 01:47:22 +03:00
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Anatol Belski
793fd6bce9 Fix expect section 2019-06-01 14:50:14 +02:00
Anatol Belski
2205546edf Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Change ZPP only if compiled with ICU >= 64
  Update tests for ICU 64
2019-06-01 02:26:07 +02:00
Anatol Belski
ee153deb1f Change ZPP only if compiled with ICU >= 64 2019-06-01 02:18:56 +02:00
Nikita Popov
b01d9fdab1 Update tests for ICU 64
(cherry picked from commit 8a8bc5c452)
2019-06-01 02:17:16 +02:00
Thomas Gerbet
bfc10978ef SimpleXMLElement and ResourceBundle implement Countable
Both classes already have a count() method and are considered
countable by \is_countable().
2019-05-31 18:59:19 +02:00
Nikita Popov
8a8bc5c452 Update tests for ICU 64 2019-05-31 15:39:03 +02:00
Dmitry Stogov
83804519df Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros 2019-05-28 20:10:02 +03:00
Peter Kokot
f95b27c6f6 Convert CRLF to LF
These files are tracked with CRLF line endings in Git and can be
converted to LF. Neither are parts of tests or code itself.
2019-05-13 03:51:00 +02:00
Peter Kokot
6abc6baa2a [ci skip] Migrate intl error conventions docs to Markdown 2019-05-12 23:24:03 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Dmitry Stogov
e188e4170f Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference 2019-04-24 18:28:29 +03:00
Nikita Popov
2d7d5ab5c6 Merge branch 'PHP-7.3' into PHP-7.4 2019-04-15 15:27:37 +02:00
Nikita Popov
a2f3ec1777 Merge branch 'PHP-7.2' into PHP-7.3 2019-04-15 15:27:30 +02:00
Nikita Popov
619c4e9f2e Fixed bug #77895 2019-04-15 15:26:58 +02:00
Nikita Popov
7ad04a0537 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-18 12:16:18 +01:00
Nikita Popov
763a7b8ca3 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-18 12:16:12 +01:00
Nikita Popov
b3a669bec1 Make test independent of icu version
We don't really care about the actual output here, just that it
doesn't fail.
2019-03-18 12:14:58 +01:00
Nikita Popov
65c9a3f1a1 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-18 11:41:19 +01:00
Nikita Popov
623a11d7de Merge branch 'PHP-7.2' into PHP-7.3 2019-03-18 11:39:58 +01:00
Nikita Popov
433758ceb3 Allow DateTimeImmutable in datefmt_format_object()
As pointed out in a comment on bug #65683.
2019-03-18 11:39:16 +01:00
Peter Kokot
f5fa9ddbd5 Clean *nix build system
- remove some outdated and not used macro calls
- remove some unused variables
- Remove not needed comment from tokenizer config.m4
- Remove not needed comment
- remove not needed local variables for editors and syntax highlighting
2019-03-07 20:58:14 +01:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Andy McNeice
5bbf0c698f added basic test for UConverter::setSourceEncoding() 2019-02-19 03:18:26 +01:00
Andy McNeice
d194ceb0c2 added basic test for UConverter::getDestinationEncoding() 2019-02-19 03:15:01 +01:00
Andy McNeice
6d9a4f11e6 added basic test for UConverter::getSourceEncoding() 2019-02-19 03:09:49 +01:00
Peter Kokot
c245898bfa Update and fix remaining year ranges (2019)
This patch follows previous license year ranges updates. With new
approach source code files now have simplified headers with license
information without year ranges.
2019-02-08 23:14:29 +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
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
Hugh McMaster
20fa2e7b58 ext/intl: Use pkg-config to detect icu
The developers of icu recommend using pkg-config to detect icu,
because icu-config is deprecated.
2018-12-09 16:59:24 +01:00
Gabriel Caruso
cdd8368d6f Clean up unnecessary ternary expressions and simplify some returns
- Simplify conditions
- Use ZEND_HASH_APPLY_* instead of hard-coded booleans
- Use ZEND_NORMALIZE_BOOL
- Drop sign in favor of ZEND_NORMALIZE_BOOL
2018-12-03 01:22:14 +01:00
Dmitry Stogov
0f7f1498be Use ZEND_THIS macro to hide implementation details in extensions code. 2018-11-15 19:54:19 +03:00
Dmitry Stogov
8bda22592e Eliminate useless $this related check 2018-11-14 11:33:14 +03:00
Dmitry Stogov
c6ad0b92b7 Replace getThis() by EX(This), when additional check is not necessary. 2018-11-14 02:44:25 +03:00
Anatol Belski
63353b95c6 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix tests for ICU 63.1
2018-10-20 23:05:38 +02:00
Anatol Belski
7f8efd9a6e Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix tests for ICU 63.1
2018-10-20 23:04:54 +02:00
Anatol Belski
ba43d5acef Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix tests for ICU 63.1
2018-10-20 23:04:15 +02:00
Anatol Belski
4461fb9c26 Fix tests for ICU 63.1
The most of change is U+00A0 vs. new U+202F used in some outputs.
2018-10-20 23:02:06 +02:00
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:33:09 +02:00
Peter Kokot
b746e69887 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:32:30 +02:00