Commit Graph

137239 Commits

Author SHA1 Message Date
Kamil Tekiela
cbcad9fdaf
Deprecate mysqli_ping (#11945) 2024-08-09 18:32:21 +02:00
Niels Dossche
00001c4a0c
Fix GH-15292: Dynamic AVX detection is broken for MSVC
See https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
For x64, either _M_X64 or _M_AMD64 would work but I'm going with what's
already used in php-src.

Closes GH-15301.
2024-08-09 18:11:46 +02:00
Peter Kokot
3a30c29d73
Autotools: Add pkg-config support for NET-SNMP library (#15261)
NET-SNMP has pkg-config support since 5.8.1

This optionally finds the NET-SNMP library using pkg-config or falls
back to find library on the system with net-snmp-config. The configure
option argument (--with-snmp=DIR) works like before (path to the
net-snmp-config).

When explicitly using the DIR argument, the pkg-config check is silently
skipped.

When not using DIR argument, the SNMP_CFLAGS and SNMP_LIBS can be also
used to find the NET-SNMP library:

    ./configure --with-snmp \
        SNMP_CFLAGS=-I/path/to/net-snmp/include \
        SNMP_LIBS="-L/path/to/net-snmp -lnetsnmp"

Co-authored-by: Calvin Buckley <calvin@cmpct.info>
2024-08-09 18:08:32 +02:00
Peter Kokot
8044db121f
Update mysql preprocessor macros help texts (#15288)
This adds missing help texts for preprocessor macros defined in
mysqli and pdo_mysql extensions.

[skip ci]
2024-08-09 18:07:05 +02:00
Peter Kokot
72fb00b644
Update gd extension preprocessor macros help texts (#15296)
PHP_GD_CHECK_FORMAT macro 2nd argument is changed from automatic
AC_DEFINE_UNQUOTED to manual action for easier usage.
2024-08-09 18:06:02 +02:00
Gina Peter Banyard
1e3d918936
ext/core: Deprecate passing E_USER_ERROR to trigger_error() (#15308)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
2024-08-09 15:51:07 +01:00
Kamil Tekiela
42336e1359
Deprecate mysqli_refresh (#11929) 2024-08-09 15:47:49 +01:00
Peter Kokot
bd77462c7c
Update sqlite3 and pdo_sqlite preprocessor macros help texts (#15291) 2024-08-09 14:51:05 +02:00
Peter Kokot
d7a8a04eb9
Autotools: Remove too basic optimization flag cleanup
The optimization flags are removed in configure.ac when using the
'--enable-debug' configure option (which also adds the '-O0'). When
using '--enable-debug-assertions' option, the optimization flags ideally
shouldn't be removed and this case never actually happen because the
CFLAGS at this point in ZEND_INIT contain all sorts of other flags also,
so it's redundant as it never gets executed.

Closes GH-15305
2024-08-09 13:56:08 +02:00
Ilija Tovilo
46ee0fb304
Disallow indirect modification on readonly properties within __clone() (#15012)
Indirect modification isn't allowed in __construct() because it allows
references to leak, so it doesn't make much sense to allow it in __clone().
2024-08-09 11:56:16 +02:00
Ilija Tovilo
7a2d5efa0f
[JIT] Avoid generating fast property assign path for readonly properties (#15260)
readonly properties will usually be IS_UNDEF on assignment, dodging the fast
path anyway. The fast path does not handle the readonly scope check. The
alternative would be handling scope there, but since there are some many
variants that might be more trouble than it's worth.
2024-08-09 11:49:40 +02:00
Peter Kokot
42c9963133
Autotools: Quote PHP_CXX_COMPILE_STDCXX macro arguments
[skip ci]
2024-08-09 10:39:16 +02:00
Peter Kokot
36f6a20a6b
Autotools: Quote AC_CHECK_PROG* macro arguments
[skip ci]
2024-08-09 10:27:04 +02:00
Peter Kokot
04a67cd86c
Autotools: Normalize phpdbg list of source files (#15306) 2024-08-09 10:22:37 +02:00
Peter Kokot
e8f2e530b0
Autotools: Sync CS in hash extension (#15302)
- AS_* macros used
- list of source files added to argument directly and normalized with
  m4_normalize()
- hash_sha3.c source file simplified
2024-08-09 01:45:50 +02:00
Peter Kokot
5c870751f2
Autotools: Sync CS in Zend.m4 (#15304)
- Autoconf sets the GCC variable to either "yes" if GNU C compatible
  compiler is detected (like gcc or clang) or to an empty value
  otherwise.
- AX_CHECK_COMPILE_FLAG arguments quoted and empty arguments trimmed
2024-08-09 01:38:42 +02:00
Peter Kokot
02e22a5d09
Autotools: Remove DEBUG_CFLAGS (#15300)
DEBUG_CFLAGS is at this point redundant variable.
2024-08-09 01:21:44 +02:00
Gina Peter Banyard
25b4696530
ext/xml: Deprecate xml_set_object() and passing non-callable strings as handlers (#15293) 2024-08-08 23:37:49 +01:00
Tim Düsterhus
6eca7839af
hash: Add SHA-NI implementation of SHA-256 (#15152)
* hash: Add SSE2 implementation of SHA-256

Implementation taken from
tarsnap/libcperciva@661752aee8.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>

* zend_cpuinfo: Add ZEND_CPU_FEATURE_SHA

* hash: Add SHA-NI implementation of SHA-256

Implementation taken from
tarsnap/libcperciva@661752aee8.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

* NEWS / UPGRADING

---------

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2024-08-08 22:19:33 +02:00
Peter Kokot
a355c3572e
Update and sync PHP build preprocessor macros help texts (#15298)
[skip ci]
2024-08-08 21:31:57 +02:00
Niels Dossche
a5c834219b
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15268: heap buffer overflow in phpdbg (zend_hash_num_elements() Zend/zend_hash.h)
2024-08-08 20:35:57 +02:00
Niels Dossche
47e4991d38
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15268: heap buffer overflow in phpdbg (zend_hash_num_elements() Zend/zend_hash.h)
2024-08-08 20:35:50 +02:00
Niels Dossche
a6c547d1dd
Fix GH-15268: heap buffer overflow in phpdbg (zend_hash_num_elements() Zend/zend_hash.h)
The class is not yet linked, so we cannot access `parent`, but only
`parent_name`.

Closes GH-15277.
2024-08-08 20:35:20 +02:00
Gina Peter Banyard
c8b45aa59a
ext/spl: Follow-up on GH-9704 (#15295)
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2024-08-08 19:31:51 +01:00
Gina Peter Banyard
bb2836eced
ext/dba: Deprecate passing null|false to dba_key_split() (#15297)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_null_and_false_to_dba_key_split
2024-08-08 18:59:30 +01:00
Niels Dossche
746b1cf43e
Access long value directly for call to count() in simplexml (#15278)
Because the signature is checked at compile time, we know that the only
possible return value (if there is no exception) is IS_LONG. So we can
avoid some work.
2024-08-08 19:28:03 +02:00
Tyson Andre
43def0af46
Deprecate SplFixedArray::__wakeup() (#9704)
GH-9354 added the `__serialize` and `__unserialize` method,
so unserialize() and other unserializers will call `__unserialize`
instead of `__wakeup` for SplFixedArray and userland subclasses.

RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_splfixedarraywakeup
2024-08-08 16:16:42 +01:00
Peter Kokot
80ae7f7979
Update pgsql extensions preprocessor macros help texts (#15290)
[skip ci]
2024-08-08 16:14:43 +02:00
Ilija Tovilo
c68b43c71b
[skip ci] Add UPGRADING.INTERNALS note for ZEND_DIM_ALTERNATIVE_SYNTAX 2024-08-08 10:33:40 +02:00
Tim Düsterhus
41bdcc87ec
Merge branch 'PHP-8.3'
* PHP-8.3:
  Update ci actions/checkout to v4 (#15283)
2024-08-08 09:58:16 +02:00
Tim Düsterhus
6291cab8da
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Update ci actions/checkout to v4 (#15283)
2024-08-08 09:57:53 +02:00
disservin
9bfe36508d
Update ci actions/checkout to v4 (#15283)
see 45e60e585e
see 69dbfadd1e
2024-08-08 09:57:31 +02:00
Peter Kokot
bf5de048e0
Update ext/tidy preprocessor macros help texts (#15269)
[skip ci]
2024-08-08 08:29:43 +02:00
Peter Kokot
f661223685
Update ext/sodium preprocessor macro help texts (#15270)
The sodium extension was initially named "libsodium" in PECL and was
renamed to sodium when it was bundled to php-src. The HAVE_LIBSODIUMLIB
symbol here could indicate that PHP extension sodium is available.

Otherwise the macro is not used in the current code base. Header
php_libsodium.h became "installed"/public as of PHP-8.4.

[skip ci]
2024-08-08 08:27:22 +02:00
David Carlier
f503cc0234
Merge branch 'PHP-8.3' 2024-08-07 22:38:48 +01:00
David Carlier
cad0ce5382
CI disable leak sanitizer on two libedit tests temporarily.
the libedit dependency has a leak on wcsdup call on ubuntu focal

close GH-15279
2024-08-07 22:38:30 +01:00
Peter Kokot
ca57d763ce
Update ext/zip preprocessor macros help texts (#15271)
[skip ci]
2024-08-07 17:03:59 +02:00
Christoph M. Becker
2832b4254c
Fix nightly Windows builds regarding CRT and runners (GH-15273)
Only the master branch should use vs17; older branches still should
stick with vs16.  And while not strictly necessary, older branches
should better stick with windows-2019 runners.
2024-08-07 15:44:53 +02:00
Christoph M. Becker
2190353b08
Merge branch 'PHP-8.3'
* PHP-8.3:
  zend_enum: Rename try parameter to avoid conflict with C++
2024-08-07 14:56:19 +02:00
Christoph M. Becker
aa709dc05b
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  zend_enum: Rename try parameter to avoid conflict with C++
2024-08-07 14:55:14 +02:00
Christoph M. Becker
423fc811bd
zend_enum: Rename try parameter to avoid conflict with C++
`try` is a keyword in C++, and as such C++ code including <zend_enum.h>
fails to compile unless a workaround is in place.  To resolve this, we
simply rename the parameter.

We choose `try_from` to make it clear that this parameter is true when
the function is called from `BackedEnum::tryFrom()`.  For consistency,
we also rename the `try` parameter of `zend_enum_from_base()`, although
that function is not exported.

This issue had been reported by @oplanre, who also provided an initial
PR.

Closes GH-15259.
2024-08-07 14:54:35 +02:00
Niels Dossche
027b210d42
Merge branch 'PHP-8.3'
* PHP-8.3:
  Revert "Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)"
2024-08-07 10:04:58 +02:00
Niels Dossche
1d56340831
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Revert "Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)"
2024-08-07 10:03:35 +02:00
Niels Dossche
28290655e8
Revert "Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)"
This reverts commit 476706165a.

Although the fix is correct, people are relying on the bug and their
code stopped working, see GH-15252.
2024-08-07 10:03:12 +02:00
Peter Kokot
a49e0a42a1
Autotools: Quote AC_PATH_PROG arguments in ext/pdo_firebird
[skip ci]
2024-08-07 09:19:40 +02:00
Peter Kokot
5fc68d8bab
Update preprocessor macros help texts for enchant and snmp extensions (#15255)
[skip ci]
2024-08-06 23:22:28 +02:00
Peter Kokot
84e1920c12
Autotools: Add phpized configure log and help separators (#15251)
- This quotes all PHP_CONFIGURE_PART arguments
- When configuring and building extensions with phpize, this makes the
  './configure --help' and './configure' log output a bit more readable
  as it separates the extension configuration, Libtool configuration and
  the rest of the Autoconf and phpize configuration options.
- The ./configure output separators bold tags are moved to the
  PHP_INIT_BUILD_SYSTEM macro to be available also in phpized extensions
- The obsolete ticks `...` converted to the recommended $(...); Autoconf
  configure re-executes itself in shells where the $(...) still wouldn't
  work ok. For example, the default, initial, non-updated shell on
  Solaris 10.
- Empty new lines in help separators synced (Autoconf default separators
  don't include additional empty newline after the separator title);
  so the PHP_HELP_SEPARATOR additional empty line is also removed
  (see './configure --help' output)
2024-08-06 22:15:22 +02:00
Niels Dossche
74eff98c84
Deprecate passing incorrect data types for options to ext/hash functions (#15236)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_incorrect_data_types_for_options_to_exthash_functions
2024-08-06 19:13:09 +02:00
Quentin Dreyer
7b32a145d9
Fix GH-15155: Keep stream context in filtered streams
Closes GH-15156
2024-08-06 16:42:33 +01:00
Christoph M. Becker
af8ef4c5b0
Update Windows CI to build with vs17
PHP 8.4 is supposed to be built with vs17 (aka. Visual Studio 2022)[1],
so we also do this for CI.

We mark gh8841.phpt as xfail for known reasons.

[1] <https://windows.php.net/>
2024-08-06 17:19:08 +02:00