summaryrefslogtreecommitdiff
path: root/ext/intl/calendar
Commit message (Collapse)AuthorAgeFilesLines
* Improve class entry generationMáté Kocsis2021-02-161-3/+2
| | | | Related to GH-6701
* Generate ext/intl class entries from stubsMáté Kocsis2021-02-093-10/+26
| | | | Closes GH-6670
* Merge branch 'PHP-8.0'Nikita Popov2021-01-182-2/+2
|\ | | | | | | | | | | | | * PHP-8.0: Sync datefmt_get_calendar_object signature Sync intlcal_create_instance() and IntlCalendar::createInstance() Sync date_diff and DateTime::diff return type
| * 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.
* | Replace zend_bool uses with boolNikita Popov2021-01-152-5/+5
|/ | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Verify parameter names of function aliasesMáté Kocsis2020-10-162-4/+4
| | | | Closes GH-6335
* Improve parameter names in ext/intlMáté Kocsis2020-10-122-43/+41
| | | | Closes GH-6309
* Declare array|int and object-of-class|int types in stubsMáté Kocsis2020-09-142-5/+4
| | | | | | Closes GH-6081 Co-Authored-By: Nikita Popov <nikic@php.net>
* Consolidate new union type ZPP macro namesMáté Kocsis2020-09-111-1/+1
| | | | | | | They will now follow the canonical order of types. Older macros are left intact due to maintaining BC. Closes GH-6112
* Add more precise type info for stubsMáté Kocsis2020-09-013-25/+21
| | | | Closes GH-6005
* Prevent double-construction of IntlGregorianCalendarNikita Popov2020-08-261-2/+7
|
* Fixed bug #79946Nikita Popov2020-08-101-1/+0
| | | | | | | | | | 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 another round of missing parameter types to stubsMáté Kocsis2020-08-072-3/+11
| | | | Closes GH-5950
* Warning to ValueError promotion in Intl extension Part 1George Peter Banyard2020-07-314-148/+86
| | | | | | | | | Affects: - IntlCalendar - IntlGregorianCalendar - IntlBreakIterator Closes GH-5669
* Fix IntlGregorianCalendar constructor signatureNikita Popov2020-07-172-3/+10
| | | | | Give these conversative UNKNOWN defaults and no types, as the overload is something of a mess.
* 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.
* Add zend_call_known_function() API familyNikita Popov2020-06-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix some UNKNOWN default valuesMáté Kocsis2020-06-091-4/+3
| | | | In ext/ffi, ext/intl, ext/mysqli, and ext/pcntl
* Add tests to check mismatching function signaturesMáté Kocsis2020-06-061-34/+17
| | | | Closes GH-5666
* Fix weird zend_bool usage in Intl Calendar::roll() methodGeorge Peter Banyard2020-06-041-11/+5
| | | | This code really needs to be review as it's convoluted for no good reason.
* Generate method entries for ext/intlMáté Kocsis2020-04-145-265/+295
| | | | Closes GH-5370
* Store default parameter values of internal functions in arg infoMáté Kocsis2020-04-081-5/+5
| | | | | | | 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>
* Do not include the same stub multiple timesMáté Kocsis2020-04-032-303/+0
| | | | Closes GH-5322
* Revert "Replace @param annotations with type declarations"Christoph M. Becker2020-02-172-4/+6
| | | | This reverts commit c31029f335ca1b453af799805c43c37e959ad555.
* Replace @param annotations with type declarationsChristoph M. Becker2020-02-162-6/+4
|
* Add stubs for IntlCalendarMáté Kocsis2020-02-045-158/+688
| | | | Closes GH-4846
* Fix ZPP of intl_cal_set()Máté Kocsis2020-02-041-39/+24
|
* Throw exception for unconstructed intl objectsMáté Kocsis2020-01-051-2/+2
| | | | Closes GH-5052
* Use RETURN_THROWS() after zend_parse_method_parameters()Máté Kocsis2020-01-022-38/+38
|
* Use RETURN_THROWS() during ZPP in most of the extensionsMáté Kocsis2019-12-312-7/+7
| | | | Except for some bigger ones: reflection, sodium, spl
* Cleanup return values for Intl when parameter parsing is unsuccessfulMáté Kocsis2019-10-302-44/+44
| | | | Closes GH-4871.
* Use ArgumentCountError in IntlGregorianCalendar ctorNikita Popov2019-10-301-21/+3
|
* Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-256-12/+0
| | | | Closes GH-4732.
* Intl: Don't separately report "bad arguments" errorsNikita Popov2019-03-112-92/+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-3/+2
| | | | | | | | | | | 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-042-10/+10
| | | | insted of zval(s).
* Use ZEND_THIS macro to hide implementation details in extensions code.Dmitry Stogov2018-11-151-1/+1
|
* Eliminate useless $this related checkDmitry Stogov2018-11-141-8/+12
|
* Replace getThis() by EX(This), when additional check is not necessary.Dmitry Stogov2018-11-141-1/+1
|
* Require ICU ≥ 50.1Christoph M. Becker2018-09-153-31/+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
* Use zval_ptr_dtor() instead of zval_dtor() in internal functions that ↵Dmitry Stogov2018-07-051-9/+9
| | | | destroy new created object (This is safer and produces less code)
* Avoid magic method hash lookupsDmitry Stogov2018-07-021-2/+2
|
* Export standard object handlers, to avoid indirect accessDmitry Stogov2018-05-311-1/+1
|
* Simplify namespace accessAnatol Belski2018-04-014-8/+8
| | | | The icu namespace is an alias which resolves to the real namespace.
* Utilize the recommended way to handle the icu namespaceAnatol Belski2018-03-314-0/+14
|
* Use explicit for more type safetyAnatol Belski2018-02-151-1/+1
|
* Remove trailing whitespace in C++ filesGabriel Caruso2018-01-061-9/+9
| | | | [ci skip]
* fix build of intl/calendarNuno Lopes2017-12-031-0/+3
|
* Enable and fix printf() format warningsNikita Popov2017-11-161-1/+1
| | | | | | Add _unchecked() variants of zend_spprintf and zend_strpprintf for cases where we specifically want to disable these checks, such as use of %H.
* 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.