Commit Graph

1406 Commits

Author SHA1 Message Date
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
Máté Kocsis
d6264b0966
Verify parameter names of function aliases
Closes GH-6335
2020-10-16 10:56:33 +02:00
Nikita Popov
5e34744fd9 Initialize calendar_long variable
As reported by cmb, this results a VC runtime warning. I don't
believe there's a problem here, as we only use calendar_long if
both calendar_is_null and calendar_obj are not set, but it doesn't
hurt to initialize it either...
2020-10-14 11:57:05 +02:00
Máté Kocsis
186612e4d7
Improve parameter names in ext/intl
Closes GH-6309
2020-10-12 18:06:45 +02:00
Nikita Popov
6edad1716d Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  intl: report more information about message pattern parse errors
2020-10-12 16:44:18 +02:00
Philip Hofstetter
74cf2eb83f intl: report more information about message pattern parse errors
The message patterns can be pretty complex, so reporting a generic
U_PARSE_ERROR without any additional information makes it needlessly
hard to fix erroneous patterns.

This commit makes use of the additional UParseError* parameter to
umsg_open to retrieve more details about the parse error to report that
to the user via intl_get_error_message()

Additional improve error reporting from the IntlMessage constructor.
Previously, all possible failures when calling IntlMessage::__construct()
would be masked away with a generic "Constructor failed" message.
This would include invalid patterns.

This commit makes sure that the underlying error that caused the
constructor failure is reported as part of the IntlException error
message.

Closes GH-6325.
2020-10-12 16:42:41 +02:00
Máté Kocsis
503999910b
More precise type information for datefmt_format() 2020-10-09 11:05:42 +02:00
Nikita Popov
f82414e935 Fix out of bounds offset handling with empty needle
For strrpos with positive out of bounds offsets was not detected.
2020-10-01 16:41:51 +02:00
Christian Schneider
7af24eaedd Allow empty needle in grapheme_str*pos, grapheme_str*str
For consistency with str* and mb_str* functions.

Closes GH-6245.
Closes php/php-tasks#20.
2020-10-01 16:33:58 +02:00
Matteo Beccati
43ce7846d2 Skip test with ICU version < 58 2020-09-26 10:47:56 +02:00
George Peter Banyard
a91cb2f48c Promote warning to ValueError for Spoofchecker::setRestrictionLevel()
Closes GH-6197
2020-09-25 17:55:31 +01:00
Nikita Popov
13b791c79c Normalize substr() behavior
Make the behavior of substr(), mb_substr(), iconv_substr() and
grapheme_substr() consistent when it comes to the handling of
out of bounds offsets. substr() will now always clamp out of
bounds offsets to the string boundary. Cases that previously
returned false will now return an empty string. This means that
substr() itself *always* returns a string now (like mb_substr()
already did before.)

Closes GH-6182.
2020-09-25 09:58:21 +02:00
Nikita Popov
73631e517f Try to fix test 2020-09-22 17:04:06 +02:00
Nikita Popov
6436ddbfc8 Handle out-of-bounds offset consistently in grapheme_* API
Make sure we throw the same kind of error regardless of whether
the offset is out-of-bounds in the fast path or in the slow
path.
2020-09-22 17:01:06 +02:00
Nikita Popov
1312c417de Fix grapheme out of bounds check
An offset equal to the string length is not out of bounds.
2020-09-22 16:38:53 +02:00
George Peter Banyard
ddd99a7005 Drop -1 mode for collator_is_numeric()
It is used only once with allow_errors enabled
2020-09-21 16:29:10 +01:00
George Peter Banyard
2b6f5eec6c Drop Hex support in numeric strings for Intl collator
Support for this was removed in PHP 7.0.

See: https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings
2020-09-21 16:29:10 +01:00
Máté Kocsis
e950ca13ea
Consolidate the usage of "either" and "one of" in error messages
Closes GH-6173
2020-09-20 19:41:47 +02:00
Nikita Popov
c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +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
c98d47696f
Consolidate new union type ZPP macro names
They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.

