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

1404 Commits

Author SHA1 Message Date
George Peter Banyard 71e198be25 Merge branch 'PHP-8.0' into PHP-8.1 2022-09-13 12:45:42 +01:00
George Peter Banyard 47500f3300 Fix GH-9421 Incorrect argument number for ValueError in NumberFormatter
Closes GH-9489
2022-09-13 12:42:58 +01:00
Christoph M. Becker 306da80f56 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Correct IntlDateFormatter::formatObject params
2022-08-15 17:58:52 +02:00
Gert de Pagter 05ed47ef12 Correct IntlDateFormatter::formatObject params
Closes GH-9341.
2022-08-15 17:56:34 +02:00
David Carlier 5e0b2e537d Merge branch 'PHP-8.0' into PHP-8.1 2022-07-08 17:39:05 +01:00
David Carlier 7c3dfbb845 intl extension, build fix for icu >= 69.x release. ubrk/ucnv_safeClone had been deprecated in favor of ubrk/ucnv_clone which does not use user provided stacks but remain thread safe. 2022-07-08 17:38:31 +01:00
Derick Rethans 4f32983fbe Merge branch 'PHP-8.0' into PHP-8.1 2022-05-27 14:27:29 +01:00
Derick Rethans 63a31f3377 Remove trailing whitespace from test 2022-05-27 10:55:40 +01:00
Derick Rethans 8d6a828192 Mark test as XFAIL due to wrong assumptions 2022-05-27 10:55:30 +01:00
Christoph M. Becker 1c0dc2a6c9 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8364: msgfmt_format $values may not support references
2022-04-24 12:45:22 +02:00
Christoph M. Becker f5d9e7c031 Fix GH-8364: msgfmt_format $values may not support references
We need to deref any references passed in the `$values` array.  While
we could handle this in the type switch, doing it right away in the
foreach loop makes that more explicit, and also circumvents the missing
range checks for integers which are not passed as int or double.

Closes GH-8407.
2022-04-24 12:43:08 +02:00
Ilija Tovilo e706d024b2 Fix IntlPartsIterator key off-by-one error
Closes GH-7734
Closes GH-8172
2022-03-25 13:10:55 +01:00
Christoph M. Becker 4b90eef9cf Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8142: Compilation error on cygwin
2022-03-04 16:21:39 +01:00
David Carlier 8b15858c58 Fix GH-8142: Compilation error on cygwin
* pcntl: SIGPOLL/si_band is unsupported
* intl: enable the signal apis with `_POSIX_C_SOURCE`

Closes GH-8146.
2022-03-04 16:20:39 +01:00
Ilija Tovilo 925a30979c Allowing catching arg type deprecations in intl classes
Closes GH-8115
Closes GH-8117
2022-03-03 11:26:35 +01:00
Nikita Popov 40e0bdb19d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Initialize int_codepoint in parse_code_point_param()
2022-02-16 19:03:33 +01:00
Nikita Popov bfe9531dc1 Initialize int_codepoint in parse_code_point_param()
This is being passed to convert_cp(), and passing an uninitialized
value to a function is undefined behavior. Clang 14 makes use of
noundef facts aggressively and miscompiles this code if not
initialized.
2022-02-16 19:01:44 +01:00
Máté Kocsis 20fb26e55c Add more specific array return type hints for various extensions - part 2
ext/ftp, ext/gmp, ext/intl

Closes GH-7433
2021-11-17 10:56:27 +01:00
Nikita Popov 2654c3449f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  CLDR 40a0 uses a lowercase "temp" instead of "Temp" in ICU >= 70.1
  Accommodate changes to canonicalized forms in ICU >= 70.1
  Change UBool to bool for equality operators in ICU >= 70.1
2021-11-02 16:17:16 +01:00
Nikita Popov a6d14f1143 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  CLDR 40a0 uses a lowercase "temp" instead of "Temp" in ICU >= 70.1
  Accommodate changes to canonicalized forms in ICU >= 70.1
  Change UBool to bool for equality operators in ICU >= 70.1
2021-11-02 16:15:25 +01:00
Ben Ramsey c7a2441e93 CLDR 40a0 uses a lowercase "temp" instead of "Temp" in ICU >= 70.1
Refer to:
https://github.com/unicode-org/icu/commit/49dda34fb175240a7724c7e039a270126ff7d900
2021-11-02 16:15:19 +01:00
Ben Ramsey 52cda6fc43 Accommodate changes to canonicalized forms in ICU >= 70.1
Refer to:
https://github.com/unicode-org/icu/commit/01e1adc9e412c9c3177dc3e30d056c25d8687853
2021-11-02 16:11:29 +01:00
Ben Ramsey 81b3f95622 Change UBool to bool for equality operators in ICU >= 70.1
Refer to:
- https://github.com/unicode-org/icu/commit/633438f8da99fee815e2c61626ea779a84567a3d
- https://github.com/unicode-org/icu/commit/f6325d49ba57ec26f320b2865ce09ca47db458d9
2021-11-02 16:07:51 +01:00
Tim Starling c96be7b8f2 Use ASCII lower case for misc case folding
Use ASCII case conversion instead of locale-dependent case conversion in
the following places:

* grapheme_stripos() and grapheme_strripos() in the "fast" path
* ldap_get_entries()
* oci_pconnect() for case folding of parameters when constructing a key
  into the connection or session pool
* SoapClient: case folding of function names
* get_meta_tags(): case conversion of property names
* http stream wrapper: header names
* phpinfo(): anchor names
* php_verror(): docref URLs
* rfc1867.c: Content-Type boundary parameter name
* streams.c: stream protocol names

