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

137274 Commits

Author SHA1 Message Date
Peter Kokot
1108710892 Autotools: Sync CS across the configure.ac (#15332)
- AS_* macros used where it makes it easier to read
- Redundant double quotes removed (Autoconf and shell script don't need
  these on these places directly)
- Overquoted arguments reduced in AC_RUN_IFELSE
2024-08-10 22:13:50 +02:00
Peter Kokot
e5f6387569 Autotools: Refactor pdo_mysql checks (#15334)
- Main checks wrapped in AS_CASE
- s/UNIX/Unix
- Redundant MYSQL_SOCK variable removed
2024-08-10 21:52:38 +02:00
Gina Peter Banyard
edc88ee629 ext/standard: Minor refactoring to URL scanner code (#15321) 2024-08-10 20:12:54 +01:00
Christoph M. Becker
8740fdf1f6 Support somewhat recent clang versions on Windows (GH-15324)
Prior to clang 10.0.0, `clang-cl -v` apparently always appended some
fine grained version information in parentheses[1]; this is no longer
the case, so the build fails early because the compiler version could
not be detected.  Since we never used this fine grained version info,
we no longer check for it.

As of clang 13.0.0, the `/fallback` command option has been removed[2],
so we only set the flag for older clang versions.

[1] <https://github.com/php/php-src/pull/11313#discussion_r1712097627>
[2] <https://releases.llvm.org/13.0.0/tools/clang/docs/ReleaseNotes.html#removed-compiler-flags>
2024-08-10 20:57:53 +02:00
Niels Dossche
8d7365b6f0 Fix GH-15331: dom: Element::$substitutedNodeValue test failed
Bug in libxml, amend test to accept both outputs.
2024-08-10 19:43:21 +02:00
Christoph M. Becker
9b41c8b1b5 Declare gdImageGetInterpolationMethod() for bundled GD (GH-15329)
When this function has been added to our bundled GD[1], it had been
overlooked to also declare it in gd.h, like it's done in libgd.  While
MSVC doesn't have any issues with this, clang reports an error.

[1] <03bd4333f6>
2024-08-10 16:57:48 +02:00
Niels Dossche
db5ea45f0f Fix incorrect type check in removeAttributeNode 2024-08-10 16:31:23 +02:00
Christoph M. Becker
9c537de8a5 Fix some -Wimplicit-function-declaration errors on Windows (GH-15325)
While clang is picky about these, MSVC doesn't seem to care and would
only report the calls to undeclared functions as errors during link
time.  Still, obviously, MSVC is fine with having the declarations
during compile time.
2024-08-10 16:25:28 +02:00
Arnaud Le Blanc
c02c1d4474 Change YIELD/YIELD_FROM to do not increment opline (#15328)
YIELD and YIELD_FROM increment opline before returning, but in most places
we need the opline to point to the YIELD and YIELD_FROM.

Here I change YIELD / YIELD_FROM to not increment opline. This simplifies the
code and fixes GH-15275 in a better way.

Closes GH-15328
2024-08-10 16:09:47 +02:00
Arnaud Le Blanc
60a055f0fc [ci skip] NEWS for GH-15275 2024-08-10 16:08:34 +02:00
Arnaud Le Blanc
b43dd10bbb Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] NEWS for GH-15275
  [ci skip] NEWS for GH-15275
  Fix crash during GC of suspended generator delegate (#15275)
2024-08-10 16:08:19 +02:00
Peter Kokot
2b30b22d7d Autotools: Quote PHP_CHECK_SIZEOF macro arguments
[skip ci]
2024-08-10 16:01:22 +02:00
Arnaud Le Blanc
4606202b89 [ci skip] NEWS for GH-15275 2024-08-10 15:50:21 +02:00
Arnaud Le Blanc
ba9f65bacd Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS for GH-15275
  Fix crash during GC of suspended generator delegate (#15275)
2024-08-10 15:48:43 +02:00
Arnaud Le Blanc
39bacafeed [ci skip] NEWS for GH-15275 2024-08-10 15:48:30 +02:00
Arnaud Le Blanc
c767fec2d0 Fix crash during GC of suspended generator delegate (#15275) 2024-08-10 15:46:31 +02:00
Niels Dossche
0122be574a Simplify document standalone setter (#15320)
The logic was very weird as it just should check whether the boolean is
true or not. And in fact the code is equivalent because zval_get_long()
will only return 0/1 because the type is a bool, and ZEND_NORMALIZE_BOOL
won't change that value.
2024-08-10 15:35:04 +02:00
Christoph M. Becker
ee02e4be6a Fix violation of the one definition rule in ext/com_dotnet (GH-15327)
The definition of the class entries in the internal header file is not
correct, since that file is included several times, and even the
comment above the definition hints at com_extension.c where the actual
definition is.  We fix this by declaring these variables as `extern`.
2024-08-10 15:27:32 +02:00
Christoph M. Becker
d98c4b6ebe Fix comments in win32/sendmail.c (GH-15326)
These use a mixed style of block and line comments, and clang warns
about this (`-Wcomment`), so we fix that.
2024-08-10 13:59:06 +02:00
David Carlier
d5c7f3b0e6 ext/standard: enabling feature detection auxiliary vector on OpenBSD.
close gh-15175
2024-08-10 12:36:10 +01:00
Peter Kokot
fcd4d391fa Autotools: Refactor mysqli extension checks (#15323)
- AS_* macros used
- s/UNIX/Unix
- The --with-mysql result value moved into the check when extension is
  enabled
- List of source files normalized with m4_normalize
- Redundant variables omitted
- CS synced
2024-08-10 10:08:17 +02:00
Peter Kokot
dbdc79df95 Autotools: Fix SNMP checks (#15263)
This is a follow-up of GH-15242
(0b25e26b4e)

because the usmHMAC192SHA256AuthProtocol and usmHMAC384SHA512AuthProtocol
are not functions but arrays. The AC_CHECK_DECL might be more
appropriate and portable way to find these.
2024-08-10 09:15:28 +02:00
Gina Peter Banyard
fd570fbfe8 main/streams: Voidify statbuf_from_array() (#15319)
It always returned SUCCESS
2024-08-10 00:59:37 +01:00
Niels Dossche
c426157823 Merge branch 'PHP-8.3'
* PHP-8.3:
  Add necessary SKIPIFs to new phpdbg tests
2024-08-10 01:11:14 +02:00
Niels Dossche
04adeeaef8 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add necessary SKIPIFs to new phpdbg tests
2024-08-10 01:11:09 +02:00
Niels Dossche
4d71580e00 Add necessary SKIPIFs to new phpdbg tests
Similarly to other watchpoint tests, we add SKIPIFs.
These TRACKED_ALLOC issues should be investigated though [1] [2].

[1] de5c760c69 (comments)
[2] https://github.com/php/php-src/pull/15229#pullrequestreview-2230563480
2024-08-10 01:10:01 +02:00
Niels Dossche
48bb8fe4c2 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix uninitialized value watchpoint_hit
2024-08-09 23:46:35 +02:00
Niels Dossche
76dae3d0e3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix uninitialized value watchpoint_hit
2024-08-09 23:46:30 +02:00
Niels Dossche
2e26559fcd Fix uninitialized value watchpoint_hit
Closes GH-15317.
2024-08-09 23:46:16 +02:00
David Carlier
667a5651ca Merge branch 'PHP-8.3' 2024-08-09 21:15:07 +01:00
David Carlier
de5c760c69 Merge branch 'PHP-8.2' into PHP-8.3 2024-08-09 21:12:34 +01:00
David Carlier
9aeb6761b5 Fix GH-15210: phpdbg_print_changed_zvals working on a real copy instead.
Close GH-15229
2024-08-09 21:12:11 +01:00
Ilija Tovilo
5c739acb2a [skip ci] Mark stack limit tests with high memory limit as slow 2024-08-09 20:29:58 +02:00
Kamil Tekiela
7801f40449 Deprecate mysqli_kill (#11926) 2024-08-09 19:50:35 +02:00
Gina Peter Banyard
42497c1ea5 ext/soap: Deprecate passing an int to SoapServer::addFunction() (#15310)
Also deprecate SOAP_FUNCTIONS_ALL constant.

RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_soap_functions_all_constant_and_passing_it_to_soapserveraddfunction
2024-08-09 17:41:02 +01:00
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