Closes GH-6112
2020-09-11 11:00:18 +02:00
Máté Kocsis
9975986b7e
Improve error messages mentioning parameters instead of arguments
Closes GH-5999
2020-09-09 10:47:43 +02:00
Máté Kocsis
fd0b39905c
Promote warnings to exceptions in ext/intl
Closes GH-5972
2020-09-07 19:46:55 +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
Nikita Popov
f593019819 Prevent ResourceBundle double-construction 2020-08-26 10:25:15 +02:00
Nikita Popov
6b554251f7 Prevent double-construction of NumberFormatter 2020-08-26 10:25:09 +02:00
Nikita Popov
72eaf509d3 Prevent double-construction of IntlGregorianCalendar 2020-08-26 10:24:57 +02:00
Nikita Popov
f6e5cc3391 Prevent double-construction of IntlRuleBasedBreakIterator 2020-08-26 10:03:28 +02:00
Nikita Popov
647fb38d58 Ensure RuleBasedBreakIterator constructor throws on failure
Constructors must throw on failure indepdendent of the configured
intl error mode.
2020-08-25 15:28:58 +02:00
Nikita Popov
259d050a39 Clean up BreakIterator create_object handler
Use standard zend_object_alloc() function and fix the
object_init_properties() call (which works out okay because there
are no properties).
2020-08-25 13:11:43 +02:00
Nikita Popov
da0a0a13be Fixed bug #79946
Declare __STDC_CONSTANT_MACROS and __STDC_FORMAT_MACROS via -D
to make sure they are declared before the first stdint.h include.
We also define these in php_stdint.h, but don't always include that
file first.

This is necessary for old compilers that use C99 rather than C11
semantics for stdint.h.
2020-08-10 09:52:22 +02:00
Máté Kocsis
7aacc705d0
Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +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
Nikita Popov
8b77c58130 Accept zend_object* in zend_update_property 2020-08-07 16:40:27 +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
27ad19c3e8 Validate collator earlier during sort
Check this once before the sort, instead of on every compare.
Also directly store the UCollator to make things more obvious.
2020-07-24 11:58:10 +02:00
Nikita Popov
545928e4b8 Fix some clang warnings 2020-07-23 10:35:40 +02:00
Nikita Popov
4ce9571978 Fix UConvert::getErrorMessage() leak on zpp failure 2020-07-21 12:05:44 +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
d30cd7d7e7
Review the usage of apostrophes in error messages
Closes GH-5590
2020-07-10 21:05:28 +02:00
Nikita Popov
302933daea Remove no_separation flag 2020-07-07 09:30:24 +02:00
Nikita Popov
e93aca7167 Explicitly create references in UConverter callbacks
And don't allow separation.
2020-07-07 09:29:21 +02:00
Máté Kocsis
91fbd12d57
Fix a few comments 2020-07-06 21:23:35 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Nikita Popov
312201dce4 Add get_gc handle for object iterators
Optional handler with the same semantics as the object handler.
2020-07-01 15:17:22 +02:00
Máté Kocsis
30067894fc
Update outdated arginfo hashes 2020-06-30 16:02:11 +02:00
George Peter Banyard
892b32d839 Drop non-well numeric string in Intl test 2020-06-28 19:30:07 +02:00
Nikita Popov
ff19ec2df3 Introduce InternalIterator
Userland classes that implement Traversable must do so either
through Iterator or IteratorAggregate. The same requirement does
not exist for internal classes: They can implement the internal
get_iterator mechanism, without exposing either the Iterator or
IteratorAggregate APIs. This makes them usable in get_iterator(),
but incompatible with any Iterator based APIs.

A lot of internal classes do this, because exposing the userland
APIs is simply a lot of work. This patch alleviates this issue by
providing a generic InternalIterator class, which acts as an
adapater between get_iterator and Iterator, and can be easily
used by many internal classes. At the same time, we extend the
requirement that Traversable implies Iterator or IteratorAggregate
to internal classes as well.

