1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Commit Graph

137090 Commits

Author SHA1 Message Date
Peter Kokot
575efc0617 Autotools: Quote PHP_ADD_SOURCES* macros arguments (#15146)
- A redundant shell quoted flags argument replaced with Autoconf quotes
  (the PHP_ADD_SOURCES macro already adds the necessary shell quotes
  characters where needed)
- CS synced
2024-07-29 10:08:48 +02:00
Peter Kokot
9cc63e1de9 Autotools: Normalize headers arguments (#15149)
Refactor all "long" arguments into blank-or-newline-separated list of
files with m4_normalize.
2024-07-29 10:08:17 +02:00
Peter Kokot
f3c48f1acd Autotools: Append hash and opcache build directories (#15132)
When building in out-of-source directory, instead of creating these
build directories right away, this appends them to the list and creates
them at the end of configure phase. These don't need to be created
immediately as no files are generated in these extensions before the
configure phase is finished.

Also, the PHP_ADD_BUILD_DIR is moved after the PHP_NEW_EXTENSION when
the more common $ext_builddir variable is available (the ext/<extension>
isn't available when building with phpize).
2024-07-29 10:02:11 +02:00
Peter Kokot
1ceadaed52 Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144)
This adds Autoconf quote characters to all PHP_NEW_EXTENSION arguments
and syncs the CS across the php-src Autotools build system.
2024-07-29 00:14:59 +02:00
Peter Kokot
f0788da6b6 Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Sync CODEOWNERS (#15017)
2024-07-29 00:12:42 +02:00
Peter Kokot
9cd0484de0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Sync CODEOWNERS (#15017)
2024-07-29 00:12:31 +02:00
Peter Kokot
d214a359c9 [skip ci] Sync CODEOWNERS (#15017)
This repeats the sync as noted in the GH-13591 and the discussion
https://news-web.php.net/php.internals/124472

The CODEOWNERS file is related to the targeted branch in the pull
request and not only the master branch.

- Added a note to change the earliest supported PHP branch and not only
  master branch
- Synced GitHub ID's and paths across the PHP-8.2, PHP-8.3 and master
  branches
- Add note how changes here should be analogous to bug fixes
  with a link to CONTRIBUTING.md which describes which branch to
  target
2024-07-29 00:11:48 +02:00
Pol Dellaiera
664c1d18df Fix: add missing PHPAPI (#15142)
Issue introduced in commit 5905857fd2 from PR https://github.com/php/php-src/pull/14833
2024-07-28 20:38:52 +02:00
Niels Dossche
e0a2e2e59c Fix GH-15123: var_dump doesn't actually work on XMLReader (#15130) 2024-07-28 19:36:07 +02:00
Peter Kokot
2b97c84d4c Autotools: Quote PHP_CHECK_LIBRARY arguments (#15136)
This syncs the quotes across the PHP_CHECK_LIBRARY macro arguments.
2024-07-28 18:39:14 +02:00
David Carlier
a7d856d9bf ext/readline: fix global readline vars when updating rl_line_buffer.
if the new value was larger, rl_line_buffer_length was never updated.
neither was rl_end (on unixes).

close GH-15120
2024-07-28 14:12:26 +01:00
Niels Dossche
177fd88452 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix CI failure on macOS after Curl update
2024-07-28 14:34:47 +02:00
Niels Dossche
9f570163b3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix CI failure on macOS after Curl update
2024-07-28 14:34:35 +02:00
Niels Dossche
fdae7c23f0 Fix CI failure on macOS after Curl update 2024-07-28 14:34:26 +02:00
Gina Peter Banyard
a50adda19e ext/gmp: Make GMP class final (#15121)
* ext/gmp: Make GMP class final

RFC: https://wiki.php.net/rfc/gmp-final

* Update UPGRADING

Co-authored-by: Peter Kokot <peterkokot@gmail.com>

---------

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
2024-07-28 13:03:26 +01:00
Niels Dossche
9d7e6090df Fix GH-15137: Unexpected null pointer in Zend/zend_smart_str.h (#15138)
This regressed when I optimized $wholeText. The previous code used xmlStrcat
which implicitly checked for a NULL argument, but now it's a direct memcpy
which you shouldn't pass null pointers to, although it won't result in a
crash because memcpy doesn't do anything if the length is 0.
2024-07-28 13:53:30 +02:00
Peter Kokot
dee29442ba Autotools: Fix ext/standard sources (#15131)
This appends source files to the PHP_NEW_EXTENSION call and adds the
possible compilation flag -DZEND_ENABLE_STATIC_TSRMLS_CACHE when
building objects as done on all ext/standard sources already. Also, the
PHP_EXT_DIR Autoconf macro doesn't accept any argument.
2024-07-28 10:12:17 +02:00
Peter Kokot
ae9b9ead7b Autotools: Sync PHP_EXT_* M4 macros (#15134)
PHP_EXT_DIR, PHP_EXT_BUILDDIR, and PHP_EXT_SRCDIR macros don't accept
the argument since 82b73fd1e3.
2024-07-28 10:11:01 +02:00
Peter Kokot
590786adb3 Autotools: Replace PHP_EXT_DIR with $ext_dir (#15133)
- Sync Autoconf syntax
- The PHP_EXT_DIR macro doesn't accept any arguments and since this is
  called after PHP_NEW_EXTENSION, the $ext_dir variable can be used
  instead.
2024-07-28 10:09:26 +02:00
Peter Kokot
21e01f3e70 Autotools: Simplify PHP_ALWAYS_SHARED macro (#15129)
Instead of defining an empty M4 macro PHP_ALWAYS_SHARED when configuring
extensions in php-src using the main configure.ac, the m4_ifdef can be
used to conditionally call the macro when it is defined (when using
phpize).
2024-07-28 01:33:05 +02:00
Peter Kokot
0d36701b32 Autotools: Remove dead code (#15128)
This is a left over from 4dee0c4a14.

These definitions are now always done by the config-stubs file. For
phpize builds they are in the phpize.m4 as before.
2024-07-28 01:30:15 +02:00
Peter Kokot
32210ce967 Autotools: Sync CS in XML related extensions (#15110)
- PHP_SETUP_LIBXML arguments quoted
- Help texts updated for HAVE_LIBXML, HAVE_DOM, HAVE_XMLREADER,
  HAVE_XMLWRITER, HAVE_SOAP, HAVE_SIMPLEXML, and HAVE_XML CPP macros
- Duplicate HAVE_LIBXML symbol definition in PHP_SETUP_LIBXML M4 macro
  removed (the HAVE_LIBXML marks that PHP libxml extension is available and
  not only that libxml2 library is available)
2024-07-27 22:48:51 +02:00
Peter Kokot
003e238436 Autotools: Quote and fix PHP_SELECT_SAPI arguments (#15118)
This macro once had also the 5th argument (the build target), which was
removed via 2a6da0f24c. This quotes all
PHP_SELECT_SAPI arguments and removes the redundant ones. The basic
macro usage help text is moved to the macros section from the obsolete
docs file.
2024-07-27 22:46:36 +02:00
Niels Dossche
5270ada34c Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix nightly failure in test variation due to number of temp variables varying when observers are enabled
2024-07-27 16:37:14 +02:00
Niels Dossche
950d010cc5 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix nightly failure in test variation due to number of temp variables varying when observers are enabled
2024-07-27 16:37:09 +02:00
Niels Dossche
4df858602a Fix nightly failure in test variation due to number of temp variables varying when observers are enabled 2024-07-27 16:37:01 +02:00
Niels Dossche
cf14adf897 Avoid string duplications in simplexml (#15122)
Switch to zend_string which allows us to use zend_string_copy.
2024-07-27 16:21:07 +02:00
Niels Dossche
043a1cb856 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix CI failure after Curl update (#15124)
2024-07-27 16:11:33 +02:00
Niels Dossche
014e515ccc Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix CI failure after Curl update (#15124)
2024-07-27 16:11:26 +02:00
Niels Dossche
404bd30810 Fix CI failure after Curl update (#15124) 2024-07-27 16:09:50 +02:00
Peter Kokot
0c0da80a2a Autotools: Replace PHP_DEF_HAVE with AC_DEFINE_UNQUTED (#15119)
The PHP_DEF_HAVE M4 macro is a simple wrapper around the recommended
AC_DEFINE or AC_DEFINE_UNQUOTED (when shell variables are used in
arguments). This also adds some basic help texts to macros.
2024-07-27 11:25:50 +02:00
Peter Kokot
ef8e792962 Autotools: Quote M4 macro arguments
- AC_CHECK_TYPES
- AC_REPLACE_FUNCS
- PHP_HELP_SEPARATOR needs here double quotes as content contains '['
  and ']' characters
2024-07-27 11:22:28 +02:00
Peter Kokot
a1b45bb87a Autotools: Sync PHP_SETUP_* M4 macros (#15117)
- arguments quoted
- MYSQLND_HAVE_SSL help text synced
2024-07-27 11:20:07 +02:00
Peter Kokot
c53b272f67 Autotools: Quote AC_CHECK_LIB arguments (#15116)
This syncs CS for AC_CHECK_LIB where possible, and adds minor help texts
to gettext extension AC_DEFINE symbols, including the HAVE_LIBINTL.
2024-07-27 11:18:52 +02:00
Peter Kokot
a7f0fe1f33 Autotools: Quote macro arguments
- PHP_EXPAND_PATH
- PHP_LIBGCC_LIBPATH
- PHP_OUTPUT
- PHP_REMOVE_USR_LIB
2024-07-27 05:26:32 +02:00
David CARLIER
bb8d667f8f Fix GH-15102: ext/pgsql use after free on persistent connection renewal. (#15115)
simplifying the workflow by just using PQreset which force a new
connection internally, connection process ids ought to be different,
 and let the existing checks do the rest.
2024-07-26 23:12:26 +01:00
Peter Kokot
6e57550f14 Autotools: Normalize DTrace sources argument (#15111)
Using the m4_normalize, the source files can be added more intuitively
using blank-or-newline delimited list of files. This adds also some
basic help text.
2024-07-26 23:30:20 +02:00
Peter Kokot
2141094b2a Autotools: Fix rl_erase_empty_line check (#15109)
When building with readline/libedit installed at non-standard or
non-system paths the check flags also need to be adjusted a bit to be
able to check for the declared variable.
2024-07-26 23:28:25 +02:00
Peter Kokot
ff4b99e260 Autotools: Quote PHP_ADD_LIB* arguments (#15112)
Following previous CS syncs, this quotes arguments in PHP_ADD_LIB* M4
macros:
- PHP_ADD_LIBRARY
- PHP_ADD_LIBRARY_WITH_PATH
- PHP_ADD_LIBPATH
2024-07-26 23:26:55 +02:00
Christoph M. Becker
a7bd911ad6 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix type incompatibility in assignment.
2024-07-26 14:59:14 +02:00
Christoph M. Becker
62d0578915 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix type incompatibility in assignment.
2024-07-26 14:58:05 +02:00
Christoph M. Becker
af789afbe8 Fix type incompatibility in assignment.
This partially reverts 0956267c08, which
introduced a type incompatibility where an `int` function is assigned
to a `zend_result` function.  That yields a level 1 C4133 warning on
MSVC, and usually (e.g. in CI) level 1 warnings are elevated to errors,
so the build fails.[1]

The PHP-8.3 branch and up are uneffected by this, so the upward merges
should be empty.

[1] <0956267c08 (r144587696)>
2024-07-26 14:57:16 +02:00
Peter Kokot
fa7ee84f0b Autotools: Quote PHP_CONFIG_NICE arguments 2024-07-26 09:58:59 +02:00
Michael Orlitzky
44b0baf705 ext/dba/tests: sort expected test output (#14962)
* ext/dba/tests/setup/setup_dba_tests.inc: sort test output

Iterating through a database with firstkey() and nextkey() is
guaranteed to retrieve all rows, but apparently not in any particular
order. This is causing a test failure for at least one user, so we
steal the sort() approach from GDBM to ensure that the output is
predictable.

* ext/dba/tests/dba_*.phpt: sort expected test output

The actual output is now sorted for consistency, so we need to update
the expected output as well. As a nice side effect, some differences
in the expected outputs for the various engines have been eliminated.

Closes GH-14786

* ext/pgsql/tests/80_bug14383.phpt: sort expected test output

This test uses a routine from ext/dba that now sorts its (actual)
output, so we have to sort the expected output here as well.

* ext/dba/tests/setup/setup_dba_tests.inc: update comment

After doing some more digging, it looks like GDBM isn't the only
engine where the iteration order with firstkey() and nextkey()
might change unexpectedly.
2024-07-26 01:16:52 +01:00
Christoph M. Becker
ab449a7e46 Add missing cstddef include for C++ builds
Closes GH-15096.
2024-07-25 14:33:03 +02:00
Niels Dossche
ad452086d9 Add tidyNode::getNextSibling() and tidyNode::getPreviousSibling()
These get the next and previous sibling nodes, respectively.
We can already kind of do this by using the $child array, but that's
inconvenient when actually walking the tree by only using node
instances. Since the class is final, there is no BC break here.

Closes GH-15047.
2024-07-25 13:55:20 +02:00
Ilija Tovilo
a0a8624346 Fix throw in IS_IDENTICAL in JIT (#15103)
We need to persist opline in case zend_is_identical() throws.
2024-07-25 13:18:47 +02:00
Christoph M. Becker
da72ac11f6 Fix GH-15094: php_random_default_engine() is not C++ conforming
Using compound literals is conforming to C99 (and up), but not with any
C++ standard.  Since the code is in a public header, it might be used
by C++ extensions.  Unfortunately, we cannot even used designated
initializers, because these are a C++20 feature, so we stick with
classic C/C++ code.

Closes GH-15100.
2024-07-25 12:44:25 +02:00
Peter Kokot
82e63a06e2 Add pcre dependency as required to ext/filter (#15099)
This is configure phase dependency synced with already present Autotools
pcre dependency check.
2024-07-24 23:30:57 +02:00
Peter Kokot
b0db5e76a0 Autotools: Normalize ext/mbstring installed headers (#15097)
This uses the default PHP_INSTALL_HEADERS macro instead of a wrapper,
making this in tune with the rest of the extensions.
2024-07-24 22:41:16 +02:00