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

121832 Commits

Author SHA1 Message Date
Nikita Popov 5cf70dfa6b Merge branch 'PHP-8.0'
* PHP-8.0:
  Add integration test for symfony preloading
2020-11-10 11:46:07 +01:00
Nikita Popov 9f1dba8b71 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Add integration test for symfony preloading
2020-11-10 11:45:59 +01:00
Nikita Popov f419e049ff Add integration test for symfony preloading
To help catch regressions like the one that occurred in PHP 7.4.12.

Closes GH-6414.
2020-11-10 11:45:22 +01:00
Christoph M. Becker 0947ea8d98 Merge branch 'PHP-8.0'
* PHP-8.0:
  7.3.26 is next
2020-11-10 11:11:34 +01:00
Christoph M. Becker 25e3d7bbe0 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  7.3.26 is next
2020-11-10 11:11:06 +01:00
Christoph M. Becker bd2b4a5b2e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  7.3.26 is next
2020-11-10 11:09:40 +01:00
Christoph M. Becker b5ce6df0da 7.3.26 is next 2020-11-10 11:08:16 +01:00
Nikita Popov 4945bc2609 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix phi use chain management when renaming variable
2020-11-09 17:08:46 +01:00
Nikita Popov 523dd9a2d9 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix phi use chain management when renaming variable
2020-11-09 17:08:38 +01:00
Nikita Popov d971b67027 Fix phi use chain management when renaming variable
If there is a previous use of the new variable in the phi, we need
to NULL out the use chain of the new source we're adding.

Test case is reduced from an assertion failure in the Symfony Demo.
2020-11-09 17:08:16 +01:00
Nikita Popov b6a93c38bf Merge branch 'PHP-8.0'
* PHP-8.0:
  Use true/false instead of TRUE/FALSE in intl
2020-11-09 14:44:46 +01:00
Nikita Popov 975735c027 Use true/false instead of TRUE/FALSE in intl
And drop the U_DEFINE_TRUE_AND_FALSE flag.
2020-11-09 14:44:11 +01:00
Nikita Popov 5143b4d8aa Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80310: Support for icu4c 68.1.
2020-11-09 14:35:48 +01:00
Nikita Popov 4cd393453a Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #80310: Support for icu4c 68.1.
2020-11-09 14:35:40 +01:00
Nikita Popov 96b725122d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #80310: Support for icu4c 68.1.
2020-11-09 14:34:24 +01:00
Alexander M. Turek 8eaaabdd58 Fixed bug #80310: Support for icu4c 68.1.
On stable versions, bring back the TRUE/FALSE defines by defining
_U_DEFINE_TRUE_AND_FALSE.

Closes GH-6397.
2020-11-09 14:31:29 +01:00
Alex Dowad 3e7acf901d Remove mbstring identify filters
mbstring had an 'identify filter' for almost every supported text encoding
which was used when auto-detecting the most likely encoding for a string.
It would run over the string and set a 'flag' if it saw anything which
did not appear likely to be the encoding in question.

One problem with this scheme was that encodings which merely appeared
less likely to be the correct one were completely rejected, even if there
was no better candidate. Another problem was that the 'identify filters'
had a huge amount of code duplication with the 'conversion filters'.

Eliminate the identify filters. Instead, when auto-detecting text
encoding, use conversion filters to see whether the input string is valid
in candidate encodings or not. At the same type, watch the type of
codepoints which the string decodes to and mark it as less likely if
non-printable characters (ESC, form feed, bell, etc.) or 'private use
area' codepoints are seen.

Interestingly, one old test case in which JIS text was misidentified
as UTF-8 (and this wrong behavior was enshrined in the test) was 'fixed'
and the JIS string is now auto-detected as JIS.
2020-11-09 13:45:17 +02:00
Alex Dowad a416f938f3 Treat non-ASCII characters as erroneous when converting ASCII text 2020-11-09 13:45:17 +02:00
Alex Dowad 8f6889b20d Fix mbstring support for EUC-JP text encoding
- Don't allow control characters to appear in the middle of a multi-byte
  character. (A strange feature, or perhaps misfeature, of mbstring which is
  not present in other libraries such as iconv.)
- When checking whether string is valid, reject kuten codes which do not
  map to any character, whether converting from EUC-JP to another encoding,
  or converting another encoding which uses JIS X 0208/0212 charsets to
  EUC-JP.
- Truncated multi-byte characters are treated as an error.
2020-11-09 13:45:17 +02:00
Alex Dowad ad7e0f16cc Fix mbstring support for Shift-JIS
- Reject otherwise valid kuten codes which don't map to anything in JIS X 0208.
- Handle truncated multi-byte characters as an error.
- Convert Shift-JIS 0x7E to Unicode 0x203E (overline) as recommended by the
  Unicode Consortium, and as iconv does.
- Convert Shift-JIS 0x5C to Unicode 0xA5 (yen sign) as recommended by the
  Unicode Consortium, and as iconv does.
  (NOTE: This will affect PHP scripts which use an internal encoding of
  Shift-JIS! PHP assigns a special meaning to 0x5C, the backslash. For example,
  it is used for escapes in double-quoted strings. Mapping the Shift-JIS yen
  sign to the Unicode yen sign means the yen sign will not be usable for
  C escapes in double-quoted strings. Japanese PHP programmers who want to
  write their source code in Shift-JIS for some strange reason will have to
  use the JIS X 0208 backlash or 'REVERSE SOLIDUS' character for their C
  escapes.)
- Convert Unicode 0x5C (backslash) to Shift-JIS 0x815F (reverse solidus).
- Immediately handle error if first Shift-JIS byte is over 0xEF, rather than
  waiting to see the next byte. (Previously, the value used was 0xFC, which is
  the limit for the 2nd byte and not the 1st byte of a multi-byte character.)
