1
0
mirror of https://github.com/php/php-src.git synced 2026-04-15 20:11:02 +02:00
Commit Graph

843 Commits

Author SHA1 Message Date
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
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
7af945e271 Trim trailing whitespace in *.phpt 2018-10-14 19:43:12 +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
7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +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
534684d104 Fixed Bug #76942 U_ARGUMENT_TYPE_MISMATCH
ref bug #74484
2018-10-05 22:50:34 +02:00
Anatol Belski
45a05f3841 Fixed bug #74484 MessageFormatter::formatMessage memory corruption
with 11+ named placeholder
2018-08-09 22:07:24 +02:00
Christoph M. Becker
a72bab1b9a Make newly introduced bug76556.phpt more resilient
Obviously, different compilers mangle the C++ class name differently.
We should neither expect a prefix nor a suffix.
2018-07-01 00:20:32 +02:00
Christoph M. Becker
1118fca75d Fix #76556: get_debug_info handler for BreakIterator shows wrong type
We use the retrieved type for the "type" element instead of the text.
This has been confused during the PHP 7 upgrade[1].

[1] http://git.php.net/?p=php-src.git;a=commit;h=1d793348067e5769144c0f7efd86428a4137baec
2018-06-30 23:15:02 +02:00
Anatol Belski
5af0db88fa Prepare tests for ICU 62.1 2018-06-25 11:30:14 +02:00
Stanislav Malyshev
bcf2e10ae7 Revert "ICU 59+ requires C++11 and errors out without the option"
This reverts commit 5dd1ef90ca.
2018-06-20 10:41:41 -07:00
Stanislav Malyshev
5dd1ef90ca ICU 59+ requires C++11 and errors out without the option 2018-06-17 16:42:41 -07:00
Nikita Popov
e77077edeb Make $locale parameter to BreakIterator ctors optional
It's documented as such and already accepts null.
2018-06-13 23:47:20 +02:00
Anatol Belski
6b85926104 Fix tests, ref bug #74385 2018-05-03 17:15:47 +02:00
Anatol Belski
f59b201f19 Fixed bug #74385 Locale::parseLocale() broken with some arguments
Rely on the ICU's defined values for the max locale id length.
2018-05-03 16:34:33 +02:00
Anatol Belski
5fe6d2134b Fix memory leak 2018-04-12 18:25:27 +02:00
Anatol Belski
09d7ffabcd Group common flags 2018-04-05 16:44:12 +02:00
Anatol Belski
ed5aabe8b7 Rename var 2018-04-05 14:52:40 +02:00
Anatol Belski
2bd299f731 Fix shared ext/intl compilation 2018-04-03 10:42:14 +02:00
Anatol Belski
8b104d7893 Fix clang build, ref buf #76153
Clang only allows -std=c++11 for C++ source.
2018-03-30 14:14:35 +02:00
Anatol Belski
398f56dbc8 Adjust tests for ICU 61.1 compatibility 2018-03-29 14:12:19 +02:00
Anatol Belski
710284cbc4 Fixed bug #76153 Intl compilation fails with icu4c 61.1
Additionally, ICU >= 59.1 requires C++11, so add the flags. Some
refactoring is needed to comply with the latest recommended build
options, such as automatic icu namespace addition.
2018-03-28 18:01:44 +02:00
Anatol Belski
da0ed5cdb1 Wrap var depending on conditional compilation 2018-02-16 13:40:44 +01:00
Anatol Belski
e8af216ce5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Sync and fix tests for ICU 60.1 compat
2017-11-02 12:38:32 +01:00
Anatol Belski
dbfa0140ae Sync and fix tests for ICU 60.1 compat 2017-11-02 12:37:04 +01:00
Anatol Belski
6eb4daabeb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add missing ICU version check
2017-10-30 18:16:03 +01:00
Anatol Belski
68c500421c Add missing ICU version check 2017-10-30 18:15:26 +01:00
Joe Watkins
5e9f7f619e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix typo in comments
2017-10-25 20:59:51 +01:00
Fabien Villepinte
578ba71b3b Fix typo in comments 2017-10-25 20:59:40 +01:00
Anatol Belski
e986f71527 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  With ICU 58+, set the default restriction level to high
2017-10-21 17:24:15 +02:00
Anatol Belski
1d781fbdb1 With ICU 58+, set the default restriction level to high
Further experiments show, that CJK scripts should be ok. If there are
any issues, the moderate level can still be set later.
2017-10-21 17:21:41 +02:00
Anatol Belski
88ec44dfe3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Rework these new tests to match with diffs in ICU 58, 59 and upcoming 60
2017-10-21 10:30:14 +02:00
Anatol Belski
5d85d967bd Rework these new tests to match with diffs in ICU 58, 59 and upcoming 60 2017-10-21 10:29:04 +02:00
Anatol Belski
6f395736e2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73655 Spoofchecker::isSuspicious behavior change due to upstream changes
  Add test for newer ICU version
2017-10-20 20:14:08 +02:00
Anatol Belski
f95063647c Fixed bug #73655 Spoofchecker::isSuspicious behavior change due to upstream changes
There are significant changes in the spoof checking reflecting
http://www.unicode.org/reports/tr39/tr39-15.html and relying on the
restriction levels. ICU 58+ removes WSC and MSC handling and otherwise
undergoes big changes in both code and data areas. Keep up with the
basic points for now, as we need to move forward and provide an
acceptable experience to PHP users linking to a newer ICU. The most
distros ATM don't provide ICU > 57.1, though. We'll need for sure to
keep up with the BC breach in ICU 58+ in possible further aspects.
2017-10-20 19:23:32 +02:00
Anatol Belski
2198d38cbc Add test for newer ICU version 2017-10-20 19:02:42 +02:00
Anatol Belski
3d55910f35 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Further test fixes for ICU >= 58
2017-10-20 18:40:26 +02:00
Anatol Belski
e02c41fc72 Further test fixes for ICU >= 58 2017-10-20 18:39:46 +02:00
Anatol Belski
7027a1643f Version checks 2017-10-20 18:26:14 +02:00
Anatol Belski
65d4bd0311 Yet two wrong version checks 2017-10-20 16:54:47 +02:00
Anatol Belski
ae6d877f54 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix version checks in tests
2017-10-20 15:25:01 +02:00
Anatol Belski
2f444640b4 Fix version checks in tests 2017-10-20 15:24:43 +02:00
Anatol Belski
7240d99838 Fix version checks in tests 2017-10-20 15:23:09 +02:00
Anatol Belski
e2afa00b4c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Sync some tests for compat with ICU 58.1+
2017-10-20 13:57:44 +02:00
Anatol Belski
26473523b0 Sync some tests for compat with ICU 58.1, PHP 7.1+ part 2017-10-20 13:56:58 +02:00
Anatol Belski
877e0b04bc Sync some tests for compat with ICU 58.1+ 2017-10-20 13:55:32 +02:00
Anatol Belski
7751ae59ae Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add skip for incompatible ICU version
2017-10-20 11:28:51 +02:00
Anatol Belski
9071ff5c87 Add skip for incompatible ICU version 2017-10-20 11:27:54 +02:00