Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.5.0beta1

- Core:
. Fixed bug GH-19305 (Operands may be being released during comparison).
(Arnaud)

- Intl:
. Fixed bug GH-19307 (PGO builds of shared ext-intl are broken). (cmb)

- Opcache:
. Fixed bug GH-19301 (opcache build failure). (Remi)

31 Jul 2025, PHP 8.5.0alpha3
31 Jul 2025, PHP 8.5.0alpha4

- Core:
. Add clone-with support to the clone() function. (timwolla, edorian)
. Fix support for non-userland stream notifiers. (timwolla)
. Added PHP_BUILD_PROVIDER constant. (timwolla)
. Fixed bug GH-19305 (Operands may be being released during comparison).
(Arnaud)

- Curl:
. Add support for CURLINFO_CONN_ID in curl_getinfo() (thecaliskan)
Expand All @@ -32,6 +25,7 @@ PHP NEWS

- Intl:
. Fix return value on failure for resourcebundle count handler. (Girgias)
. Fixed bug GH-19307 (PGO builds of shared ext-intl are broken). (cmb)

- OPcache:
. Disallow changing opcache.memory_consumption when SHM is already set up.
Expand All @@ -41,6 +35,7 @@ PHP NEWS
. Make OPcache non-optional (Arnaud, timwolla)
. Fixed bug GH-17422 (OPcache bypasses the user-defined error handler for
deprecations). (Arnaud, timwolla)
. Fixed bug GH-19301 (opcache build failure). (Remi)

- OpenSSL:
. Add $digest_algo parameter to openssl_public_encrypt() and
Expand Down
11 changes: 11 additions & 0 deletions Zend/tests/array_unpack/gh19303.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--TEST--
GH-19303 (Unpacking empty packed array into uninitialized array causes assertion failure)
--FILE--
<?php
$a = [0];
unset($a[0]);
var_dump([...$a]);
?>
--EXPECT--
array(0) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ enum Test {}

?>
--EXPECTF--
Fatal error: Cannot apply #[AllowDynamicProperties] to enum Test in %s on line %d
Fatal error: Cannot apply #[\AllowDynamicProperties] to enum Test in %s on line %d
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ interface Test {}

?>
--EXPECTF--
Fatal error: Cannot apply #[AllowDynamicProperties] to interface Test in %s on line %d
Fatal error: Cannot apply #[\AllowDynamicProperties] to interface Test in %s on line %d
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ trait Test {}

?>
--EXPECTF--
Fatal error: Cannot apply #[AllowDynamicProperties] to trait Test in %s on line %d
Fatal error: Cannot apply #[\AllowDynamicProperties] to trait Test in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/readonly_classes/gh10377_1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ $readonly_anon = new #[AllowDynamicProperties] readonly class {

?>
--EXPECTF--
Fatal error: Cannot apply #[AllowDynamicProperties] to readonly class class@anonymous in %s on line %d
Fatal error: Cannot apply #[\AllowDynamicProperties] to readonly class class@anonymous in %s on line %d
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ readonly class Foo

