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
b4ec3e9bc0
Do not generate CONST_CS when registering constants ( #9439 )
2022-08-28 08:27:19 +02: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
bf0f6aaf18
Improve class entry generation
...
Related to GH-6701
2021-02-16 13:09:56 +01: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
Nikita Popov
c9b9f525a9
Include stub hash in generated arginfo files
...
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.
This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.
Closes GH-5739.
2020-06-24 09:55:19 +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
3709e74b5e
Store default parameter values of internal functions in arg info
...
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-04-08 18:37:51 +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