1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Commit Graph

136598 Commits

Author SHA1 Message Date
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
Alex Dowad 1b47fd026a Revert "[ci skip] Add Hamada-san to CODEOWNERS for mbstring"
This reverts commit 0bcc1e613b.

It turns out that GitHub expects all users listed in CODEOWNERS to have
write access to the repository, and @youkidearitai does not currently
have such access. I was not aware of this earlier, and still hope that
he can be added back later, since he is very helpful when it comes
to reviewing GitHub issues and pull requests.
2024-06-29 20:59:03 +02:00
Peter Kokot a5b7850d6c Wrap Zend max execution timers check in M4 macro (#14696)
- PHP_CHECK_FUNC -> AC_SEARCH_LIBS
- Redundant symbols HAVE_LIBRT and HAVE_TIMER_CREATE removed
- The rt library for some older systems (Solaris <= 10, older Linux)
  appended as needed
- This uses AC_ and AS_* macros and relies more on Autoconf shell
  code handling
- Help texts updated and synced
2024-06-29 19:52:56 +02: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 52ed06dc7d Autotools: Move HAVE_DTRACE and PHP_DTRACE_OBJS to PHP_INIT_DTRACE (#14722)
The sys/sdt.h is required header when using DTrace, HAVE_DTRACE can be
defined together when initializing and PHP_DTRACE_OBJS can be
substituted to simplify the macro usage a bit further.
2024-06-29 19:12:08 +02:00
Peter Kokot c44834d8ad Trim trailing whitespace (#14721) 2024-06-29 18:41:45 +02:00
Alex Dowad 0bcc1e613b [ci skip] Add Hamada-san to CODEOWNERS for mbstring
For the last couple years, Hamada-san has provided helpful feedback
on many GitHub issues and pull requests related to mbstring. He is in
a good position to help with reviewing future pull requests.

He agreed (via private mail) that it is fine to add his GitHub account
to CODEOWNERS.
2024-06-29 18:22:57 +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
Peter Kokot ca3b2482cc Refactor ZEND_MM alignment check (#14720)
- Check added into a separate M4 macro
- AC_CACHE_CHECK used for running the test program with cache variable
  for optional edge-case overrides
- Help texts updated
- If check fails for some reason, the configure step emits error as
  also done in the Zend C code
- Cross-compilation values updated with type casts as done in the
  current conftest file output
2024-06-29 18:02:17 +02:00
Alex Dowad bec2532584 Update dates of my mbstring maintainership in EXTENSIONS 2024-06-29 17:28:36 +02: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] https://github.com/GNOME/libxml2/commit/130436917c362d14f0eb3705a0edddc523a9640e

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 7f8e8a08d2 Use AC_CACHE_CHECK for float precision checks (#14663)
- AC_CACHE_CHECK simplifies message checkings and can speed up the
  consequtive configure -C checks
- AC_DEFINE descriptions style synced
- Used php_cv_* cache variables style
- Reduced over-quoted arguments to AC_LANG_PROGRAM
- Sync macro help text
2024-06-28 23:23:06 +02:00
Peter Kokot bf7be07e7d Refactor Zend signal handling check (#14678)
This wraps the Zend signal handling check in its own M4 macro for
readability and uses AS_VAR_IF, AS_VAR_APPEND for CFLAGS variable,
updates help texts and fixes CS.
2024-06-28 23:19:58 +02:00
Peter Kokot 1a5c411dc6 Wrap stack direction check in Zend M4 macro (#14694) 2024-06-28 23:07:40 +02:00
Peter Kokot 01b3c05007 Include Zend.m4 with m4_include (#14693)
Zend.m4 is now a collection of only macro definitions.
2024-06-28 22:50:22 +02:00
Peter Kokot 19a9d85d6b Rely on Autoconf's automatic removal of conftest* files (#14697)
When test programs are finished or when configure script is interrupted,
Autoconf cleans up all conftest* files.
2024-06-28 22:40:38 +02: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
Niels Dossche 2fc27b7d2a Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14590: Memory leak in FPM test gh13563-conf-bool-env.phpt
2024-06-28 22:10:23 +02:00
Niels Dossche 41371900a8 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14590: Memory leak in FPM test gh13563-conf-bool-env.phpt
2024-06-28 22:08:18 +02:00
Niels Dossche 056bec72f4 Fix GH-14590: Memory leak in FPM test gh13563-conf-bool-env.phpt
Values retrieved from zend_getenv should be freed.
Note: The only possible value for `zend_getenv` is `sapi_getenv` which uses
zend alloc to duplicate the string that it reads from the SAPI module.

Closes GH-14708.
2024-06-28 22:05:15 +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 03dab7ec3d Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] Move incorrectly placed NEWS items to the right place
2024-06-28 20:16:51 +02:00
Niels Dossche f97e2779b1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] Move incorrectly placed NEWS items to the right place
2024-06-28 20:16:45 +02:00
Niels Dossche 643762cd78 [ci skip] Move incorrectly placed NEWS items to the right place 2024-06-28 20:16:19 +02: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 https://github.com/php/php-src/commit/5992a297246ab2a6ab0cd00707dcebbff8845851#r143540472
2024-06-27 21:52:27 +02:00
Peter Kokot c705dd8884 Wrap FPM checks in AC_CACHE_CHECK and fix CS (#14681)
- This simplifies over-quoted arguments to AC_COMPILE_IFELSE
- Indentation and other CS fixes
- php_cv_* cache variables
- AC_DEFINE help texts syncs to make it more clear
- Fix -Wunused-but-set-variable warnings
2024-06-27 21:30:35 +02:00
Peter Kokot fd28bb0f51 Normalize ext/standard sources (#14677)
Follow-up of GH-14654
2024-06-27 20:45:09 +02:00
Peter Kokot 11f4683ee5 Wrap __cpuid_count check into ZEND_CHECK_CPUID_COUNT M4 macro (#14692)
Instead of checking this when including the Zend.m4 file in configure.ac
check is executed with the ZEND_INIT macro.
2024-06-27 20:16:40 +02:00