Commit Graph

66982 Commits

Author SHA1 Message Date
Niels Dossche
445c1c920b
Update Lexbor (#14735)
Until commit aaa722f9a44a486f361e4266ff322afcf7d6421a
This pulls in some upstream fixes, including some of mine.
2024-06-30 20:01:27 +02:00
Peter Kokot
212b2834e9
Autotools: Sync indentation style in build system files (#14725) 2024-06-29 23:25:17 +02:00
Niels Dossche
4df90af44f
Update Lexbor (#14729) 2024-06-29 22:42:56 +02:00
Kamil Tekiela
62a3bbd0e3
Remove MYSQLI_SET_CHARSET_DIR (#14724) 2024-06-29 22:21:03 +02:00
Niels Dossche
88da914910 Implement CSS selectors 2024-06-29 13:00:26 -07:00
Niels Dossche
7defc23532 Import Lexbor CSS component and update the patches for it 2024-06-29 13:00:26 -07:00
Peter Kokot
b1c34a9163
Normalize AC_CHECK_HEADER* arguments (#14723)
The m4_normalize is for Autoconf < 2.70 (on 2.70 and later versions a
blank-or-newline separated items can be expanded without using
backslash-newline). The order of headers in configure.ac is left as is
because the first few headers depend on checking other headers (for
those includes the 4th argument).
2024-06-29 19:49:12 +02:00
Peter Kokot
c44834d8ad
Trim trailing whitespace (#14721) 2024-06-29 18:41:45 +02:00
Niels Dossche
4cab7f90a1 [RFC] Implement XMLReader::fromUri() and XMLReader::fromString() 2024-06-29 09:04:35 -07:00
Niels Dossche
c24b8fe616 [RFC] Implement XMLWriter::toUri() and XMLWriter::toMemory() 2024-06-29 09:04:35 -07:00
Niels Dossche
acf2762857 [RFC] Add stream open functions to XML{Reader,Writer}
RFC: https://wiki.php.net/rfc/xmlreader_writer_streams
2024-06-29 09:04:35 -07:00
Ayesh Karunaratne
421ac9ac28 ext/mbstring: update to Unicode 15
Updates UCD to Unicode 15.1 (released 2023 Sept). The upcoming
Unicode 16 version will be released roughly on 2024 Sept.

Previously: 0fdffc18, #7502

UCD 15.1 `DerivedNormalizationProps` contains multiple properties in
the same line, which breaks the parser. This also updates the
`ucgendat.php` script to allow 2 or three fields in each line, and to
look for the `Cased` and `Case_Ignorable` properties in either of the
fields to mimic the previous behavior.
2024-06-29 17:24:52 +02:00
Ayesh Karunaratne
23f99f08c9 ext/mbstring: update UCD parser to accept characters with multiple properties 2024-06-29 17:24:52 +02:00
Niels Dossche
998997b6a1
Remove nonsensical dom_node_children_valid() checks from parentnode.c (#14706)
Either these are for ParentNode, which are always valid parents that can
hold children. Or these are for ChildNode, which always has a parent
that can have children (by definition).
2024-06-29 16:55:18 +02:00
David Carlier
58a6e5551e
Merge branch 'PHP-8.3' 2024-06-29 15:52:52 +01:00
David Carlier
1b71a9e01f
Merge branch 'PHP-8.2' into PHP-8.3 2024-06-29 15:52:28 +01:00
David Carlier
c03196a5be
Fix GH-14712: segfault on invalid object.
If the extension does not allow to get a property pointer (like PDORow
object), we fallback
to the read property cb anyway.
2024-06-29 15:51:57 +01:00
Niels Dossche
c66221b7ba
Fix arginfo violation in removeChild() (#14717)
It was possible to return false without throwing an exception.
This is even wrong in "old DOM" because we expect either a NOT_FOUND_ERR
or NO_MODIFICATION_ALLOWED_ERR according to the documentation.
A side effect of this patch is that it prioritises NOT_FOUND_ERR over
NO_MODIFICATION_ALLOWED_ERR but I think that's fine.
2024-06-29 16:32:36 +02:00
Niels Dossche
de8b13fde2
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14563: Build failure with libxml2 v2.13.0
2024-06-29 16:28:57 +02:00
Niels Dossche
b63b100e36
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14563: Build failure with libxml2 v2.13.0
2024-06-29 16:28:51 +02:00
Niels Dossche
b08def5156
Fix GH-14563: Build failure with libxml2 v2.13.0
Remove xmlErrMemory from the export section for Windows, this fixes the
build. Even though the original function was renamed [1] it is hidden,
so removing this should be sufficient and not be a BC break.

[1] 130436917c

Closes GH-14719.
2024-06-29 16:28:16 +02:00
Niels Dossche
4a9ff0f004
Add myself to ext-dom credits (#14718)
Suggested here [1] as well.

[1] https://github.com/php/php-src/pull/13819#pullrequestreview-2146095841
2024-06-29 15:18:34 +01:00
Peter Kokot
2041c133ac
Normalize AC_CHECK_FUNC* first argument (#14700)
The m4_normalize is for Autoconf < 2.70 (on 2.70 and later versions a
blank-or-newline separated items can be expanded without using
backslash-newline).

This also syncs the 1st argument quotes.
2024-06-28 22:40:24 +02:00
Niels Dossche
bcdba83cbb
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14702: DOMDocument::xinclude() crash
2024-06-28 22:29:03 +02:00
Niels Dossche
0a1f51deb3
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14702: DOMDocument::xinclude() crash
2024-06-28 22:22:12 +02:00
Niels Dossche
42908f9f68
Fix GH-14702: DOMDocument::xinclude() crash
The xinclude code from libxml removes the fallback node,
but the fallback node is still reference via $fallback.
The solution is to detach the nodes that are going to be removed in
advance.

Closes GH-14704.
2024-06-28 22:21:12 +02:00
David Carlier
532a2604c2
Fix GH-14698: segfault on dom node after dereference.
close GH-14701
2024-06-28 20:52:48 +01:00
Niels Dossche
d883996326
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14537: shmop Windows 11 crashes the process
2024-06-28 20:14:26 +02:00
Niels Dossche
c19affc567
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14537: shmop Windows 11 crashes the process
2024-06-28 20:14:20 +02:00
Niels Dossche
39a3266576
Fix GH-14537: shmop Windows 11 crashes the process
The error handling code isn't entirely right in two places.
One of the code blocks is dead because of an always-false condition, and
another code block is missing the assignment of a NULL pointer.

Getting the exact same behaviour is not entirely possible because you
can't extend the size of a shared memory region after it was made with
the Windows APIs we use, unless we destroy the region and recreate it,
but that has other consequences.
However, it certainly shouldn't crash.

Closes GH-14707.
2024-06-28 20:13:47 +02:00
Niels Dossche
59e639b5d4
Follow-up on GH-13516: include config.h from build dir for new files in ext-dom (#14705)
GH-13516 was created before the new DOM files were added, and the PR was
never rebased to include the new DOM files, so there are three places
which were not replaced.
2024-06-28 18:29:22 +02:00
Máté Kocsis
a2cecd2a6f
Remove ZEND_STATIC_ASSERT() calls from legacy arginfo files
After report in 5992a29724 (r143540472)
2024-06-27 21:52:27 +02:00
Peter Kokot
fd28bb0f51
Normalize ext/standard sources (#14677)
Follow-up of GH-14654
2024-06-27 20:45:09 +02:00
Tim Düsterhus
ac54d1c039
hash: Add simple HashContext::__debugInfo() implementation (#14644)
* hash: Add simply HashContext::__debugInfo() implementation

* NEWS/UPGRADING
2024-06-27 19:29:37 +02:00
Gina Peter Banyard
5b1b3ae673 ext/soap: Initialize a HashTable of size j
The i seems to be a mistake as everything else uses j
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
ee75f344f8 ext/soap: Add const qualifiers for serialize functions
As serializing something should not affect the value of it
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
ca2b131c6e ext/soap: mark string param of sdl_serialize_key() as const
Add const qualifiers to the variables at the call size
Rename variables when they were shadowing a variable from the outer scope
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
325f8f0cfc ext/soap: Remove cast from macro
Move it to the one call site that requires it
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
0e91b4f5e6 ext/soap: convert int type to size_t where appropriate 2024-06-27 17:41:23 +01:00
Gina Peter Banyard
902c8ceab0 ext/soap: Rename MD5 context variable to not shadow the stream context variable 2024-06-27 17:41:23 +01:00
Gina Peter Banyard
26143dae2d ext/soap: Remove unused 'cache' extension global 2024-06-27 17:41:23 +01:00
Peter Kokot
3d6bd16239
Sync missing hash and pcre dependencies for opcache on Windows (#14682)
- ext/hash is required only on Windows
- ext/pcre is required
2024-06-27 18:23:01 +02:00
David CARLIER
54e5e7b507
ext/pdo_pgsql: object initialisation, using smart_str api instead. (#14679) 2024-06-27 05:53:38 +01:00
Niels Dossche
48c9f1e2c3 Implement Dom\HTMLElement class 2024-06-26 12:17:12 -07:00
Niels Dossche
78401ba867 Implement Dom\Document::$title setter 2024-06-26 12:17:12 -07:00
Niels Dossche
04af960397 Implement Dom\Document::$title getter 2024-06-26 12:17:12 -07:00
Niels Dossche
a12db3b656 Implement Dom\Document::$body setter 2024-06-26 12:17:12 -07:00
Niels Dossche
287cf91724 Implement Dom\Document::$head 2024-06-26 12:17:12 -07:00
Niels Dossche
a1485df55a Implement Dom\Document::$body getter 2024-06-26 12:17:12 -07:00
Niels Dossche
4794c1fc16
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add SKIPIFs for upstream regression in libxslt (#14674)
2024-06-26 19:36:01 +02:00