Closes GH-5216.
2020-06-24 15:31:41 +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
Nikita Popov
15846ff115 Add ZVAL_OBJ_COPY macro
For the common ZVAL_OBJ + GC_ADDREF pattern.
This mirrors the existing ZVAL_STR_COPY API.
2020-06-17 16:36:56 +02:00
Nikita Popov
257dbb0450 Add zend_call_known_function() API family
This adds the following APIs:

void zend_call_known_function(
    zend_function *fn, zend_object *object, zend_class_entry *called_scope,
    zval *retval_ptr, int param_count, zval *params);

void zend_call_known_instance_method(
    zend_function *fn, zend_object *object, zval *retval_ptr, int param_count, zval *params);
void zend_call_known_instance_method_with_0_params(
    zend_function *fn, zend_object *object, zval *retval_ptr);
void zend_call_known_instance_method_with_1_params(
    zend_function *fn, zend_object *object, zval *retval_ptr, zval *param);
void zend_call_known_instance_method_with_2_params(
    zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2);

These are used to perform a call if you already have the
zend_function you want to call. zend_call_known_function()
is the base API, the rest are just really thin wrappers around
it for the common case of instance method calls.

Closes GH-5692.
2020-06-09 16:21:54 +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
aa9b0ccda8
Add tests to check mismatching function signatures
Closes GH-5666
2020-06-06 09:23:34 +02:00
George Peter Banyard
4c6ecc820b Refactor IntlBreakIterator::next() handling 2020-06-05 22:16:33 +02:00
George Peter Banyard
7af0466044 Convert code path which should never happen to assertion 2020-06-05 22:11:06 +02:00
Christoph M. Becker
46d2a981dd Update intl test suite for ICU 67.1
Cherry-picked from c915c60171.
2020-06-05 10:51:51 +02:00
George Peter Banyard
97757e759d Fix weird zend_bool usage in Intl Calendar::roll() method
This code really needs to be review as it's convoluted for no good reason.
2020-06-04 22:56:10 +02:00
Christoph M. Becker
864fb0ec23 Implement #47074: phpinfo() reports "On" as 1 for the some extensions
What is modified as boolean, should also be displayed as boolean.
2020-06-04 11:25:45 +02:00
Máté Kocsis
fbe30592d6
Improve type error messages when an object is given
From now on, we always display the given object's type instead of just reporting "object".
Additionally, make the format of return type errors match the format of argument errors.

Closes GH-5625
2020-05-26 19:06:19 +02:00
George Peter Banyard
ea8686540a Fix [-Wundef] warning in INTL extension 2020-05-20 18:22:10 +02:00
George Peter Banyard
1f05966a41 Use new Fast ZPP macros for string|int parar types
Closes GH-5512
2020-05-13 12:07:02 +02:00
Nikita Popov
28af364d2a Deprecate old ReflectionParameter type declaration APIs
This deprecates:

    ReflectionParameter::isArray()
    ReflectionParameter::isCallable()
    ReflectionParameter::getClass()

These APIs have been superseded by ReflectionParameter::getType()
since PHP 7.0. Types introduced since that time are not available
through the old APIs, and their behavior is getting increasingly
confusing. This is how they interact with PHP 8 union types:

 * isArray() will return true if the type is array or ?array,
   but not any other union type
 * Same for isCallable().
 * getClass() will return a class for T|int etc, as long as the
   union only contains a single type. T1|T2 will return null.

This behavior is not particularly reasonable or useful, and will
get more confusing as new type system extensions are added.

Closes GH-5209.
2020-05-11 17:01:40 +02:00
Máté Kocsis
4a816584a4
Make float to string casts locale-independent
From now on, float to string casting will always behave locale-independently.
RFC: https://wiki.php.net/rfc/locale_independent_float_to_string
Closes GH-5224

Co-authored-by: George Peter Banyard <girgias@php.net>
2020-05-08 10:52:23 +02:00
Christoph M. Becker
c915c60171 Update intl test suite for ICU 67.1 2020-04-24 11:24:44 +02:00
vibhutisawant
481caf17bc Fix Bug #79431 Various compiler warnings on Big endian architecture with GCC 5.4.0
Fix [-Werror=maybe-uninitialized] compilation warnings on big endian system