- Don't allow 'control characters' to appear in the middle of a multi-byte
  character.

The test case for bug 47399 is now obsolete. That test assumed that a number
of Shift-JIS byte sequences which don't map to any character were 'valid'
(because the byte values were within the legal ranges).
2020-11-09 13:45:16 +02:00
Alex Dowad cc03c54c36 Remove useless byte{2,4}{be,le} encodings from mbstring
There is no meaningful difference between these and UCS-{2,4}. They are
just a little bit more lax about passing errors silently. They also have
no known use.

Alias to UCS-{2,4} in case someone, somewhere is using them.
2020-11-09 13:45:16 +02:00
Alex Dowad 3eb8828d1a Fix issues with mbstring encoding tests
I made some mistakes on this code, which meant that not everything which
should be tested was actually being tested.
2020-11-09 13:45:16 +02:00
Nikita Popov 12ab4cbd00 Merge branch 'PHP-8.0'
* PHP-8.0:
  Remove embedded property from mysqli_driver
2020-11-09 11:03:14 +01:00
Dharman 114613dc5f Remove embedded property from mysqli_driver
All other leftovers of this feature have been dropped in PHP 8,
so we should remove the property as well.

Closes GH-6407.
2020-11-09 11:00:16 +01:00
Nikita Popov 31d975a461 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80334
2020-11-09 10:19:40 +01:00
Nikita Popov 6fb3d92525 Fixed bug #80334
If assert() was called with named args, add description as named
arg as well.
2020-11-09 10:19:32 +01:00
Dmitry Stogov 13a8f3b30f Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed missaligned access
2020-11-09 11:50:51 +03:00
Dmitry Stogov 4bbe55b250 Fixed missaligned access 2020-11-09 11:50:26 +03:00
Nikita Popov 6033c77653 Merge branch 'PHP-8.0'
* PHP-8.0:
  Skip preload test under asan
2020-11-09 09:47:12 +01:00
Nikita Popov 5df461bc91 Skip preload test under asan
Just like the other preload tests with startup failures, this may
cause leaks.
2020-11-09 09:46:48 +01:00
Nikita Popov e09ad4a8b6 Merge branch 'PHP-8.0'
* PHP-8.0:
  Rename PhpToken::getAll() to PhpToken::tokenize()
2020-11-09 09:41:23 +01:00
Nikita Popov b1019f46ed Rename PhpToken::getAll() to PhpToken::tokenize()
See https://externals.io/message/112189.
Fixes bug #80328.
2020-11-09 09:40:31 +01:00
Derick Rethans b0b4a5930b Merge branch 'PHP-8.0' 2020-11-07 18:49:11 +00:00
Derick Rethans fe2cbcac70 Merge branch 'PHP-7.4' into PHP-8.0 2020-11-07 18:49:00 +00:00
Derick Rethans 25643b56a2 Update version in 7.4 branch 2020-11-07 18:48:13 +00:00
Christoph M. Becker 6768f4705c Merge branch 'PHP-8.0'
* PHP-8.0:
  Split tests for compatibility with ICU 68.1
2020-11-06 17:45:29 +01:00
Christoph M. Becker 49ca191667 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Split tests for compatibility with ICU 68.1
2020-11-06 17:44:51 +01:00
Christoph M. Becker 77b6e95d92 Split tests for compatibility with ICU 68.1 2020-11-06 17:42:39 +01:00
George Peter Banyard c4646371f1 Stabalize IMAP parallel testing, again
Drive by clean-up
Use less the default mailbox again
2020-11-06 14:26:47 +00:00
Remi Collet 21594edd2d Merge branch 'PHP-8.0'
* PHP-8.0:
  Raise E_WARNING on PHP related errors
2020-11-06 11:00:56 +01:00
Christoph M. Becker d65a520b1d Raise E_WARNING on PHP related errors
If Zip operations fails due to PHP error conditions before libzip even
has been called, there is no meaningful indication what failed; the
functions just return false, and the Zip status indicated that no error
did occur.  Therefore we raise `E_WARNING` in these cases.

Closes GH-6356.
2020-11-06 11:00:43 +01:00
Dmitry Stogov 668ac03ca4 Merge branch 'PHP-8.0'
* PHP-8.0:
  Move stack overflow checks out of the loops
2020-11-06 12:10:28 +03:00
Dmitry Stogov 98e4f9466d Move stack overflow checks out of the loops 2020-11-06 12:09:56 +03:00
Remi Collet ca5c8c3ffd Merge branch 'PHP-8.0'
* PHP-8.0:
  report about ZSTD compression availability
  only display libzip both headers/library versions if they differ
2020-11-06 09:59:47 +01:00
Remi Collet e2509cf98a report about ZSTD compression availability 2020-11-06 09:58:08 +01:00
Remi Collet 8d7ca472e5 only display libzip both headers/library versions if they differ 2020-11-06 09:58:05 +01:00
Nikita Popov 9bdf2212cc Merge branch 'PHP-8.0'
* PHP-8.0:
  Backport preloading trait fixup fixes
2020-11-05 16:38:02 +01:00
Nikita Popov 2d894916c5 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Backport preloading trait fixup fixes
2020-11-05 16:37:45 +01:00
Nikita Popov 6808968c89 Backport preloading trait fixup fixes
This cherry-picks 33969c2252 and
2effbfd871 from PHP-8.0.

The issues these commits fix could also manifest in PHP 7.4, and
a commenter on bug #80307 reports this this might indeed be
happening.
2020-11-05 16:35:08 +01:00
Dmitry Stogov 5cd88ccddb Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed incorrect invariant guard motion
2020-11-05 18:32:46 +03:00