Commit graph

739 commits

Author SHA1 Message Date
Ilija Tovilo
8ec5a10916
[skip ci] XFAIL intl IntlCalendar::clear() test that may fail with ICU 73 2023-06-25 13:27:38 +02:00
David Carlier
45677081fa ext/intl: dateformatter settimezone changes on success, returning true like setcalendar.
Closes GH-10790
2023-03-09 21:45:26 +00:00
David Carlier
1eb14ee291 Merge branch 'PHP-8.2' 2023-02-21 21:03:51 +00:00
David Carlier
bb16c2e90f Merge branch 'PHP-8.1' into PHP-8.2 2023-02-21 21:03:28 +00:00
NathanFreeman
0a466e7ad8 Fix GH-10647: Spoofchecker isSuspicious/areConfusable methods
error code's argument.

Closes GH-10653.
2023-02-21 21:00:49 +00:00
Derick Rethans
b7860cd564 Implement More Appropriate Date/Time Exceptions RFC 2023-02-08 10:27:33 +00:00
Christoph M. Becker
435dc5ef1c
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Adapt ext/intl tests for ICU 72.1
2023-01-09 14:09:43 +01:00
Christoph M. Becker
a9e7b90cc2
Adapt ext/intl tests for ICU 72.1
This version replaces SPACEs before the meridian with NARROW NO-BREAK
SPACEs.  Thus, we split the affected test cases as usual.

(cherry picked from commit 8dd51b462d)

Fixes GH-10262.
2023-01-09 14:08:40 +01:00
David Carlier
3fb7198034 intl extension, follow up on #10006 for numfmt_set_pattern
Closes GH-10073.
2022-12-12 19:54:13 +00:00
David Carlier
6422cf6f1a intl extension: msgfmt_set_pattern add pattern format error informations. 2022-12-09 17:10:51 +00:00
Christoph M. Becker
8dd51b462d
Adapt ext/intl tests for ICU 72.1
This version replaces SPACEs before the meridian with NARROW NO-BREAK
SPACEs.  Thus, we split the affected test cases as usual.

Fixes GH-9799.
Closes GH-9800.
2022-10-22 10:31:50 +02:00
George Peter Banyard
bacbfb81ab Merge branch 'PHP-8.1' into PHP-8.2 2022-09-13 12:50:38 +01:00
George Peter Banyard
71e198be25 Merge branch 'PHP-8.0' into PHP-8.1 2022-09-13 12:45:42 +01:00
George Peter Banyard
47500f3300 Fix GH-9421 Incorrect argument number for ValueError in NumberFormatter
Closes GH-9489
2022-09-13 12:42:58 +01:00
Christoph M. Becker
ac9cbb7174
Merge branch 'PHP-8.1'
* PHP-8.1:
  Correct IntlDateFormatter::formatObject params
2022-08-15 18:10:54 +02:00
Christoph M. Becker
306da80f56
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Correct IntlDateFormatter::formatObject params
2022-08-15 17:58:52 +02:00
Gert de Pagter
05ed47ef12
Correct IntlDateFormatter::formatObject params
Closes GH-9341.
2022-08-15 17:56:34 +02:00
Nicolas Grekas
dd9f47758e
Declare Transliterator::$id as readonly to unlock subclassing it
Closes GH-9167.
2022-08-01 10:46:57 +02:00
Ilija Tovilo
44cd74b624
Fix lineno in backtrace of multi-line function calls
Closes GH-8810
Closes GH-8818
2022-06-23 16:10:32 +02:00
Derick Rethans
6770158d47 Only warn when an incorrect timezone is set through 'date.timezone' 2022-06-02 09:24:13 +01:00
Derick Rethans
e0d21297fe Update wording of warning message, and reinstate 'UTC' fallback for ctor 2022-06-02 09:24:13 +01:00
Derick Rethans
e59bb88b7f Merge branch 'PHP-8.1' 2022-05-27 14:29:03 +01:00
Derick Rethans
4f32983fbe Merge branch 'PHP-8.0' into PHP-8.1 2022-05-27 14:27:29 +01:00
Derick Rethans
63a31f3377 Remove trailing whitespace from test 2022-05-27 10:55:40 +01:00
Derick Rethans
8d6a828192 Mark test as XFAIL due to wrong assumptions 2022-05-27 10:55:30 +01:00
Christoph M. Becker
19273ffe74
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8364: msgfmt_format $values may not support references
2022-04-24 12:46:07 +02:00
Christoph M. Becker
1c0dc2a6c9
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8364: msgfmt_format $values may not support references
2022-04-24 12:45:22 +02:00
Christoph M. Becker
f5d9e7c031
Fix GH-8364: msgfmt_format $values may not support references
We need to deref any references passed in the `$values` array.  While
we could handle this in the type switch, doing it right away in the
foreach loop makes that more explicit, and also circumvents the missing
range checks for integers which are not passed as int or double.

Closes GH-8407.
2022-04-24 12:43:08 +02:00
Marco Pivetta
25cb9cdb79
Fix GH-8232 - always reference classes in var_export() via their FQCN
Closes GH-8233

This fix corrects a behavior of `var_export()` that was mostly "hidden" until PHP 8.1 introduced:

* properties with object initializers
* constants containing object references
* default values of class properties containing `enum`s

