| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* PHP-8.0:
Fix #80763: msgfmt_format() does not accept DateTime references
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.4:
Fix #80763: msgfmt_format() does not accept DateTime references
|
| | |
| | |
| | |
| | |
| | |
| | | |
`intl_zval_to_millis()` needs to cater to references.
Closes GH-6707.
|
| | | |
|
| | |
| | |
| | |
| | | |
Related to GH-6701
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a read-only property for which Transliterator internally
assigns a string value.
Also clean up the code handling this property a bit.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This deprecates passing null to non-nullable scale arguments of
internal functions, with the eventual goal of making the behavior
consistent with userland functions, where null is never accepted
for non-nullable arguments.
This change is expected to cause quite a lot of fallout. In most
cases, calling code should be adjusted to avoid passing null. In
some cases, PHP should be adjusted to make some function arguments
nullable. I have already fixed a number of functions before landing
this, but feel free to file a bug if you encounter a function that
doesn't accept null, but probably should. (The rule of thumb for
this to be applicable is that the function must have special behavior
for 0 or "", which is distinct from the natural behavior of the
parameter.)
RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
Closes GH-6475.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
* PHP-8.0:
Use E_ERROR to report arginfo/zpp mismatch
Make NumberFormatter ctor $pattern nullable
Make IntlDateFormatter 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
|
| | |
| | |
| | |
| | |
| | | |
The implementation already made this argument nullable, but it
was not reflected in the stub.
|
| | |
| | |
| | |
| | | |
Closes GH-6670
|
| | |
| | |
| | |
| | |
| | |
| | | |
enabled
Closes GH-6675
|
| | |
| | |
| | |
| | |
| | |
| | | |
Closes GH-6289
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fixed bug #80644: ResourceBundle::get() doesn't reset error state
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
* PHP-8.0:
Sync datefmt_get_calendar_object signature
Sync intlcal_create_instance() and IntlCalendar::createInstance()
Sync date_diff and DateTime::diff return type
|
| | |
| | |
| | |
| | |
| | | |
In this case, it's only a matter of using the same type order
in both cases.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Historically, the _ex variants separated the zval first, if a
conversion was necessary. This distinction no longer makes sense
since PHP 7.
The only difference that was still left is that _ex checked whether
the type is the same first, but the usage of these macros did not
actually distinguish on whether such an inlined check is valuable
or not in a given context.
Also drop the unused convert_to_explicit_type macros.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fixed bug #80425
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
And drop the U_DEFINE_TRUE_AND_FALSE flag.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Split tests for compatibility with ICU 68.1
|
| | |
|
| |
| |
| |
| | |
Closes GH-6335
|
| |
| |
| |
| |
| |
| |
| | |
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...
|
| |
| |
| |
| | |
Closes GH-6309
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
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.
|
| |
| |
| |
| | |
Cherry-picked from c915c601710e2a44e6c7f89fcb12b8047c968108.
|
| | |
|
| |
| |
| |
| | |
For strrpos with positive out of bounds offsets was not detected.
|
| |
| |
| |
| |
| |
| |
| | |
For consistency with str* and mb_str* functions.
Closes GH-6245.
Closes php/php-tasks#20.
|
| | |
|
| |
| |
| |
| | |
Closes GH-6197
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
An offset equal to the string length is not out of bounds.
|
| |
| |
| |
| | |
It is used only once with allow_errors enabled
|
| |
| |
| |
| |
| |
| | |
Support for this was removed in PHP 7.0.
See: https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings
|
| |
| |
| |
| | |
Closes GH-6173
|
| |
| |
| |
| |
| | |
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
Closes GH-6081
Co-Authored-By: Nikita Popov <nikic@php.net>
|
| |
| |
| |
| |
| |
| |
| | |
They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.
Closes GH-6112
|
| |
| |
| |
| | |
Closes GH-5999
|
| |
| |
| |
| | |
Closes GH-5972
|
| |
| |
| |
| | |
We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068
|