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
Máté Kocsis
117b8dee64
Add ifdef for NumberFormatter::ROUND_HALFODD
...
According to the docs, UNUM_ROUND_HALF_ODD is only available since ICU 69.0. The build on Travis currently fails probably because it uses a lower version.
2024-01-20 10:15:02 +01:00
Ayesh Karunaratne
8cc472d5d0
ext/intl: Add NumberFormatter::ROUND_HALFODD
...
The NumberFormatter::ROUND_HALFEVEN constant exists in PHP already, but its counterpart ROUND_HALFODD was missing.
This adds it, using `UNUM_ROUND_HALF_ODD`
Close GH-13191
2024-01-18 18:12:44 +00:00
Jorg Adam Sowa
94ddc74c9a
RFC: Add 4 new rounding modes to round() function ( #12056 )
...
https://wiki.php.net/rfc/new_rounding_modes_to_round_function
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2023-12-21 13:28:05 +01:00
Jorg Adam Sowa
9ad7844160
Typed constants in Intl extenstion ( #12360 )
2023-10-29 10:50:16 +01:00
George Peter Banyard
d65251e6e8
Deprecate NumberFormater::TYPE_CURRENCY constant
2023-07-17 05:01:13 +01:00
Máté Kocsis
163a278a02
Declare ext/intl constants in stubs - part 3 ( #9233 )
2022-08-08 08:28:40 +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
Máté Kocsis
65b96397b3
Declare tentative return types for ext/intl ( #6986 )
2021-07-06 10:55:43 +02: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
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
186612e4d7
Improve parameter names in ext/intl
...
Closes GH-6309
2020-10-12 18:06:45 +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
046cc5e4c2
Add another round of missing parameter types to stubs
...
Closes GH-5950
2020-08-07 16:48:45 +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
305b17e85f
Do not include the same stub multiple times
...
Closes GH-5322
2020-04-03 14:23:54 +02:00
Christoph M. Becker
7d0102dfa7
Revert "Replace @param annotations with type declarations"
...
This reverts commit c31029f335
.
2020-02-17 08:55:18 +01:00
Christoph M. Becker
c31029f335
Replace @param annotations with type declarations
2020-02-16 23:43:38 +01:00
Christoph M. Becker
6ee6097688
Constrain number parameter of numfmt_format to int|float
...
This is inline with similar changes to the math functions. Especially,
array to number conversion makes no sense here, and is likely to hide
a programming error.
To make that feasible, we introduce the `n` specifier for classic ZPP
so we can stick with `zend_parse_method_parameters()`.
We also remove a test case, which has been degenerated to a ZPP test.
2020-02-16 16:48:35 +01:00
Máté Kocsis
86780ff79f
Add stubs for NumberFormatter
...
Closes GH-4827
2020-02-09 22:10:12 +01:00