David CARLIER
bbac6f5c20
GH-18344 add Locale::addLikelySubtags/Locale::minimizeSubtags support. ( #18487 )
...
from a minimized locale, addLikelySubtags augments it with likely
subtags so no changes is the locale is already maximized e.g.
`en_Latn_US`, minimizeSubtags on the other hand does the opposite
operation.
2025-05-03 16:20:18 +01:00
Niels Dossche
b2876117f0
Update return types of transliterator_get_error_code(), transliterator_get_error_message(), TransLiterator::getErrorCode(), and TransLiterator::getErrorMessage() ( #18470 )
...
Returning false is impossible.
2025-05-01 10:35:43 +02:00
tekimen
bdcea111f3
Add grapheme_levenshtein function. ( #18087 )
...
Measure levenshtein for grapheme cluster unit
2025-04-28 16:22:52 +09:00
David Carlier
fcd0f72cdd
GH-18345: adding Locale::isRightToLeft.
...
Checks is the locale is written left to right.
It makes sure all the needed likely subtags are included (maximization)
then determines the direction by known matches.
close GH-18351
2025-04-19 10:23:03 +01:00
Christoph M. Becker
3815a773a1
Close GH-16659: Bump ICU requirement to ICU >= 57.1
...
This requirements bump should rarely affect anybody in practice. All
major distros already ship more recent ICU versions, and even for
Solaris 11, ICU 57.1 is available via OpenCSW. Note that ICU 57.1 has
been released on 2016-03-23[1].
[1] <https://icu.unicode.org/download/57 >
Closes GH-16688.
2024-11-14 01:30:48 +01:00
Tim Düsterhus
29f98e7485
Replace @deprecated
by #[\Deprecated]
for internal functions / class constants ( #14750 )
...
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2024-07-10 16:47:31 +02:00
Yuya Hamada
44e8301cf6
Add grapheme_str_split function
...
I noticed that PHP does not have a grapheme cluster based str_split function.
So I created the grapheme_str_split function.
This feature will allow you to correctly handle emoji
and variable selectors.
Co-authored-by: Ayesh Karunaratne <Ayesh@users.noreply.github.com>
Close GH-13580
2024-04-10 18:20:23 +01:00
Máté Kocsis
b06c95b631
Declare the missing true return types ( #13709 )
2024-03-16 07:26:37 +01:00
Gina Peter Banyard
dbf0b6aa42
ext/intl: Refactor ResourceBundle get and dimension access ( #13503 )
2024-02-26 17:03:17 +00:00
David Carlier
22a3866f0c
ext/intl: Timezone::getIanaID method addition.
...
returns the primary IANA zone ID from the provided timezone ID.
Most of the time, timezone ID==IANA ID.
available from icu >= 74.
Close GH-13419.
2024-02-21 16:09:22 +00:00
Máté Kocsis
811245d2e0
Calling IntlGregorianCalendar::__construct() with more than 2 arguments and intlgregcal_create_instance()
2023-12-04 22:27:59 +01:00
Máté Kocsis
f4df37af3d
Deprecate calling IntlCalendar::set() with more than 2 arguments and intlcal_set()
2023-12-04 22:27:59 +01:00
Máté Kocsis
85338569de
Narrow bool return types to true when possible
2023-05-07 19:34:09 +02:00
David Carlier
45677081fa
ext/intl: dateformatter settimezone changes on success, returning true like setcalendar.
...
Closes GH-10790
2023-03-09 21:45:26 +00:00
Máté Kocsis
66c4ade0fe
Declare ext/intl constants in stubs - part 14 ( #9387 )
2022-08-22 13:20:26 +02:00
Máté Kocsis
150456eaa2
Declare ext/intl constants in stubs - part 2 ( #9219 )
2022-08-02 16:55:12 +02: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
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
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
Máté Kocsis
65b96397b3
Declare tentative return types for ext/intl ( #6986 )
2021-07-06 10:55:43 +02:00
Nikita Popov
331eddadc8
Make date/time type arguments of IntlDateFormatter ctor optional
...
Default them to IntlDateFormatter:FULL, which has value 0, which
was what you would get if you passed null to these arguments in
weak typing mode. The documentation called this ICU's default
date/time type.
2021-04-27 23:58:38 +02:00
Máté Kocsis
45fa7596dc
Add missing classes to stubs
2021-02-09 22:38:06 +01:00
Nikita Popov
9d54609a19
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Use E_ERROR to report arginfo/zpp mismatch
Make NumberFormatter ctor $pattern nullable
Make IntlDateFormatter ctor $pattern nullable
2021-02-09 14:37:41 +01:00
Nikita Popov
f5768eaa2e
Make NumberFormatter ctor $pattern nullable
...
Whether the pattern is needed depends on the used style. If no
pattern is needed, null is a more sensible value than an empty
string.
fixup
2021-02-09 14:36:41 +01:00
Nikita Popov
186f9bab45
Make IntlDateFormatter ctor $pattern nullable
...
The implementation already made this argument nullable, but it
was not reflected in the stub.
2021-02-09 14:25:30 +01:00
Máté Kocsis
c6723728df
Generate ext/intl class entries from stubs
...
Closes GH-6670
2021-02-09 13:37:24 +01:00
Máté Kocsis
d6264b0966
Verify parameter names of function aliases
...
Closes GH-6335
2020-10-16 10:56:33 +02:00
Máté Kocsis
186612e4d7
Improve parameter names in ext/intl
...
Closes GH-6309
2020-10-12 18:06:45 +02:00
Máté Kocsis
503999910b
More precise type information for datefmt_format()
2020-10-09 11:05:42 +02:00
Máté Kocsis
c76910cd96
Display types in stubs more uniformly
...
In preparation for generating method signatures for the manual.
This change gets rid of bogus false|null return types, a few unnecessary trailing backslashes, and settles on using ? when possible for nullable types.
2020-09-16 21:19:36 +02:00
Máté Kocsis
46c0c82a0f
Declare array|int and object-of-class|int types in stubs
...
Closes GH-6081
Co-Authored-By: Nikita Popov <nikic@php.net>
2020-09-14 11:59:32 +02:00
Máté Kocsis
8107a1da5a
Use ZPP instead of custom type checks
...
We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068
2020-09-04 14:32:34 +02:00
Máté Kocsis
f7fbc6333f
Add more precise type info for stubs
...
Closes GH-6005
2020-09-01 16:35:56 +02:00
Máté Kocsis
046cc5e4c2
Add another round of missing parameter types to stubs
...
Closes GH-5950
2020-08-07 16:48:45 +02:00
Máté Kocsis
79981a394e
Add a bunch of missing argument types to stubs
2020-08-03 00:45:51 +02:00
George Peter Banyard
f78a091014
Warning to ValueError promotion in Intl extension Part 1
...
Affects:
- IntlCalendar
- IntlGregorianCalendar
- IntlBreakIterator
Closes GH-5669
2020-07-31 13:27:22 +01:00
Máté Kocsis
0d330e1a02
Add a few missing parameter types in stubs
...
Related to GH-5627
2020-07-30 14:26:45 +02:00
Nikita Popov
4903f7c5fd
Fix IntlGregorianCalendar constructor signature
...
Give these conversative UNKNOWN defaults and no types, as the
overload is something of a mess.
2020-07-17 12:47:25 +02:00
Máté Kocsis
596561009c
Fix some UNKNOWN default values
...
In ext/ffi, ext/intl, ext/mysqli, and ext/pcntl
2020-06-09 09:46:51 +02:00
Máté Kocsis
f00bcfbb7d
Generate method entries for ext/intl
...
Closes GH-5370
2020-04-14 13:39:00 +02:00
Máté Kocsis
4aa137c6a6
Fix the default value of the $length parameter of grapheme_substr()
2020-04-10 18:17:18 +02:00
Máté Kocsis
305b17e85f
Do not include the same stub multiple times
...
Closes GH-5322
2020-04-03 14:23:54 +02:00