summaryrefslogtreecommitdiff
path: root/ext/intl/msgformat
Commit message (Collapse)AuthorAgeFilesLines
* Improve class entry generationMáté Kocsis2021-02-161-2/+1
| | | | Related to GH-6701
* Generate ext/intl class entries from stubsMáté Kocsis2021-02-093-7/+15
| | | | Closes GH-6670
* 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.
* | Improve parameter names in ext/intlMáté Kocsis2020-10-122-9/+9
| | | | | | | | Closes GH-6309
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-122-3/+36
|\ \ | |/ | | | | | | * PHP-7.4: intl: report more information about message pattern parse errors
| * intl: report more information about message pattern parse errorsPhilip Hofstetter2020-10-122-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove proto comments from C filesMax Semenik2020-07-064-53/+11
| | | | | | | | Closes GH-5758
* | Include stub hash in generated arginfo filesNikita Popov2020-06-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Generate method entries for ext/intlMáté Kocsis2020-04-1411-133/+72
| | | | | | | | Closes GH-5370
* | Do not include the same stub multiple timesMáté Kocsis2020-04-032-66/+0
| | | | | | | | Closes GH-5322
* | Add stubs for IntlDateFormatter & MessageFormatterMáté Kocsis2020-02-043-39/+155
| | | | | | | | Closes GH-4812
* | Throw exception for unconstructed intl objectsMáté Kocsis2020-01-051-3/+2
| | | | | | | | Closes GH-5052
* | Use RETURN_THROWS() after zend_parse_method_parameters()Máté Kocsis2020-01-024-8/+8
| |
* | Use RETURN_THROWS() during ZPP in most of the extensionsMáté Kocsis2019-12-311-1/+1
| | | | | | | | Except for some bigger ones: reflection, sodium, spl
* | Fix typo with msgfmt_parse_message()Fabien Villepinte2019-11-191-1/+1
| |
* | Cleanup return values for Intl when parameter parsing is unsuccessfulMáté Kocsis2019-10-304-9/+9
| | | | | | | | Closes GH-4871.
* | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-2514-28/+0
| | | | | | | | Closes GH-4732.
* | Merge branch 'PHP-7.4'Nikita Popov2019-09-251-3/+3
|\ \ | |/
| * Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-09-251-3/+3
| |\
| | * Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-09-251-3/+3
| | |\
| | | * Fix hash key length in umsg_parse_format()Jinesh Patel2019-09-251-3/+3
| | | | | | | | | | | | | | | | | | | | Fix array length passed to zend_hash_str_find_ptr() casting from UChar array to char array requires mul by sizeof(UChar).
| | * | Merge branch 'PHP-7.2' into PHP-7.3Anatol Belski2018-10-051-0/+3
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | * PHP-7.2: Add test for bug #76942 Fixed Bug #76942 U_ARGUMENT_TYPE_MISMATCH
| | | * Fixed Bug #76942 U_ARGUMENT_TYPE_MISMATCHAnatol Belski2018-10-051-0/+3
| | | | | | | | | | | | | | | | ref bug #74484
* | | | Remove unused is_constructor argumentsNikita Popov2019-07-151-3/+3
| | | |
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-06-251-4/+8
|\ \ \ \ | |/ / /
| * | | Fix TimeZone leak in intl MessageFormatNikita Popov2019-06-251-4/+8
| | | | | | | | | | | | | | | | | | | | I'm just giving each format a distinct owned object here ... sharing it looks complicated.
* | | | Intl: Don't separately report "bad arguments" errorsNikita Popov2019-03-114-27/+0
| | | | | | | | | | | | | | | | | | | | zpp will be throwing for these now, don't report them in addition to that.
* | | | Make zpp failures always throw, independent of strict_typesNikita Popov2019-03-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously zend_parse_parameters (and FastZPP) would handle invalid arguments depending on strict_types: With strict_types=1, a TypeError is thrown, with strict_types=0 a warning is thrown and (usually) NULL is returned. Additionally, some functions (constructors always and other methods sometimes) opt-it to throwing regardless of strict_types. This commit changes zpp to always generate a TypeError exception in PHP 8.
* | | | Refactor zend_object_handlers API to pass zend_object* and zend_string* ↵Dmitry Stogov2019-02-041-3/+3
|/ / / | | | | | | | | | insted of zval(s).
* | | Remove local variablesPeter Kokot2019-02-037-64/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* | | Use ZEND_THIS macro to hide implementation details in extensions code.Dmitry Stogov2018-11-151-1/+1
| | |
* | | Replace getThis() by EX(This), when additional check is not necessary.Dmitry Stogov2018-11-141-1/+1
| | |
* | | Require ICU ≥ 50.1Christoph M. Becker2018-09-152-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given that ICU is a set of lively developed libraries, that ICU 50.1 has been released on 2012-11-05, and PHP 7.4 is scheduled to be released seven years after it, we consider it appropriate to ditch these legacy versions. Particularly, that would be a reasonable groundwork to implement part two of the “Deprecate and remove INTL_IDNA_VARIANT_2003” RFC[1], namely to default idn_to_ascii()'s and idn_to_utf8()'s $variant parameter to INTL_IDNA_VARIANT_UTS46, which is not defined in ICU < 4.6. See also the related discussion on internals@[2]. [1] <https://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003> [2] <http://news.php.net/php.internals/101626>ff
* | | Get rid of ZEND_ACC_CTOR, ZEND_ACC_DTOR and ZEND_ACC_IMPLEMENTED_ABSTRACTDmitry Stogov2018-09-051-1/+1
|/ /
* | Merge branch 'PHP-7.2' into PHP-7.3Anatol Belski2018-08-091-0/+19
|\ \ | |/ | | | | | | * PHP-7.2: Fixed bug #74484 MessageFormatter::formatMessage memory corruption
| * Fixed bug #74484 MessageFormatter::formatMessage memory corruptionAnatol Belski2018-08-091-0/+19
| | | | | | | | with 11+ named placeholder
* | Removed "dead" code (zend_hash_update() never fails)Dmitry Stogov2018-06-011-16/+4
| |
* | Export standard object handlers, to avoid indirect accessDmitry Stogov2018-05-311-1/+1
| |
* | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-2/+2
| | | | | | | | where we sure about string persistence.
* | Use recommended options for explicit UnicodeString constructorsAnatol Belski2018-04-051-7/+9
| |
* | Simplify namespace accessAnatol Belski2018-04-011-7/+7
| | | | | | | | The icu namespace is an alias which resolves to the real namespace.
* | Utilize the recommended way to handle the icu namespaceAnatol Belski2018-03-311-0/+10
| |
* | Remove return types from some magic method in protosGabriel Caruso2018-03-091-1/+1
| | | | | | | | __construct, __destruct, __wakeup does not have return types defined.
* | Removed unused variablesGabriel Caruso2018-02-111-1/+0
| |
* | Avoid array duplication and in-place modificationDmitry Stogov2018-01-172-25/+15
| |
* | Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
| |
* | Cleanup type conversionDmitry Stogov2017-12-071-12/+1
| |
* | Add zend_object_alloc() APINikita Popov2017-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | Using ecalloc() to create objects is expensive, because the dynamic-size memset() is unreasonably slow. Make sure we only zero the main object structure with known size, as the properties are intialized separately anyway. Technically we do not need to zero the embedded zend_object structure either, but as long as the memset argument is constant, a couple more bytes don't really matter.
* | Refactored array creation API. array_init() and array_init_size() are ↵Dmitry Stogov2017-09-201-2/+1
| | | | | | | | converted into macros calling zend_new_array(). They are not functions anymore and don't return any values.