Since `var_export(..., true)` is mostly used in conjunction with code generation,
and we cannot make assumptions about the generated code being placed in the root
namespace, we must always provide the FQCN of a class in exported code.

For example:

```php
<?php

namespace MyNamespace { class Foo {} }

namespace { echo "<?php\n\nnamespace Example;\n\n" . var_export(new \MyNamespace\Foo(), true) . ';'; }
```

produces:

```php
<?php

namespace Example;

MyNamespace\Foo::__set_state(array(
));
```

This code snippet is invalid, because `Example\MyNamespace\Foo::__set_state()` (which
does not exist) is called.

With this patch applied, the code looks like following (valid):

```php
<?php

namespace Example;

\MyNamespace\Foo::__set_state(array(
));
```

Ref: https://github.com/php/php-src/issues/8232
Ref: https://github.com/Ocramius/ProxyManager/issues/754
Ref: https://externals.io/message/117466
2022-04-23 11:06:21 +02:00
Ilija Tovilo
20fe5e4162
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix IntlPartsIterator key off-by-one error
2022-03-25 13:13:26 +01:00
Ilija Tovilo
e706d024b2
Fix IntlPartsIterator key off-by-one error
Closes GH-7734
Closes GH-8172
2022-03-25 13:10:55 +01:00
Ilija Tovilo
51f750ea46
Merge branch 'PHP-8.1'
* PHP-8.1:
  Allowing catching arg type deprecations in intl classes
2022-03-03 11:27:46 +01:00
Ilija Tovilo
925a30979c
Allowing catching arg type deprecations in intl classes
Closes GH-8115
Closes GH-8117
2022-03-03 11:26:35 +01:00
Nikita Popov
d0a3cc146d Fix intl test on travis
Presumably the output is ICU version dependent.
2021-11-25 09:45:51 +01:00
Ben Ramsey
07fcf5e2d6
intl: Update grandfathered and redundant language tags
Closes GH-7641.
2021-11-12 13:43:17 -06:00
Nikita Popov
713e22ff8b Merge branch 'PHP-8.1'
* PHP-8.1:
  CLDR 40a0 uses a lowercase "temp" instead of "Temp" in ICU >= 70.1
  Accommodate changes to canonicalized forms in ICU >= 70.1
  Change UBool to bool for equality operators in ICU >= 70.1
2021-11-02 16:18:00 +01:00
Nikita Popov
2654c3449f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  CLDR 40a0 uses a lowercase "temp" instead of "Temp" in ICU >= 70.1
  Accommodate changes to canonicalized forms in ICU >= 70.1
  Change UBool to bool for equality operators in ICU >= 70.1
2021-11-02 16:17:16 +01:00
Nikita Popov
a6d14f1143 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  CLDR 40a0 uses a lowercase "temp" instead of "Temp" in ICU >= 70.1
  Accommodate changes to canonicalized forms in ICU >= 70.1
  Change UBool to bool for equality operators in ICU >= 70.1
2021-11-02 16:15:25 +01:00
Ben Ramsey
c7a2441e93 CLDR 40a0 uses a lowercase "temp" instead of "Temp" in ICU >= 70.1
Refer to:
49dda34fb1
2021-11-02 16:15:19 +01:00
Ben Ramsey
52cda6fc43 Accommodate changes to canonicalized forms in ICU >= 70.1
Refer to:
01e1adc9e4
2021-11-02 16:11:29 +01:00
Nikita Popov
0eb5c1a018 Update test expectation
The new output is correct, though the fix here was rather accidental.
We still need a proper fix for bug #78308 on earlier branches, but
for now update the test to make the build green again.
2021-09-24 16:02:43 +02:00
Joe Watkins
05ef6334cd
Fix bug #81303 improve match errors 2021-08-02 17:31:26 +02:00
Nikita Popov
1c50784ae7 Deprecate IntlCalendar::roll() with bool argument
Pass 1 instead of true and -1 instead of false.

Part of https://wiki.php.net/rfc/deprecations_php_8_1.
2021-07-08 15:34:51 +02:00
Máté Kocsis
65b96397b3
Declare tentative return types for ext/intl (#6986) 2021-07-06 10:55:43 +02:00
Christoph M. Becker
097cae9d90
Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #74264: grapheme_strrpos() broken for negative offsets
2021-07-05 18:21:29 +02:00
Christoph M. Becker
8071bd2faf
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #74264: grapheme_strrpos() broken for negative offsets
2021-07-05 18:15:24 +02:00
Christoph M. Becker
28c9376306
Fix #74264: grapheme_strrpos() broken for negative offsets
We must not assume that `usearch_last()` gives the proper result for
negative offsets.  Instead we'd need to continue to search backwards
(`usearch_previous`) until we find a proper match.  However, apparently
searching backwards is broken, so we work around by searching forward
from the start of the string until we pass the `offset_pos`, and then
use the previous result.

Closes GH-7189.
2021-07-05 18:11:30 +02:00
Patrick Allaert
ac18dd0dc7 Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
Christoph M. Becker
1ae34385e1
Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #68471: IntlDateFormatter fails for "GMT+00:00" timezone
2021-06-28 13:57:31 +02:00
Christoph M. Becker
1bf2b04b26
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #68471: IntlDateFormatter fails for "GMT+00:00" timezone
2021-06-28 13:55:56 +02:00