Closes GH-5373
2020-04-15 23:30:06 +02:00
George Peter Banyard
04ab4d09be Add Intl resource bundle files for big-endian architecture.
Little and Big endian files have their own designated folder.
Both use the ASCII charset family.
We may want to add a big-endian/EBCDIC charset family resource bundle in the future.

The build script is currently left untouched as it seems to mostly be for Windows.
2020-04-14 15:30:01 +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
e088836bbc
Fix nullable types in PHPDoc 2020-04-12 00:25:33 +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
Nikita Popov
2bcc4ab8f4 Verify that all stubs have a return type 2020-04-03 17:59:30 +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
Máté Kocsis
b6229fbca2
Display nullability in type error messages for internal functions
Closes GH-5327
2020-03-31 16:55:36 +02:00
Nikita Popov
8fd7f02ea4 Make cast_object handler required
Avoid subtle differences in behavior depending on whether the
handler is absent or returns FAILURE.

If you previously set cast_object to NULL, create a handler that
always returns FAILURE instead.
2020-03-31 14:37:49 +02:00
Nikita Popov
fb5bfcb75b Add a ZEND_UNCOMPARABLE value
To explicitly indicate that objects are uncomparable. For now
this has no functional difference from the usual 1 return value,
but makes intent clearer.
2020-03-31 12:36:48 +02:00
Nikita Popov
33ef3d64da Use separate typedef for bucket comparison function
Avoid performing the same casting dance inside each sort compare
function.
2020-03-04 12:46:06 +01:00
Máté Kocsis
cb933d63c2
Add stubs for IntlChar
Closes GH-5217
2020-02-28 18:10:52 +01:00
Máté Kocsis
d70e6bdcde
Add stubs for UConverter
Closes GH-5218
2020-02-28 14:37:37 +01:00
Nikita Popov
c5e8c25dda Merge branch 'PHP-7.4'
* PHP-7.4:
  Use type-checked ref assignment in UConverter
2020-02-28 10:22:11 +01:00
Nikita Popov
6d19acf54b Use type-checked ref assignment in UConverter 2020-02-28 10:21:50 +01:00
Máté Kocsis
960318ed95
Change argument error message format
Closes GH-5211
2020-02-26 15:00:08 +01:00
Máté Kocsis
81fee9f29f
Get rid of method mapping of BreakIterator classes 2020-02-25 23:05:24 +01:00
Máté Kocsis
bcb7847139
Add stubs for Intl BreakIterator
Closes GH-5207
2020-02-25 23:05:03 +01:00
Nikita Popov
16897aacce Remove unnecessary checks in breakpoint iterator
The result of Z_INTL_BREAKITERATOR_P() cannot be NULL. This type
of macro in general can never be NULL.
2020-02-25 10:06:13 +01:00
Máté Kocsis
ac0853eb26
Make type error messages more consistent
Closes GH-5092
2020-02-17 14:22:17 +01: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
George Peter Banyard
a7e3bbbc55 Fix [-Wmissing-field-initializers] compiler warning in transliterator_methods.c 2020-02-11 00:23:52 +01:00
Máté Kocsis
86780ff79f
Add stubs for NumberFormatter
Closes GH-4827
2020-02-09 22:10:12 +01:00
Máté Kocsis
c42572970a
Add various stubs for Intl
Closes GH-4826
2020-02-04 14:55:21 +01:00
Máté Kocsis
a827db24f1
Add stubs for IntlCalendar
Closes GH-4846
2020-02-04 14:50:02 +01:00
Máté Kocsis
223663807a
Fix ZPP of intl_cal_set() 2020-02-04 14:47:11 +01:00
Máté Kocsis
fe7761b0ad
Add stubs for IntlDateFormatter & MessageFormatter
Closes GH-4812
2020-02-04 13:08:06 +01:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Nikita Popov
58b17906f5 Apply tidy formatting
Mostly reindent PHP scripts to spaces.
2020-02-03 13:41:31 +01:00
Christoph M. Becker
d601b123e7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Relax test expectation
2020-02-03 13:05:54 +01:00
Christoph M. Becker
42e67881c9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Relax test expectation
2020-02-03 13:05:09 +01:00
Christoph M. Becker
b93e4aa11c Relax test expectation
Since we're dealing with floating point numbers, precision issues may
hit us, and actually it's not necessary to check for the exact number
anyway, because it is not exact in the first place.  Therefore, we
relax the test expectations.
2020-02-03 13:03:54 +01:00
Christoph M. Becker
aba6937c0a Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79212: NumberFormatter::format() may detect wrong type
2020-02-03 12:30:42 +01:00
Christoph M. Becker
57b9eca83d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79212: NumberFormatter::format() may detect wrong type
2020-02-03 12:29:43 +01:00
Christoph M. Becker
c2935499b1 Fix #79212: NumberFormatter::format() may detect wrong type
We have to convert to number *before* detecting the type, to cater to
internal objects implementing `cast_object`.