Using locale-dependent case folding for these cases is either
unnecessary or actively incorrect. These functions could have
misbehaved when used with certain locales (e.g. Turkish).

Closes GH-7511.
2021-09-24 09:20:08 +02:00
Nikita Popov 4fcca032e1 Make IntlCalendar::roll() return type tentative
This method did not have a type in PHP 8.0 and is not final, so
the new return type should be tentative.
2021-09-22 15:00:29 +02:00
Nikita Popov 410bdaba3f Fix compiler warnings in ext/intl
I don't really get why these didn't show up before.
2021-09-16 11:18:38 +02:00
Nikita Popov d5ee081cfd Add missing field initializer
To fix -Wmissing-field-initializers warning.
2021-09-16 10:42:52 +02:00
Máté Kocsis d670d9335c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix default value of $flags in idn_to_ascii() and idn_to_utf8()
2021-09-04 17:57:23 +02:00
Máté Kocsis d5aed7b0e3 Fix default value of $flags in idn_to_ascii() and idn_to_utf8() 2021-09-04 16:42:28 +02:00
Máté Kocsis b4b980e6ad Merge branch 'PHP-8.0'
* PHP-8.0:
  Declare a few missing function return types
2021-08-24 11:43:31 +02:00
Máté Kocsis c58a9f2a57 Declare a few missing function return types
Closes GH-7395
2021-08-24 11:38:50 +02:00
Joe Watkins 05ef6334cd Fix bug #81303 improve match errors 2021-08-02 17:31:26 +02:00
Nikita Popov a5ad9eeefa Add explicit IntlPartsIterator::getRuleStatus() method
Rather than doing a magic forward, explicitly add a forwarding
method. This must be the most frivolous use of get_method I've
ever seen.
2021-07-22 10:33:49 +02:00
Nikita Popov 9e787d51b5 Fix typo
Did not have intl enabled in this build...
2021-07-22 09:47:45 +02:00
Nikita Popov 6d505d4445 Add RETURN/RETVAL_COPY_DEREF() macros
These were missing from the set...

I think quite a few of these usages don't actually need the DEREF,
but I've just kept things as is for now.
2021-07-22 09:44:19 +02:00
Máté Kocsis 2378f35787 Use single line phpdoc in stubs where possible 2021-07-20 13:16:56 +02:00
Joe Watkins 570d9b63e9 Not serializable flag permeation 2021-07-20 12:28:35 +02:00
Nikita Popov 9fe4966811 Remove null return type from msgfmt_parse_message()
This doesn't seem to possible. Only false is returned on failure.
2021-07-14 12:00:18 +02:00
Nikita Popov 2afbacc16d Backport some intl stub changes from master
While we're not sure under what circumstances they would fail,
they're fallible on the implementation level.
2021-07-14 11:55:12 +02:00
Nikita Popov 5dc995df37 Eliminate null return value for Normalizer::normalize()
One error condition was returning null instead of false. Adjust
the implementation to look the same way as the exact same check
a few lines below.
2021-07-14 11:43:22 +02:00
Nikita Popov 1c50784ae7 Deprecate IntlCalendar::roll() with bool argument
Pass 1 instead of true and -1 instead of false.

Part of https://wiki.php.net/rfc/deprecations_php_8_1.
2021-07-08 15:34:51 +02:00
Máté Kocsis 65b96397b3 Declare tentative return types for ext/intl (#6986) 2021-07-06 10:55:43 +02:00
Christoph M. Becker 097cae9d90 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #74264: grapheme_strrpos() broken for negative offsets
2021-07-05 18:21:29 +02:00
Christoph M. Becker 8071bd2faf Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #74264: grapheme_strrpos() broken for negative offsets
2021-07-05 18:15:24 +02:00
Christoph M. Becker 28c9376306 Fix #74264: grapheme_strrpos() broken for negative offsets
We must not assume that `usearch_last()` gives the proper result for
negative offsets.  Instead we'd need to continue to search backwards
(`usearch_previous`) until we find a proper match.  However, apparently
searching backwards is broken, so we work around by searching forward
from the start of the string until we pass the `offset_pos`, and then
use the previous result.

Closes GH-7189.
2021-07-05 18:11:30 +02:00
Patrick Allaert ac18dd0dc7 Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
Patrick Allaert aff365871a Fixed some spaces used instead of tabs 2021-06-29 11:30:26 +02:00
Christoph M. Becker 1ae34385e1 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #68471: IntlDateFormatter fails for "GMT+00:00" timezone
2021-06-28 13:57:31 +02:00
Christoph M. Becker 1bf2b04b26 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #68471: IntlDateFormatter fails for "GMT+00:00" timezone
2021-06-28 13:55:56 +02:00
Christoph M. Becker 1a01f7816c Fix #68471: IntlDateFormatter fails for "GMT+00:00" timezone
GMT+00:00 is recognized by ICU, and is normalized to GMT.  There are no
issues when GMT+00:00 is passed to `IntlTimeZone::createTimeZone()`,
but passing it to IntlDateFormatter::__construct() causes a failure,
since there is an additional check regarding the validity.  While
checking the validity of the result of `TimeZone::createTimeZone()`[1]
is a good idea, comparing the IDs is overly restrictive.  Instead we
just check that the timezone is supported by ICU.

[1] <https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/classicu_1_1TimeZone.html#a35da0507b62754ffe5d8d59c19775cdb>

Closes GH-7190.
2021-06-28 13:54:22 +02:00