| 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.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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-7.4:
Split tests for compatibility with ICU 68.1
|
| | |
|
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Closes GH-6173
|
| |
| |
| |
| |
| | |
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
| |
| |
| |
| |
| |
| | |
Closes GH-6081
Co-Authored-By: Nikita Popov <nikic@php.net>
|
| |
| |
| |
| | |
Closes GH-5999
|
| |
| |
| |
| | |
Closes GH-5972
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Constructors must throw on failure indepdendent of the configured
intl error mode.
|
| |
| |
| |
| | |
Closes GH-5958
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Affects:
- IntlCalendar
- IntlGregorianCalendar
- IntlBreakIterator
Closes GH-5669
|
| |
| |
| |
| |
| | |
Give these conversative UNKNOWN defaults and no types, as the
overload is something of a mess.
|
| |
| |
| |
| | |
Closes GH-5590
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Closes GH-5327
|
| |
| |
| |
| | |
Closes GH-5211
|
| |
| |
| |
| | |
Closes GH-5092
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| | |
Closes GH-4812
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Relax test expectation
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
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.
|