Commit Graph

1073 Commits

Author SHA1 Message Date
Christoph M. Becker
b93e4aa11c Relax test expectation
Since we're dealing with floating point numbers, precision issues may
hit us, and actually it's not necessary to check for the exact number
anyway, because it is not exact in the first place.  Therefore, we
relax the test expectations.
2020-02-03 13:03:54 +01:00
Christoph M. Becker
c2935499b1 Fix #79212: NumberFormatter::format() may detect wrong type
We have to convert to number *before* detecting the type, to cater to
internal objects implementing `cast_object`.

We also get rid of the fallback behavior of using `FORMAT_TYPE_INT32`,
because that can no longer happen; after `convert_scalar_to_number_ex`
the type is either `IS_LONG` or `IS_DOUBLE`.  We cater explicitly to
the `IS_ARRAY` case what also avoids triggering a type confusion when
`::TYPE_INT64` is passed as `$type`.
2020-02-03 12:28:32 +01:00
Stanislav Malyshev
ea2a125789 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #78804 - Segmentation fault in Locale::filterMatches
2019-11-11 23:08:38 -08:00
Stanislav Malyshev
2c9926f156 Fix bug #78804 - Segmentation fault in Locale::filterMatches 2019-11-11 22:32:35 -08:00
Christoph M. Becker
1ce8c805e2 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Split intl tests for ICU 65
2019-10-04 13:53:58 +02:00
Christoph M. Becker
545412a6cd Split intl tests for ICU 65 2019-10-04 13:53:22 +02:00
Nikita Popov
915fe2fdc6 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-25 10:34:25 +02:00
Jinesh Patel
d2331cc3f2 Fix hash key length in umsg_parse_format()
Fix array length passed to zend_hash_str_find_ptr() casting from
UChar array to char array requires mul by sizeof(UChar).
2019-09-25 10:30:33 +02:00
Remi Collet
664b1a3f57 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Raise minimal GCC version, Test with 4.8 is OK With 4.4: error: #pragma GCC diagnostic not allowed inside functions
2019-09-10 16:29:30 +02:00
Remi Collet
c43fc204b1 Raise minimal GCC version,
Test with 4.8 is OK
With 4.4: error: #pragma GCC diagnostic not allowed inside functions
2019-09-10 16:28:35 +02:00
Christoph M. Becker
c9d31941e4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Suppress deprecation warning on IDNA2003 ICU methods for clang
2019-08-23 12:21:57 +02:00
Christoph M. Becker
ff7029b65b Suppress deprecation warning on IDNA2003 ICU methods for clang 2019-08-23 12:18:58 +02: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
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
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
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
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
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
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
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
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
Peter Kokot
f1d7e3ca0b 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:31:31 +02:00
Peter Kokot
113213f027 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:29:24 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Peter Kokot
7af945e271 Trim trailing whitespace in *.phpt 2018-10-14 19:43:12 +02:00
Peter Kokot
1c850bfcca Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

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-14 12:55:24 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

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-14 12:54:08 +02:00
Peter Kokot
03f3b8479b Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

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-14 12:51:01 +02:00
Peter Kokot
3362620b5f Trim trailing whitespace in source code files 2018-10-13 14:16:33 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot
7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +02:00
Peter Kokot
85290bbfcc Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:23:20 +02:00
Peter Kokot
2aa897476f Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:22:30 +02:00
Peter Kokot
3f72c77ce4 Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:21:27 +02:00
Anatol Belski
72df422d69 Add test for bug #76942 2018-10-05 22:54:50 +02:00
Anatol Belski
55e0bc9532 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add test for bug #76942
  Fixed Bug #76942 U_ARGUMENT_TYPE_MISMATCH
2018-10-05 22:53:11 +02:00
Anatol Belski
a7754286d2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add test for bug #76942
  Fixed Bug #76942 U_ARGUMENT_TYPE_MISMATCH
2018-10-05 22:52:53 +02:00
Anatol Belski
c2a956de6f Add test for bug #76942 2018-10-05 22:51:58 +02:00
Anatol Belski
534684d104 Fixed Bug #76942 U_ARGUMENT_TYPE_MISMATCH
ref bug #74484
2018-10-05 22:50:34 +02:00
Nikita Popov
9f4ec45aa6 Remove invalid free
The initialization of buffer has been moved further down in 7.3,
so this free is no longer legal.
2018-09-18 12:38:46 +02:00