Skip to content

Commit 9cfc440

Browse files
authored
Merge branch 'master' into opcache-memory-after-shm-setup
2 parents 7b38cd0 + 7c1e461 commit 9cfc440

File tree

79 files changed

+1514
-556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1514
-556
lines changed

.github/actions/freebsd/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ runs:
99
- name: FreeBSD
1010
uses: vmactions/freebsd-vm@v1
1111
with:
12-
release: '13.3'
12+
release: '13.5'
1313
usesh: true
1414
copyback: false
1515
# Temporarily disable sqlite, as FreeBSD ships it with disabled double quotes. We'll need to fix our tests.

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ jobs:
198198
fail-fast: false
199199
matrix:
200200
include:
201-
- os: 14
201+
- os: 15
202202
arch: ARM64
203203
name: MACOS_${{ matrix.arch }}_DEBUG_NTS
204204
runs-on: macos-${{ matrix.os }}

NEWS

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ PHP NEWS
1515
. Disallow changing opcache.memory_consumption when SHM is already set up.
1616
(timwolla)
1717

18+
- OpenSSL:
19+
. Add $digest_algo parameter to openssl_public_encrypt() and
20+
openssl_private_decrypt() functions. (Jakub Zelenka)
21+
22+
- Reflection:
23+
. Fixed bug GH-19187 (ReflectionNamedType::getName() prints nullable type when
24+
retrieved from ReflectionProperty::getSettableType()). (ilutov)
25+
26+
- Session:
27+
. Fixed GH-19197: build broken with ZEND_STRL usage with memcpy
28+
when implemented as macro. (David Carlier)
29+
30+
- Soap:
31+
. Fixed bug GH-19226 (Segfault when spawning new thread in soap extension).
32+
(Florian Engelhardt)
33+
1834
- Sockets:
1935
. socket_set_option for multicast context throws a ValueError
2036
when the socket family is not of AF_INET/AF_INET6 family. (David Carlier)
@@ -23,6 +39,8 @@ PHP NEWS
2339
. Add HEIF/HEIC support to getimagesize. (Benstone Zhang)
2440
. Implement #71517 (Implement SVG support for getimagesize() and friends).
2541
(nielsdos)
42+
. Optimized PHP html_entity_decode function. (Artem Ukrainskiy)
43+
. Minor optimization to array_chunk(). (nielsdos)
2644

2745
- URI:
2846
. Empty host handling is fixed. (Máté Kocsis)
@@ -249,6 +267,7 @@ PHP NEWS
249267
zval for uninitialized typed properties). (nielsdos)
250268
. Fixed bug GH-15766 (ReflectionClass::toString() should have better output
251269
for enums). (DanielEScherzer)
270+
. Added ReflectionProperty::getMangledName() method. (alexandre-daubois)
252271

253272
- Session:
254273
. session_start() throws a ValueError on option argument if not a hashmap

UPGRADING

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ PHP 8.5 UPGRADE NOTES
327327
- libxml:
328328
. libxml_set_external_entity_loader() now has a formal return type of true.
329329

330+
- OpenSSL:
331+
. openssl_public_encrypt() and openssl_private_decrypt() have new parameter
332+
$digest_algo that allows specifying hash digest algorith for OEAP padding.
333+
330334
- PCNTL:
331335
. pcntl_exec() now has a formal return type of false.
332336
. pcntl_waitid() takes an additional resource_usage argument to
@@ -381,7 +385,7 @@ PHP 8.5 UPGRADE NOTES
381385
- Sockets:
382386
. socket_create_listen, socket_bind and socket_sendto throw a
383387
ValueError if the port is lower than 0 or greater than 65535,
384-
also if any of the hints array entry is indexes numerically.
388+
and also if any of the hints array entries are indexed numerically.
385389
. socket_addrinfo_lookup throws a TypeError if any of the hints
386390
values cannot be cast to int and can throw a ValueError if
387391
any of these values overflow.
@@ -421,6 +425,7 @@ PHP 8.5 UPGRADE NOTES
421425
. The clone language construct is now a function and supports reassigning
422426
(readonly) properties during cloning via the new $withProperties parameter.
423427
RFC: https://wiki.php.net/rfc/clone_with_v2
428+
. Added Closure::getCurrent() to receive currently executing closure.
424429

425430
- Curl:
426431
. curl_multi_get_handles() allows retrieving all CurlHandles current
@@ -466,6 +471,7 @@ PHP 8.5 UPGRADE NOTES
466471
ReflectionConstant::getExtensionName() were introduced.
467472
. ReflectionConstant::getAttributes() was introduced.
468473
RFC: https://wiki.php.net/rfc/attributes-on-constants
474+
. ReflectionProperty::getMangledName() was introduced.
469475

470476
- Sqlite:
471477
. Sqlite3Stmt::busy to check if a statement had been fetched
@@ -505,7 +511,7 @@ PHP 8.5 UPGRADE NOTES
505511
CURLFOLLOW_FIRSTONLY.
506512

507513
- Fileinfo:
508-
. Upgraded to file 5.46.
514+
. Upgraded file from 5.45 to 5.46.
509515
. The return type of finfo_close() has been changed to true, rather
510516
than bool.
511517

@@ -520,7 +526,7 @@ PHP 8.5 UPGRADE NOTES
520526
RFC: https://wiki.php.net/rfc/url_parsing_api
521527

522528
- PCRE:
523-
. Upgraded to pcre2lib from 10.44 to 10.45.
529+
. Upgraded pcre2lib from 10.44 to 10.45.
524530

