summaryrefslogtreecommitdiff
path: root/ext/intl
Commit message (Collapse)AuthorAgeFilesLines
* Fixed bug #80644: ResourceBundle::get() doesn't reset error stateNikita Popov2021-01-192-1/+8
|
* Sync datefmt_get_calendar_object signatureNikita Popov2021-01-182-2/+2
| | | | | In this case, it's only a matter of using the same type order in both cases.
* Sync intlcal_create_instance() and IntlCalendar::createInstance()Nikita Popov2021-01-182-2/+2
| | | | | | Remove the explicit mention of IntlGregorianCalendar in the latter. It is a subclass of IntlCalendar, and as such covered if only IntlCalendar is used as the return type.
* Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-271-10/+11
|\ | | | | | | | | * PHP-7.4: Fixed bug #80425
| * Fixed bug #80425Nikita Popov2020-11-271-10/+11
| | | | | | | | | | | | Rename the methods in MessageFormatAdapter to make sure they don't clash with anything defined by icu itself, which may be a problem if icu is linked statically.
* | Use true/false instead of TRUE/FALSE in intlNikita Popov2020-11-097-18/+18
| | | | | | | | And drop the U_DEFINE_TRUE_AND_FALSE flag.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-11-068-4/+701
|\ \ | |/ | | | | | | * PHP-7.4: Split tests for compatibility with ICU 68.1
| * Split tests for compatibility with ICU 68.1Christoph M. Becker2020-11-068-4/+701
| |
* | Verify parameter names of function aliasesMáté Kocsis2020-10-166-17/+14
| | | | | | | | Closes GH-6335
* | Initialize calendar_long variableNikita Popov2020-10-141-1/+1
| | | | | | | | | | | | | | 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...
* | Improve parameter names in ext/intlMáté Kocsis2020-10-1252-509/+523
| | | | | | | | Closes GH-6309
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-123-11/+44
|\ \ | |/ | | | | | | * PHP-7.4: intl: report more information about message pattern parse errors
| * intl: report more information about message pattern parse errorsPhilip Hofstetter2020-10-123-11/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Update intl test suite for ICU 67.1Christoph M. Becker2020-06-054-3/+469
| | | | | | | | Cherry-picked from c915c601710e2a44e6c7f89fcb12b8047c968108.
* | More precise type information for datefmt_format()Máté Kocsis2020-10-094-4/+4
| |
* | Fix out of bounds offset handling with empty needleNikita Popov2020-10-012-2/+54
| | | | | | | | For strrpos with positive out of bounds offsets was not detected.
* | Allow empty needle in grapheme_str*pos, grapheme_str*strChristian Schneider2020-10-013-101/+59
| | | | | | | | | | | | | | For consistency with str* and mb_str* functions. Closes GH-6245. Closes php/php-tasks#20.
* | Skip test with ICU version < 58Matteo Beccati2020-09-261-1/+5
| |
* | Promote warning to ValueError for Spoofchecker::setRestrictionLevel()George Peter Banyard2020-09-252-2/+22
| | | | | | | | Closes GH-6197
* | Normalize substr() behaviorNikita Popov2020-09-256-114/+114
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Try to fix testNikita Popov2020-09-221-2/+1
| |
* | Handle out-of-bounds offset consistently in grapheme_* APINikita Popov2020-09-223-32/+97
| | | | | | | | | | | | 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.
* | Fix grapheme out of bounds checkNikita Popov2020-09-223-2/+97
| | | | | | | | An offset equal to the string length is not out of bounds.
* | Drop -1 mode for collator_is_numeric()George Peter Banyard2020-09-213-7/+4
| | | | | | | | It is used only once with allow_errors enabled
* | Drop Hex support in numeric strings for Intl collatorGeorge Peter Banyard2020-09-211-12/+1
| | | | | | | | | | | | Support for this was removed in PHP 7.0. See: https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings
* | Consolidate the usage of "either" and "one of" in error messagesMáté Kocsis2020-09-202-2/+2
| | | | | | | | Closes GH-6173
* | Run tidyNikita Popov2020-09-18196-210/+210
| | | | | | | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* | Display types in stubs more uniformlyMáté Kocsis2020-09-162-2/+2
| | | | | | | | | | | | 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.
* | Declare array|int and object-of-class|int types in stubsMáté Kocsis2020-09-1412-80/+85
| | | | | | | | | | | | Closes GH-6081 Co-Authored-By: Nikita Popov <nikic@php.net>
* | Consolidate new union type ZPP macro namesMáté Kocsis2020-09-112-2/+2
| | | | | | | | | | | | | | They will now follow the canonical order of types. Older macros are left intact due to maintaining BC. Closes GH-6112
* | Improve error messages mentioning parameters instead of argumentsMáté Kocsis2020-09-0912-35/+35
| | | | | | | | Closes GH-5999
* | Promote warnings to exceptions in ext/intlMáté Kocsis2020-09-0718-146/+272
| | | | | | | | Closes GH-5972
* | Use ZPP instead of custom type checksMáté Kocsis2020-09-045-9/+7
| | | | | | | | We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068
* | Add more precise type info for stubsMáté Kocsis2020-09-0111-71/+71
| | | | | | | | Closes GH-6005
* | Prevent ResourceBundle double-constructionNikita Popov2020-08-262-0/+23
| |
* | Prevent double-construction of NumberFormatterNikita Popov2020-08-262-0/+16
| |
* | Prevent double-construction of IntlGregorianCalendarNikita Popov2020-08-262-2/+15
| |
* | Prevent double-construction of IntlRuleBasedBreakIteratorNikita Popov2020-08-262-1/+17
| |
* | Ensure RuleBasedBreakIterator constructor throws on failureNikita Popov2020-08-253-20/+17
| | | | | | | | | | Constructors must throw on failure indepdendent of the configured intl error mode.
* | Clean up BreakIterator create_object handlerNikita Popov2020-08-251-3/+3
| | | | | | | | | | | | Use standard zend_object_alloc() function and fix the object_init_properties() call (which works out okay because there are no properties).
* | Fixed bug #79946Nikita Popov2020-08-102-2/+1
| | | | | | | | | | | | | | | | | | | | 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.
* | Add many missing closing PHP tags to testsMáté Kocsis2020-08-09121-2/+121
| | | | | | | | Closes GH-5958
* | Add another round of missing parameter types to stubsMáté Kocsis2020-08-0718-24/+60
| | | | | | | | Closes GH-5950
* | Accept zend_object* in zend_update_propertyNikita Popov2020-08-071-1/+1
| |
* | Add a bunch of missing argument types to stubsMáté Kocsis2020-08-032-3/+13
| |
* | Warning to ValueError promotion in Intl extension Part 1George Peter Banyard2020-07-3124-459/+442
| | | | | | | | | | | | | | | | | | Affects: - IntlCalendar - IntlGregorianCalendar - IntlBreakIterator Closes GH-5669
* | Add a few missing parameter types in stubsMáté Kocsis2020-07-302-2/+3
| | | | | | | | Related to GH-5627
* | Validate collator earlier during sortNikita Popov2020-07-243-28/+15
| | | | | | | | | | Check this once before the sort, instead of on every compare. Also directly store the UCollator to make things more obvious.
* | Fix some clang warningsNikita Popov2020-07-231-1/+1
| |
* | Fix UConvert::getErrorMessage() leak on zpp failureNikita Popov2020-07-211-1/+1
| |