Skip to content

Commit 51bdab2

Browse files
committed
Merge branch 'master' into closure-in-cost-expr
2 parents 55d4687 + 3815a77 commit 51bdab2

File tree

151 files changed

+355
-7632
lines changed

Some content is hidden

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

151 files changed

+355
-7632
lines changed

.github/actions/configure-macos/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ runs:
1818
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libxslt/lib/pkgconfig"
1919
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/zlib/lib/pkgconfig"
2020
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/icu4c/lib/pkgconfig"
21+
sed -i -e 's/Requires.private:.*//g' "$BREW_OPT/curl/lib/pkgconfig/libcurl.pc"
2122
./buildconf --force
2223
./configure \
2324
--enable-option-checking=fatal \

NEWS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ PHP NEWS
1616
. Added Dom\Element::$outerHTML. (nielsdos)
1717
. Added Dom\Element::insertAdjacentHTML(). (nielsdos)
1818

19+
- Intl:
20+
. Bumped ICU requirement to ICU >= 57.1. (cmb)
21+
1922
- Output:
2023
. Fixed calculation of aligned buffer size. (cmb)
2124

@@ -45,6 +48,10 @@ PHP NEWS
4548
. Fixed bug #49169 (SoapServer calls wrong function, although "SOAP action"
4649
header is correct). (nielsdos)
4750

51+
- Sockets:
52+
. Added IPPROTO_ICMP/IPPROTO_ICMPV6 to create raw socket for ICMP usage.
53+
(David Carlier)
54+
4855
- Standard:
4956
. Fixed crypt() tests on musl when using --with-external-libcrypt
5057
(Michael Orlitzky).

UPGRADING

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ PHP 8.5 UPGRADE NOTES
2929
. It is no longer possible to use "array" and "callable" as class alias names
3030
in class_alias().
3131

32+
- Intl:
33+
. The extension now requires at least ICU 57.1.
34+
3235
- LDAP:
3336
. ldap_get_option() and ldap_set_option() now throw a ValueError when
3437
passing an invalid option.
@@ -129,6 +132,9 @@ PHP 8.5 UPGRADE NOTES
129132
- POSIX:
130133
. POSIX_SC_OPEN_MAX.
131134

135+
- Sockets:
136+
. IPPROTO_ICMP/IPPROTO_ICMPV6.
137+
132138
========================================
133139
11. Changes to INI File Handling
134140
========================================

Zend/zend_compile.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9163,7 +9163,13 @@ static void zend_compile_class_decl(znode *result, zend_ast *ast, bool toplevel)
91639163
}
91649164

91659165
opline->op1_type = IS_CONST;
9166-
LITERAL_STR(opline->op1, lcname);
9166+
/* It's possible that `lcname` is not an interned string because it was not yet in the interned string table.
9167+
* However, by this point another thread may have caused `lcname` to be added in the interned string table.
9168+
* This will cause `lcname` to get freed once it is found in the interned string table. If we were to use
9169+
* LITERAL_STR() here we would not change the `lcname` pointer to the new value, and it would point to the
9170+
* now-freed string. This will cause issues when we use `lcname` in the code below. We solve this by using
9171+
* zend_add_literal_string() which gives us the new value. */
9172+
opline->op1.constant = zend_add_literal_string(&lcname);
91679173

