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
39 changes: 15 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,30 +356,21 @@ Having said that, here are the organizational rules:
`--enable-zts` switch to ensure your code handles TSRM correctly and doesn't
break for those who need that.

Currently, we have the following branches in use:

| Branch | |
| --------- | --------- |
| master | Active development branch for PHP 8.6, which is open for backwards incompatible changes and major internal API changes. |
| PHP-8.5 | Is used to release the PHP 8.5.x series. This is a current stable version and is open for bugfixes only. |
| PHP-8.4 | Is used to release the PHP 8.4.x series. This is a current stable version and is open for bugfixes only. |
| PHP-8.3 | Is used to release the PHP 8.3.x series. This is a current stable version and is open for bugfixes only. |
| PHP-8.2 | Is used to release the PHP 8.2.x series. This is an old stable version and is open for security fixes only. |
| PHP-8.1 | Is used to release the PHP 8.1.x series. This is an old stable version and is open for security fixes only. |
| PHP-8.0 | This branch is closed. |
| PHP-7.4 | This branch is closed. |
| PHP-7.3 | This branch is closed. |
| PHP-7.2 | This branch is closed. |
| PHP-7.1 | This branch is closed. |
| PHP-7.0 | This branch is closed. |
| PHP-5.6 | This branch is closed. |
| PHP-5.5 | This branch is closed. |
| PHP-5.4 | This branch is closed. |
| PHP-5.3 | This branch is closed. |
| PHP-5.2 | This branch is closed. |
| PHP-5.1 | This branch is closed. |
| PHP-4.4 | This branch is closed. |
| PHP-X.Y.Z | These branches are used for the release managers for tagging the releases, hence they are closed to the general public. |
The master branch is an active development branch for the newest version of PHP,
which is open for backwards incompatible changes and major internal API changes.

For PHP-X.Y branches, they are used to release the PHP X.Y.z series. Please see
the [supported versions page](https://www.php.net/supported-versions.php) to get
the status of each version.

If a version is described as "Active support", the corresponding branch is a
current stable version and is open for bugfixes only. If a version is described
as "Security fixes only", the corresponding branch is an old stable version
and is open for security fixes only. If a version is described as "End of life",
the corresponding branch is closed.

Note that PHP-X.Y.Z branches are used for the release managers for tagging the
releases, hence they are closed to the general public.

The next few rules are more of a technical nature:

Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ PHP NEWS
. imagesetstyle()/imagefilter()/imagecrop() check array argument entries
types. (David Carlier)

- GMP:
. gmp_fact() reject values larger than unsigned long. (David Carlier)

- Hash:
. Upgrade xxHash to 0.8.2. (timwolla)

Expand Down
4 changes: 4 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ PHP 8.6 UPGRADE NOTES
5. Changed Functions
========================================

- GMP:
. gmp_fact() now throws a ValueError() if $num does not fit into
a unsigned long.

- mysqli:
. The return structure of mysqli_get_charset() no longer contains
the undocumented "comment" element. The value of "charsetnr" is
Expand Down
23 changes: 22 additions & 1 deletion build/gen_stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2354,7 +2354,17 @@ protected function getFlagsByPhpVersion(): VersionFlags
$flags = "ZEND_ACC_PRIVATE";
}

return new VersionFlags([$flags]);
$versionFlags = new VersionFlags([$flags]);

if ($this->flags & Modifiers::PUBLIC_SET) {
$versionFlags->addForVersionsAbove("ZEND_ACC_PUBLIC_SET", PHP_84_VERSION_ID);
} elseif ($this->flags & Modifiers::PROTECTED_SET) {
$versionFlags->addForVersionsAbove("ZEND_ACC_PROTECTED_SET", PHP_84_VERSION_ID);
} elseif ($this->flags & Modifiers::PRIVATE_SET) {
$versionFlags->addForVersionsAbove("ZEND_ACC_PRIVATE_SET", PHP_84_VERSION_ID);
}

return $versionFlags;
}

protected function getTypeCode(string $variableLikeName, string &$code): string
Expand Down Expand Up @@ -2450,6 +2460,17 @@ protected function addModifiersToFieldSynopsis(DOMDocument $doc, DOMElement $fie
$fieldsynopsisElement->appendChild(new DOMText("\n$indentation"));
$fieldsynopsisElement->appendChild($doc->createElement("modifier", "private"));
}

if ($this->flags & Modifiers::PUBLIC_SET) {
$fieldsynopsisElement->appendChild(new DOMText("\n$indentation"));
$fieldsynopsisElement->appendChild($doc->createElement("modifier", "public(set)"));
} elseif ($this->flags & Modifiers::PROTECTED_SET) {
$fieldsynopsisElement->appendChild(new DOMText("\n$indentation"));
$fieldsynopsisElement->appendChild($doc->createElement("modifier", "protected(set)"));
} elseif ($this->flags & Modifiers::PRIVATE_SET) {
$fieldsynopsisElement->appendChild(new DOMText("\n$indentation"));
$fieldsynopsisElement->appendChild($doc->createElement("modifier", "private(set)"));
}
}

}
Expand Down
15 changes: 10 additions & 5 deletions ext/dom/php_dom.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,6 @@ zval *dom_write_property(zend_object *object, zend_string *name, zval *value, vo
const dom_prop_handler *hnd = dom_get_prop_handler(obj, name, cache_slot);

if (hnd) {
if (UNEXPECTED(!hnd->write_func)) {
zend_readonly_property_modification_error_ex(ZSTR_VAL(object->ce->name), ZSTR_VAL(name));
return &EG(error_zval);
}

zend_property_info *prop = NULL;
if (cache_slot) {
ZEND_ASSERT(*cache_slot == obj->prop_handler);
Expand All @@ -429,6 +424,16 @@ zval *dom_write_property(zend_object *object, zend_string *name, zval *value, vo
}
}

if (UNEXPECTED(!hnd->write_func)) {
if (prop && (prop->flags & ZEND_ACC_PPP_SET_MASK) &&
!zend_asymmetric_property_has_set_access(prop)) {
zend_asymmetric_visibility_property_modification_error(prop, "modify");
} else {
zend_readonly_property_modification_error_ex(ZSTR_VAL(object->ce->name), ZSTR_VAL(name));
}
return &EG(error_zval);
}

ZEND_ASSERT(prop && ZEND_TYPE_IS_SET(prop->type));
zval tmp;
ZVAL_COPY(&tmp, value);
Expand Down
Loading
Loading