1
0
mirror of https://github.com/php/php-src.git synced 2026-04-07 16:13:32 +02:00
Commit Graph

1452 Commits

Author SHA1 Message Date
Remi Collet
f5dc2c31d9 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11071: Revert "Fix [-Wundef] warning in INTL extension"
2023-04-18 11:04:54 +02:00
Remi Collet
31e21f7dbc Fix GH-11071: Revert "Fix [-Wundef] warning in INTL extension"
This reverts commit ea8686540a.
2023-04-18 11:04:28 +02: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
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
Máté Kocsis
e4f2376919 Improve string class constant code generation (#9577)
Using strlen() will make sure that non-constant values can also be used.
2022-09-26 23:12:34 +02:00
Bob Weinand
a01dd9feda Revert "Port all internally used classes to use default_object_handlers"
This reverts commit 94ee4f9834.

The commit was a bit too late to be included in PHP 8.2 RC1. Given it's a massive ABI break, we decide to postpone the change to PHP 8.3.
2022-09-14 11:13:23 +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
Bob Weinand
94ee4f9834 Port all internally used classes to use default_object_handlers
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2022-08-31 16:45:27 +02:00
Máté Kocsis
b4ec3e9bc0 Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
Máté Kocsis
66c4ade0fe Declare ext/intl constants in stubs - part 14 (#9387) 2022-08-22 13:20:26 +02:00
Máté Kocsis
f743cb0f69 Declare ext/intl constants in stubs - part 13 (#9385) 2022-08-21 13:12:38 +02: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
Máté Kocsis
aeabb51ae4 Declare ext/intl constants in stubs - part 9 (#9276) 2022-08-09 11:32:06 +02:00
Máté Kocsis
08748577c0 Declare ext/intl constants in stubs - part 8 (#9275) 2022-08-09 11:29:26 +02:00
Máté Kocsis
383eefa9e4 Declare ext/intl constants in stubs - part 11 (#9281) 2022-08-09 11:28:18 +02:00
Máté Kocsis
bc4c11ab14 Declare ext/intl constants in stubs - part 12 (#9282) 2022-08-09 11:27:41 +02:00
Máté Kocsis
559d5030a8 Declare ext/intl constants in stubs - part 10 (#9280) 2022-08-09 11:19:23 +02:00
Máté Kocsis
8fee9a3f11 Declare ext/intl constants in stubs - part 7 (#9269) 2022-08-08 14:24:22 +02:00
Máté Kocsis
d97f8eef33 Declare ext/intl constants in stubs - part 6 (#9268) 2022-08-08 14:21:48 +02:00
Máté Kocsis
614e9ec804 Declare ext/intl constants in stubs - part 5 (#9267) 2022-08-08 12:00:10 +02:00
Máté Kocsis
c1da9e7964 Declare ext/intl constants in stubs - part 4 (#9234) 2022-08-08 08:56:51 +02:00
Máté Kocsis
163a278a02 Declare ext/intl constants in stubs - part 3 (#9233) 2022-08-08 08:28:40 +02:00
Máté Kocsis
150456eaa2 Declare ext/intl constants in stubs - part 2 (#9219) 2022-08-02 16:55:12 +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
Máté Kocsis
0c225a2f57 Declare ext/intl constants in stubs - part 1 (#9205) 2022-07-30 18:11:20 +02:00
David Carlier
5e0b2e537d Merge branch 'PHP-8.0' into PHP-8.1 2022-07-08 17:39:05 +01:00
David Carlier
7c3dfbb845 intl extension, build fix for icu >= 69.x release. ubrk/ucnv_safeClone had been deprecated in favor of ubrk/ucnv_clone which does not use user provided stacks but remain thread safe. 2022-07-08 17:38:31 +01:00
David Carlier
b22d2bf589 intl extension, build fix for icu >= 71.x release.
ubrk/ucnv_safeClone had been deprecated in favor
of ubrk/ucnv_clone which does not use user provided stacks
but remain thread safe.
Closes #8930.
2022-07-06 18:12:19 +01:00
Ilija Tovilo
3b92a96610 Convert return type of various object handlers from int to zend_result (#8755) 2022-06-26 01:00:19 +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
David CARLIER
ec0331f499 intl ICU C++ code modernisation, making it closer to C++11 (#8650) 2022-06-20 13:07:28 +01: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
Christoph M. Becker
ea62b8089a Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8142: Compilation error on cygwin
2022-03-04 16:21:57 +01:00