We also get rid of the fallback behavior of using `FORMAT_TYPE_INT32`,
because that can no longer happen; after `convert_scalar_to_number_ex`
the type is either `IS_LONG` or `IS_DOUBLE`.  We cater explicitly to
the `IS_ARRAY` case what also avoids triggering a type confusion when
`::TYPE_INT64` is passed as `$type`.
2020-02-03 12:28:32 +01:00
Máté Kocsis
8b36be268d
Fix indentation and whitespaces in tests
In preparation for GH-5074
2020-01-31 17:47:14 +01:00
Christoph M. Becker
1468484296 Fix #74063: NumberFormatter fails after retrieval from session
While it would be desireable to actually support unserialization of
NumberFormatter instances, at least we should not allow serialization
for now.

We also remove some doubtful tests, which have been added[1] claiming
that they would crash the intl extension, but apparently no fix has
been applied, and the test cases have not been marked as XFAIL.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=ed793b2a3f857fd49c0c1b036062140da5b3e674>
2020-01-30 10:13:29 +01:00
Máté Kocsis
476636841f
Fix #78649 Provide ICU RELATIVE_ constants
Closes GH-5105
2020-01-22 19:59:40 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
019e8d438c
Throw exception for unconstructed intl objects
Closes GH-5052
2020-01-05 23:55:14 +01:00
Máté Kocsis
aadd3aaed9
Use RETURN_THROWS() in various places 2020-01-03 21:10:24 +01:00
Máté Kocsis
e08ce4c13d
Add stubs for various intl functions
Closes GH-4819
- Add stubs for idn functions
- Add stubs for grapheme functions
- Add stubs for Spoofchecker
- Add stubs for Normalizer
- Add stubs for ResourceBundle
- Fix arginfos
- Add support for union return types
- Fix arginfo for resourcebundle_create()
2020-01-03 18:54:57 +01:00
Máté Kocsis
7b4a4d2ace
Use RETURN_THROWS() after try_convert_to_string() 2020-01-03 17:04:06 +01:00
Máté Kocsis
1b93cfee0c
Use RETURN_THROWS() after zend_parse_method_parameters() 2020-01-02 23:01:37 +01:00
Máté Kocsis
349a286461
Use RETURN_THROWS() after zend_throw_error() 2020-01-01 16:42:30 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Christoph M. Becker
8060a8507f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78912: INTL Support for accounting format
2019-12-09 16:35:45 +01:00
Christoph M. Becker
505cc77cbe Fix #78912: INTL Support for accounting format
We provide `NumberFormatter::CURRENCY_ACCOUNTING` to wrap
`UNUM_CURRENCY_ACCOUNTING `[1].

