Commit Graph

137125 Commits

Author SHA1 Message Date
Peter Kokot
f66feaec0f
Sync HAVE_<extension> help texts (#15167)
This syncs all help texts of extension preprocessor macros to the same
style "Define to 1 if the PHP extension '<ext>' is available.".
[skip ci]
2024-08-02 01:41:47 +02:00
Peter Kokot
4993453933
Autotools: Update configure.ac CPP macros help texts (#15189)
- __MUSL__
- DEFAULT_SHORT_OPEN_TAG
- HAVE_BUILD_DEFS_H
- HAVE_GCOV
- HAVE_LIBDL
- PHP_RTLD_NOW
- PHP_SIGCHILD
- ZEND_FIBER_UCONTEXT
2024-08-02 01:14:48 +02:00
Peter Kokot
079f82a8ec
Sync CPP macros in ext/iconv (#15191)
This syncs and adds help texts for CPP macros defined when iconv
extension is configured.
2024-08-02 00:49:18 +02:00
Peter Kokot
eed66e6183
Autotools: Fix ffi checks (#15197)
When libffi is installed on non-default places, also the calling
convention checks need adjusted compilation flags to be able to find the
ffi.h header file.
2024-08-02 00:32:36 +02:00
David Carlier
3c36c7308d
sapi/phpdbg: windows update exception type falling into segfault.
close GH-15098
2024-08-01 11:49:13 +01:00
Peter Kokot
1ca3230966
Autotools: Update php.m4 CPP macros help texts (#15188)
- COMPILE_DL_<extension>
- COOKIE_SEEKER_USES_OFF64_T
- HAVE_BROKEN_GETCWD
- HAVE_LIBEXPAT
- HAVE_PREAD
- HAVE_PWRITE
- MISSING_ASCTIME_R_DECL
- MISSING_CTIME_R_DECL
- MISSING_GMTIME_R_DECL
- MISSING_LOCALTIME_R_DECL
- MISSING_STRTOK_R_DECL
- PHP_PREAD_64
- PHP_PWRITE_64
- SIZEOF_<type>
- HAVE_<type>
2024-08-01 10:08:28 +02:00
Saki Takamachi
0f2f7c6fb4
[skip ci] Update NEWS for PHP 8.4.0alpha4 2024-08-01 09:41:27 +09:00
Peter Kokot
28a7c6243c
[skip ci] Add HAVE_XSL_EXSLT help text (#15174) 2024-08-01 00:46:20 +02:00
Peter Kokot
c96f08aa70
Autotools: Normalize PHP_OUTPUT arguments (#15177)
The m4_normalize([$1]) normalizes items into a single-space-separated
list of files to append them to the global PHP_OUTPUT_FILES variable
that is processed by AC_CONFIG_FILES. Redundant newlines are also
removed in the generated configure script.

PHP extensions using phpize can't use this macro so it's safe to change
this.
2024-08-01 00:14:56 +02:00
Tim Düsterhus
a578c27a51
Improve link styling in PHPInfo (#15077)
* Improve link styling in PHPInfo

The previous styling with the fixed background color didn't work well in dark
mode. Remove the background and make links inherit the regular text color. To
make them visually detectable the underlining behavior is reversed. The
underline is now shown when not hovering and hidden when hovering.

* Preserve the headline linking behavior
2024-07-31 12:10:16 +02:00
David CARLIER
b7e43bd2b7
ext/readline: readline_info fix usage when the buffer is not initialised (#15139)
rl_initialise is only called when readline() is used so the global
 buffer might not be initialised yet.
2024-07-31 11:04:44 +01:00
Niels Dossche
3c68661ec9
Minor cleanup in dom_character_data_append_data (#15173) 2024-07-30 23:05:12 +02:00
Niels Dossche
ceca599649
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix UAF when removing doctype and using foreach iteration
2024-07-30 20:07:48 +02:00
Niels Dossche
4049594adf
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix UAF when removing doctype and using foreach iteration
2024-07-30 20:03:30 +02:00
Niels Dossche
b282dd749f
Fix UAF when removing doctype and using foreach iteration
This is an old bug, but this is pretty easy to fix.
It's basically applying the same fix as I did for e878b9f.
Reported by YuanchengJiang.

Closes GH-15143.
2024-07-30 20:01:22 +02:00
Saki Takamachi
60afeb5537
RFC: Change GMP bool cast behavior (#15151)
Implementation of "RFC: Change GMP bool cast behavior"

https://wiki.php.net/rfc/fix_up_bcmath_number_class

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2024-07-31 00:41:49 +09:00
Saki Takamachi
0e33b8dad9
Update NEWS for PHP 8.4.0alpha3 2024-07-30 22:09:31 +09:00
Arnaud Le Blanc
c7b65508d3
[ci skip] NEWS 2024-07-30 15:03:21 +02:00
Arnaud Le Blanc
03149ef962
Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] NEWS
  [ci skip] NEWS
  Fix destruction of generator running in fibers during shutdown (#15158)
2024-07-30 14:59:24 +02:00
Arnaud Le Blanc
e077186a34
[ci skip] NEWS 2024-07-30 14:59:01 +02:00
Arnaud Le Blanc
e24101acb4
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS
  Fix destruction of generator running in fibers during shutdown (#15158)
2024-07-30 14:56:28 +02:00
Arnaud Le Blanc
58cf903a10
[ci skip] NEWS 2024-07-30 14:55:33 +02:00
Arnaud Le Blanc
99e0d3fe09
Fix destruction of generator running in fibers during shutdown (#15158)
The destructor of generators is a no-op when the generator is running in a fiber,
because the fiber may resume the generator. Normally the destructor
is not called in this case, but this can happen during shutdown.

We detect that a generator is running in a fiber with the
ZEND_GENERATOR_IN_FIBER flag.

This change fixes two cases not handled by this mechanism:

- The ZEND_GENERATOR_IN_FIBER flag was not added when resuming a "yield from $nonGenerator"

- When a generator that is running in a fiber has multiple children (aka multiple generators yielding from it), all of them could be considered to also run in a fiber (only one actually is), and could leak if not destroyed before shutdown.
2024-07-30 14:53:19 +02:00
Peter Kokot
79af1b5280
Autotools: Remove unused variable FREETYPE2_FOUND
Follow-up of 19d8a6b771.
2024-07-30 11:25:24 +02:00
Peter Kokot
8356dadb59
Autotools: Fix xml extension dependency (#15162)
The PHP_ADD_EXTENSION_DEP Autoconf macro needs to be called after
PHP_NEW_EXTENSION to be fully effective. This simplifies the code and
checks. Also, due to the current order_by_dep.awk script implementation
it needs to be on its own line with arguments unquoted so that awk can
parse the config.m4 file. Until order_by_dep.awk script is fixed.
2024-07-30 09:17:11 +02:00
Peter Kokot
0970fd439a
Autotools: Sync CS in enchant extension 2024-07-30 07:54:32 +02:00
Peter Kokot
8c18ae7899
Autotools: Sync CS in bz2 extension (#15163)
- AS_* macros used
- Checking message refactored
2024-07-30 07:52:48 +02:00
Peter Kokot
49a08d5ca3
Autotools: Move HAVE_DTRACE to configure.ac (#15160)
Following 32210ce967 and
9ea290b72b, this moves the HAVE_DTRACE
preprocessor macro definition back to configure.ac so that
PHP_INIT_DTRACE Autoconf macro can be used in extensions without
redefinition interference.
2024-07-30 07:47:11 +02:00
Peter Kokot
4d46f26327
Autotools: Update skeleton extension config.m4 template (#15147)
- Comments refactored to a bit more guide way
- Basic help text added to the HAVE_<EXTENSION>* preprocessor macro definitions
- Raw shell ifs replaced with AS_VAR_IF M4 macros
- Code wrapped inside the line length of 80 characters
- pkg-config functionality added on top
- non-pkg-config functionality added afterwards
- The loop refactored a bit with a break and check message done
  afterwards

[skip ci]
2024-07-30 00:48:19 +02:00
Tim Düsterhus
9083ce4d27
[skip ci] Add missing name in NEWS for GH-15121 2024-07-29 19:40:11 +02:00
Dmitry Stogov
53b329e278
Fix GH-15101: _ir_RSTORE: Assertion `ctx->control' (#15153) 2024-07-29 19:17:25 +03:00
Saki Takamachi
28080dce62
round(): Corrected test name and fixed UPGRADING (#14943)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2024-07-29 20:39:35 +09:00
Peter Kokot
7fd54f9d12
Remove duplicate ZEND_ENABLE_STATIC_TSRMLS_CACHE flag (#15080) 2024-07-29 10:17:23 +02:00
Peter Kokot
9ea290b72b
Sync HAVE_ICONV preprocessor macro usage (#15148)
HAVE_ICONV marks that PHP extension 'iconv' is available, and not only
that iconv library or its functions/headers are available.
2024-07-29 10:12:57 +02:00
Peter Kokot
7d927075ea
Autotools: Sync shared argument CS (#15141)
The 3rd argument of the PHP_NEW_EXTENSION can be "shared" or "yes" to
mark the extension as shared, or anything else to mark that extension as
not shared. This syncs the argument values across the build system to be
"no" as in other always-enabled extensions.
2024-07-29 10:12:32 +02:00
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