91689174
if (decl->flags & ZEND_ACC_ANON_CLASS) {
91699175
opline->opcode = ZEND_DECLARE_ANON_CLASS;

build/gen_stub.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,12 +1813,11 @@ private function getParameterSection(DOMDocument $doc): DOMElement {
18131813
$parametersRefSec->appendChild($noParamEntity);
18141814
return $parametersRefSec;
18151815
} else {
1816-
$parametersPara = $doc->createElement('simpara');
1817-
$parametersRefSec->appendChild($parametersPara);
1816+
$parametersContainer = $doc->createDocumentFragment();
18181817

1819-
$parametersPara->appendChild(new DOMText("\n "));
1818+
$parametersContainer->appendChild(new DOMText("\n "));
18201819
$parametersList = $doc->createElement('variablelist');
1821-
$parametersPara->appendChild($parametersList);
1820+
$parametersContainer->appendChild($parametersList);
18221821

18231822
/*
18241823
<varlistentry>
@@ -1837,33 +1836,34 @@ private function getParameterSection(DOMDocument $doc): DOMElement {
18371836

18381837
$listItemPara = $doc->createElement('simpara');
18391838
$listItemPara->append(
1840-
"\n ",
1841-
"Description.",
18421839
"\n ",
1840+
"Description.",
1841+
"\n ",
18431842
);
18441843

18451844
$parameterEntryListItem = $doc->createElement('listitem');
18461845
$parameterEntryListItem->append(
1847-
"\n ",
1848-
$listItemPara,
18491846
"\n ",
1847+
$listItemPara,
1848+
"\n ",
18501849
);
18511850

18521851
$parameterEntry = $doc->createElement('varlistentry');
18531852
$parameterEntry->append(
1854-
"\n ",
1853+
"\n ",
18551854
$parameterTerm,
1856-
"\n ",
1857-
$parameterEntryListItem,
18581855
"\n ",
1856+
$parameterEntryListItem,
1857+
"\n ",
18591858
);
18601859

1861-
$parametersList->appendChild(new DOMText("\n "));
1860+
$parametersList->appendChild(new DOMText("\n "));
18621861
$parametersList->appendChild($parameterEntry);
18631862
}
1864-
$parametersList->appendChild(new DOMText("\n "));
1863+
$parametersList->appendChild(new DOMText("\n "));
18651864
}
1866-
$parametersPara->appendChild(new DOMText("\n "));
1865+
$parametersContainer->appendChild(new DOMText("\n "));
1866+
$parametersRefSec->appendChild($parametersContainer);
18671867
$parametersRefSec->appendChild(new DOMText("\n "));
18681868
return $parametersRefSec;
18691869
}

build/php.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,7 @@ dnl
17791779
dnl Common setup macro for ICU.
17801780
dnl
17811781
AC_DEFUN([PHP_SETUP_ICU],[
1782-
PKG_CHECK_MODULES([ICU], [icu-uc >= 50.1 icu-io icu-i18n])
1782+
PKG_CHECK_MODULES([ICU], [icu-uc >= 57.1 icu-io icu-i18n])
17831783
17841784
PHP_EVAL_INCLINE([$ICU_CFLAGS])
17851785
PHP_EVAL_LIBLINE([$ICU_LIBS], [$1])

ext/dom/documentfragment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ PHP_METHOD(DOMDocumentFragment, appendXML) {
7373

7474
DOM_GET_OBJ(nodep, id, xmlNodePtr, intern);
7575

76-
if (dom_node_is_read_only(nodep) == SUCCESS) {
76+
if (dom_node_is_read_only(nodep)) {
7777
php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, dom_get_strict_error(intern->document));
7878
RETURN_FALSE;
7979
}

ext/dom/dom_iterators.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */
177177
if (objmap->nodetype != XML_ENTITY_NODE &&
178178
objmap->nodetype != XML_NOTATION_NODE) {
179179
if (objmap->nodetype == DOM_NODESET) {
180-
HashTable *nodeht = HASH_OF(&objmap->baseobj_zv);
180+
HashTable *nodeht = Z_ARRVAL_P(&objmap->baseobj_zv);
181181
zval *entry;
182182
zend_hash_move_forward_ex(nodeht, &iterator->pos);
183183
if ((entry = zend_hash_get_current_data_ex(nodeht, &iterator->pos))) {
@@ -275,7 +275,7 @@ zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object, i
275275
if (objmap->nodetype != XML_ENTITY_NODE &&
276276
objmap->nodetype != XML_NOTATION_NODE) {
277277
if (objmap->nodetype == DOM_NODESET) {
278-
nodeht = HASH_OF(&objmap->baseobj_zv);
278+
nodeht = Z_ARRVAL_P(&objmap->baseobj_zv);
279279
zend_hash_internal_pointer_reset_ex(nodeht, &iterator->pos);
280280
if ((entry = zend_hash_get_current_data_ex(nodeht, &iterator->pos))) {
281281
ZVAL_COPY(&iterator->curobj, entry);

ext/dom/node.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,8 @@ static xmlNodePtr dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib, xmlN
837837

838838
static bool dom_node_check_legacy_insertion_validity(xmlNodePtr parentp, xmlNodePtr child, bool stricterror, bool warn_empty_fragment)
839839
{
840-
if (dom_node_is_read_only(parentp) == SUCCESS ||
841-
(child->parent != NULL && dom_node_is_read_only(child->parent) == SUCCESS)) {
840+
if (dom_node_is_read_only(parentp) ||
841+
(child->parent != NULL && dom_node_is_read_only(child->parent))) {
842842
php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror);
843843
return false;
844844
}
@@ -1279,8 +1279,8 @@ static void dom_node_remove_child(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry
12791279
RETURN_FALSE;
12801280
}
12811281

1282-
if (dom_node_is_read_only(nodep) == SUCCESS ||
1283-
(child->parent != NULL && dom_node_is_read_only(child->parent) == SUCCESS)) {
1282+
if (dom_node_is_read_only(nodep) ||
1283+
(child->parent != NULL && dom_node_is_read_only(child->parent))) {
12841284
php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror);
12851285
RETURN_FALSE;
12861286
}

ext/dom/nodelist.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ zend_long php_dom_get_nodelist_length(dom_object *obj)
7272
}
7373

7474
if (objmap->nodetype == DOM_NODESET) {
75-
HashTable *nodeht = HASH_OF(&objmap->baseobj_zv);
75+
HashTable *nodeht = Z_ARRVAL_P(&objmap->baseobj_zv);
7676
return zend_hash_num_elements(nodeht);
7777
}
7878

@@ -145,7 +145,7 @@ void php_dom_nodelist_get_item_into_zval(dom_nnodemap_object *objmap, zend_long
145145
itemnode = php_dom_libxml_hash_iter(objmap, index);
146146
} else {
147147
if (objmap->nodetype == DOM_NODESET) {
148-
HashTable *nodeht = HASH_OF(&objmap->baseobj_zv);
148+
HashTable *nodeht = Z_ARRVAL_P(&objmap->baseobj_zv);
149149
zval *entry = zend_hash_index_find(nodeht, index);
150150
if (entry) {
151151
ZVAL_COPY(return_value, entry);

0 commit comments

Comments
 (0)