[1] <https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/unum_8h.html#a4eb4d3ff13bd506e7078b2be4052266dae97cdd7ed612d07d251021c076efb1c5>
2019-12-09 16:34:56 +01:00
Fabien Villepinte
e2a8cc0114 Fix typo with msgfmt_parse_message() 2019-11-19 19:48:13 +01:00
Máté Kocsis
c58b12334d Add union return types with one class 2019-11-18 12:44:38 +01:00
Christoph M. Becker
5b9725e555 Add missing zend_parse_parameters_none() 2019-11-16 18:20:39 +01:00
Máté Kocsis
65db340ae7 Add stubs for the Locale component of Intl 2019-11-16 18:15:03 +01:00
Stanislav Malyshev
ad0a3f2886 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #78804 - Segmentation fault in Locale::filterMatches
2019-11-11 23:08:52 -08:00
Stanislav Malyshev
686a24c1eb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #78804 - Segmentation fault in Locale::filterMatches
2019-11-11 23:08:44 -08:00
Stanislav Malyshev
ea2a125789 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #78804 - Segmentation fault in Locale::filterMatches
2019-11-11 23:08:38 -08:00
Stanislav Malyshev
2c9926f156 Fix bug #78804 - Segmentation fault in Locale::filterMatches 2019-11-11 22:32:35 -08:00
Máté Kocsis
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Máté Kocsis
6d0366ad08 Add stubs for IntlTimeZone 2019-11-04 14:10:01 +01:00
Christoph M. Becker
4008704f62 zend_parse_parameters_throw() is obsolete
Since `zend_parse_parameters()` throws now, there is no reason to
explicitly call `zend_parse_parameters_throw()` anymore, and since both
have actually the same implementation, we redefine the latter as macro.
2019-11-01 16:47:15 +01:00
Máté Kocsis
2204dbde3b Add missing ZPP checks
Closes GH-4878.
2019-11-01 15:26:52 +01:00
Máté Kocsis
969e7a3c8b Cleanup return values for Intl when parameter parsing is unsuccessful
Closes GH-4871.
2019-10-30 13:21:40 +01:00
Nikita Popov
e0be51d082 Use ArgumentCountError in IntlGregorianCalendar ctor 2019-10-30 10:27:52 +01:00
Nikita Popov
c858d17f06 Optimize instanceof_function
Split out the simple equality check into an inline function --
this is one of the common cases.

Replace instanceof_function_ex with zend_class_implements_interface.
There are a few more places where it may be used.
2019-10-25 10:51:17 +02:00
Nikita Popov
1f497b3db7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Skip IntlTimeZone::getOffset() error tests on non-x86
2019-10-24 15:26:24 +02:00
Nikita Popov
93a9b56c90 Skip IntlTimeZone::getOffset() error tests on non-x86
I'm not totally sure, but I have a strong suspicion that the fact
that this produces an error is an artifact of undefined cast behavior
(which will yield INDVAL on x86 but saturate on ARM). INF seems to
be the only value that results in an error even on x86 (variations
like -INF or NAN succeed).

It might make sense to just remove this test entirely, but for now
let's skip it on non-x86.
2019-10-24 15:26:11 +02:00
Christoph M. Becker
0436bc875e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix miscellaneous typos in docs
2019-10-19 19:20:25 +02:00
Tyson Andre
38f388fba4 Fix miscellaneous typos in docs 2019-10-19 19:19:28 +02:00
Dmitry Stogov
b02b81299c Comparison cleanup:
- introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval)
- remove compare_objects() object handler, and keep only compare() handler
2019-10-07 17:57:49 +03:00
Christoph M. Becker
487e6e9eca Merge branch 'PHP-7.4'
* PHP-7.4:
  Split intl tests for ICU 65
2019-10-04 13:55:33 +02:00
Christoph M. Becker
884b780667 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Split intl tests for ICU 65
2019-10-04 13:54:49 +02:00
Christoph M. Becker
1ce8c805e2 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Split intl tests for ICU 65
2019-10-04 13:53:58 +02:00
Christoph M. Becker
545412a6cd Split intl tests for ICU 65 2019-10-04 13:53:22 +02:00
Nikita Popov
2f92957fd3 Convert some notices to warnings
Part of https://wiki.php.net/rfc/engine_warnings.
2019-10-02 10:34:08 +02:00
Nikita Popov
235983dfde Merge branch 'PHP-7.4' 2019-09-30 17:52:39 +02:00
Fabien Villepinte
0aa3acc6c4 Fix borked SKIPIFs 2019-09-30 17:51:41 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
f753975c7a Merge branch 'PHP-7.4' 2019-09-25 10:35:26 +02:00