525531
- PDO_Sqlite:
526532
. Increased minimum release version support from 3.7.7 to 3.7.17.
@@ -699,6 +705,7 @@ PHP 8.5 UPGRADE NOTES
699705
. Improved unpack() performance with nameless repetitions by avoiding
700706
creating temporary strings and reparsing them.
701707
. Improved pack() performance.
708+
. Minor improvements in array_chunk() performance.
702709

703710
- XMLReader:
704711
. Improved property access performance.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
GH-19044: Protected properties must be scoped according to their prototype (protected(set) on non-hooked property)
3+
--FILE--
4+
<?php
5+
6+
class P {
7+
public mixed $foo { get => 42; }
8+
}
9+
10+
class C1 extends P {
11+
public protected(set) mixed $foo = 1;
12+
}
13+
14+
class C2 extends P {
15+
public protected(set) mixed $foo;
16+
17+
static function foo($c) { return $c->foo += 1; }
18+
}
19+
20+
var_dump(C2::foo(new C1));
21+
22+
?>
23+
--EXPECT--
24+
int(43)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
--TEST--
2+
Closure::getCurrent()
3+
--FILE--
4+
<?php
5+
6+
$i = 1;
7+
8+
$c = function ($p) use (&$i) {
9+
$self = Closure::getCurrent();
10+
var_dump($p, $i);
11+
$i++;
12+
if ($p < 10) {
13+
$self($p + 1);
14+
}
15+
};
16+
17+
$c(1);
18+
var_dump($i);
19+
20+
function fail() {
21+
Closure::getCurrent();
22+
}
23+
24+
try {
25+
fail();
26+
} catch (Error $e) {
27+
echo $e->getMessage(), "\n";
28+
}
29+
30+
function foo() {
31+
var_dump(Closure::getCurrent());
32+
}
33+
34+
try {
35+
foo(...)();
36+
} catch (Error $e) {
37+
echo $e->getMessage(), "\n";
38+
}
39+
40+
?>
41+
--EXPECT--
42+
int(1)
43+
int(1)
44+
int(2)
45+
int(2)
46+
int(3)
47+
int(3)
48+
int(4)
49+
int(4)
50+
int(5)
51+
int(5)
52+
int(6)
53+
int(6)
54+
int(7)
55+
int(7)
56+
int(8)
57+
int(8)
58+
int(9)
59+
int(9)
60+
int(10)
61+
int(10)
62+
int(11)
63+
Current function is not a closure
64+
Current function is not a closure

Zend/tests/gh18581.phpt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--TEST--
2+
GH-18581: Coerce numeric string keys from iterators when argument unpacking
3+
--FILE--
4+
<?php
5+
6+
function g() {
7+
yield '100' => 'first';
8+
yield '101' => 'second';
9+
yield '102' => 'third';
10+
yield 'named' => 'fourth';
11+
}
12+
13+
function test($x = null, $y = null, ...$z) {
14+
var_dump($x, $y, $z);
15+
var_dump($z[0]);
16+
var_dump($z['named']);
17+
}
18+
19+
test(...g());
20+
21+
?>
22+
--EXPECT--
23+
string(5) "first"
24+
string(6) "second"
25+
array(2) {
26+
[0]=>
27+
string(5) "third"
28+
["named"]=>
29+
string(6) "fourth"
30+
}
31+
string(5) "third"
32+
string(6) "fourth"

Zend/tests/gh19044.phpt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--TEST--
2+
GH-19044: Protected properties must be scoped according to their prototype
3+
--FILE--
4+
<?php
5+
6+
abstract class P {
7+
protected $foo;
8+
}
9+
10+
class C1 extends P {
11+
protected $foo = 1;
12+
}
13+
14+
class C2 extends P {
15+
protected $foo = 2;
16+
17+
static function foo($c) { return $c->foo; }
18+
}
19+
20+
var_dump(C2::foo(new C2));
21+
var_dump(C2::foo(new C1));
22+
23+
?>
24+
--EXPECT--
25+
int(2)
26+
int(1)

Zend/tests/gh19053.phpt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--TEST--
2+
GH-19053: Incorrect properties_info_table for abstract properties
3+
--FILE--
4+
<?php
5+
6+
abstract class GP {
7+
public abstract mixed $foo { get; }
8+
}
9+
10+
class P extends GP {
11+
public mixed $foo = 1;
12+
}
13+
14+
class C extends P {
15+
public mixed $foo { get => 2; }
16+
}
17+
18+
$c = new C;
19+
var_dump($c);
20+
21+
?>
22+
--EXPECTF--
23+
object(C)#%d (0) {
24+
["foo"]=>
25+
uninitialized(mixed)
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--TEST--
2+
GH-19044: Protected properties must be scoped according to their prototype (common ancestor has a protected setter)
3+
--FILE--
4+
<?php
5+
6+
abstract class P {
7+
abstract public mixed $foo { get; }
8+
}
9+
10+
class C1 extends P {
11+
public protected(set) mixed $foo { get => 1; set {} }
12+
}
13+
14+
class GrandC1 extends C1 {
15+
public protected(set) mixed $foo { get => 2; set {} }
16+
}
17+
18+
class C2 extends C1 {
19+
static function foo($c) { return $c->foo += 1; }
20+
}
21+
22+
var_dump(C2::foo(new GrandC1));
23+
24+
?>
25+
--EXPECT--
26+
int(3)

0 commit comments

Comments
 (0)