?>
--EXPECTF--
Fatal error: Cannot apply #[AllowDynamicProperties] to readonly class Foo in %s on line %d
Fatal error: Cannot apply #[\AllowDynamicProperties] to readonly class Foo in %s on line %d
8 changes: 4 additions & 4 deletions Zend/zend_attributes.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,22 @@ static void validate_allow_dynamic_properties(
zend_attribute *attr, uint32_t target, zend_class_entry *scope)
{
if (scope->ce_flags & ZEND_ACC_TRAIT) {
zend_error_noreturn(E_ERROR, "Cannot apply #[AllowDynamicProperties] to trait %s",
zend_error_noreturn(E_ERROR, "Cannot apply #[\\AllowDynamicProperties] to trait %s",
ZSTR_VAL(scope->name)
);
}
if (scope->ce_flags & ZEND_ACC_INTERFACE) {
zend_error_noreturn(E_ERROR, "Cannot apply #[AllowDynamicProperties] to interface %s",
zend_error_noreturn(E_ERROR, "Cannot apply #[\\AllowDynamicProperties] to interface %s",
ZSTR_VAL(scope->name)
);
}
if (scope->ce_flags & ZEND_ACC_READONLY_CLASS) {
zend_error_noreturn(E_ERROR, "Cannot apply #[AllowDynamicProperties] to readonly class %s",
zend_error_noreturn(E_ERROR, "Cannot apply #[\\AllowDynamicProperties] to readonly class %s",
ZSTR_VAL(scope->name)
);
}
if (scope->ce_flags & ZEND_ACC_ENUM) {
zend_error_noreturn(E_ERROR, "Cannot apply #[AllowDynamicProperties] to enum %s",
zend_error_noreturn(E_ERROR, "Cannot apply #[\\AllowDynamicProperties] to enum %s",
ZSTR_VAL(scope->name)
);
}
Expand Down
27 changes: 16 additions & 11 deletions Zend/zend_vm_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -6325,17 +6325,22 @@ ZEND_VM_C_LABEL(add_unpack_again):
zval *val;

if (HT_IS_PACKED(ht) && (zend_hash_num_elements(result_ht) == 0 || HT_IS_PACKED(result_ht))) {
zend_hash_extend(result_ht, result_ht->nNumUsed + zend_hash_num_elements(ht), 1);
ZEND_HASH_FILL_PACKED(result_ht) {
ZEND_HASH_PACKED_FOREACH_VAL(ht, val) {
if (UNEXPECTED(Z_ISREF_P(val)) &&
UNEXPECTED(Z_REFCOUNT_P(val) == 1)) {
val = Z_REFVAL_P(val);
}
Z_TRY_ADDREF_P(val);
ZEND_HASH_FILL_ADD(val);
} ZEND_HASH_FOREACH_END();
} ZEND_HASH_FILL_END();
/* zend_hash_extend() skips initialization when the number of elements is 0,
* but the code below expects that result_ht is initialized as packed.
* We can just skip the work in that case. */
if (result_ht->nNumUsed + zend_hash_num_elements(ht) > 0) {
zend_hash_extend(result_ht, result_ht->nNumUsed + zend_hash_num_elements(ht), 1);
ZEND_HASH_FILL_PACKED(result_ht) {
ZEND_HASH_PACKED_FOREACH_VAL(ht, val) {
if (UNEXPECTED(Z_ISREF_P(val)) &&
UNEXPECTED(Z_REFCOUNT_P(val) == 1)) {
val = Z_REFVAL_P(val);
}
Z_TRY_ADDREF_P(val);
ZEND_HASH_FILL_ADD(val);
} ZEND_HASH_FOREACH_END();
} ZEND_HASH_FILL_END();
}
} else {
zend_string *key;

Expand Down
27 changes: 16 additions & 11 deletions Zend/zend_vm_execute.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 27 additions & 15 deletions docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -878,25 +878,37 @@ If you choose to create a patch-level release, follow these steps:
mailinglist.


## Feature freeze
## Soft feature freeze

A major/minor version [feature freeze][] occurs with the first beta release.
Specifically, it occurs when the first beta release is packaged, which means the
feature freeze occurs two days before the first beta release.
A major/minor version soft feature freeze occurs with the first beta release.
This is a soft feature freeze because features can still be merged with RM
approval.

The feature freeze for `php-src` means that we will not accept any new features
after the date of the feature freeze. For any RFCs to be included in the new
version, they should be discussed and have the voting polls closed no later than
the feature freeze date. However, this does not mean the new feature must have a
complete implementation by this date.

Following the feature freeze, the focus of work for the new version will be on
fixing bugs, writing tests, and completing/polishing all accepted features.
For any RFCs to be included in the new release, they should be discussed and
have their voting polls closed no later than when the first beta is released.
However, this does not mean the new feature must have a complete implementation
by this date. Such implementation can be merged only with RM approval and must
be done before the hard feature freeze.

As a courtesy to the community, the release managers should remind others about
the upcoming feature freeze by posting reminders to [email protected] at
4-weeks, 3-weeks, 2-weeks, and 1-week prior to the feature freeze. This is a
recommendation and the intervals may vary based on work load.
the upcoming soft feature freeze by posting reminders to
[email protected] at 5 weeks, 4 weeks, 3 weeks, 2 weeks, and 1 week prior
to this feature freeze. This is a recommendation and the intervals may vary
based on workload. The reminder should also contain a note with dates for
the last allowed RFC to start voting.

## Hard feature freeze

A major/minor version hard [feature freeze][] occurs with the first RC release.
Specifically, it occurs when the first RC release is packaged, which means the
hard feature freeze occurs two days before the first RC release.

The hard feature freeze for php-src means that we will not accept any new
features after the date of the hard feature freeze.

Following the hard feature freeze, the focus of work for the new version will
be on fixing bugs, writing tests, and preparing documentation for all accepted
features.


## Forking a new version branch
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/file/bug81145.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ if (PHP_OS_FAMILY !== "Windows") {
$src = __DIR__ . "/bug81145_src.bin";
define('SIZE_4G', 0x100000000);
exec("fallocate -l " . (SIZE_4G-0x100) . " " . escapeshellarg($src), $output, $status);
if ($status !== 0) die("skip fallocate() not supported");
@unlink(__DIR__ . "/bug81145_src.bin");
if ($status !== 0) die("skip fallocate() not supported");
}
?>
--CONFLICTS--
Expand Down