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

1546 Commits

Author SHA1 Message Date
Peter Kokot
f17c5ad83b Windows build: Add new function CHECK_HEADER() (#21191)
The current function `CHECK_HEADER_ADD_INCLUDE()` automatically defines
`HAVE_<HEADER_NAME_H>` preprocessor macros, which makes it difficult to
sync with other build systems. Specially, if some `HAVE_` macro is used
in the code and this function defines this macro but Autotools doesn't.

The new `CHECK_HEADER()` function behaves similar except it doesn't
define the `HAVE_<HEADER_NAME_H>` preprocessor macro.

This removes the following unused compile definitions:

HAVE_ARGON2_H
HAVE_AVIF_H
HAVE_BZLIB_H
HAVE_CAPSTONE_CAPSTONE_H
HAVE_CURL_EASY_H
HAVE_DB_H
HAVE_DECODE_H
HAVE_DEPOT_H
HAVE_EDITLINE_READLINE_H
HAVE_ENCHANT_H
HAVE_ENCODE_H
HAVE_FFI_H
HAVE_FIREBIRD_INTERFACE_H
HAVE_FT2BUILD_H
HAVE_GD_H
HAVE_GLIB_H
HAVE_GMP_H
HAVE_HTTPD_H
HAVE_IBASE_H
HAVE_IR_IR_H
HAVE_KECCAKHASH_H
HAVE_LBER_H
HAVE_LDAP_H
HAVE_LIBEXSLT_EXSLT_H
HAVE_LIBINTL_H
HAVE_LIBPQ_FE_H
HAVE_LIBTIDY_TIDY_H
HAVE_LIBXML_PARSER_H
HAVE_LIBXML_TREE_H
HAVE_LIBXML_XMLWRITER_H
HAVE_LIBXSLT_XSLT_H
HAVE_LMDB_H
HAVE_MBSTRING_H
HAVE_MYSQL_H
HAVE_ONIGURUMA_H
HAVE_OPENSSL_SSL_H
HAVE_PNG_H
HAVE_SNMP_H
HAVE_SODIUM_H
HAVE_SQLITE3_H
HAVE_SQLITE3EXT_H
HAVE_SYBFRONT_H
HAVE_TIDY_H
HAVE_TIDY_TIDY_H
HAVE_TIDYBUFFIO_H
HAVE_TIMELIB_CONFIG_H
HAVE_UNICODE_USPOOF_H
HAVE_UNICODE_UTF_H
HAVE_XPM_H
HAVE_ZIP_H
HAVE_ZIPCONF_H
HAVE_ZLIB_H

The following compile definitions are defined explicitly:

- HAVE_ICONV_H
- HAVE_MSCOREE_H
- HAVE_SQL_H
- HAVE_SQLEXT_H

Additionally, the `SETUP_OPENSSL()` function doesn't accept the 6th
argument anymore.
2026-03-03 20:06:40 +01:00
Ilija Tovilo
5728a37871 Merge branch 'PHP-8.5'
* PHP-8.5:
  [skip ci] Mark curl_persistent_share_002.phpt as not repeatable
2026-02-18 13:52:00 +01:00
Ilija Tovilo
27b41d310d [skip ci] Mark curl_persistent_share_002.phpt as not repeatable
The repeated request will re-use the connection from the first one, failing the
connect_time check.
2026-02-18 13:50:02 +01:00
ndossche
76445cabc0 Merge branch 'PHP-8.5'
* PHP-8.5:
  curl: Don't truncate length
2026-02-17 23:16:32 +01:00
ndossche
ed4ae182b5 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  curl: Don't truncate length
2026-02-17 23:16:25 +01:00
Niels Dossche
e2059a4697 curl: Don't truncate length
Truncating to an int seems dangerous, esp. in combination with a MIN
macro. I don't see a reason to truncate the length from size_t to int,
and especially no reason to change the signedness.

Closes GH-20747.
2026-02-17 23:15:55 +01:00
Arshid
cdae6c38f6 Return from curl_setopt() with RETURN_BOOL() (GH-21136) 2026-02-05 15:14:52 +01:00
David Carlier
4876148bbe Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-21023: CURLOPT_XFERINFOFUNCTION with invalid callback crash.
2026-01-30 13:10:35 +00:00
David Carlier
2b89919a5d Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-21023: CURLOPT_XFERINFOFUNCTION with invalid callback crash.
2026-01-30 13:10:27 +00:00
David Carlier
b156471a30 Fix GH-21023: CURLOPT_XFERINFOFUNCTION with invalid callback crash.
we check the FCC is properly initialised beforehand in its handler.

close GH-21025
2026-01-30 13:09:44 +00:00
Arnaud Le Blanc
65b4073922 Include the actual stub name in generated arginfo headers (#20993) 2026-01-21 20:57:00 +01:00
Giovanni Giacobbi
fd0ed00ff3 curl: Deduplicate features array 2026-01-03 18:49:23 +00:00
Giovanni Giacobbi
50af7c7373 curl: Fix coding style 2026-01-03 18:49:23 +00:00
Jakub Zelenka
a859ba30b5 Merge branch 'PHP-8.5'
* PHP-8.5:
  Update NEWS entry for curl 8.16 update
  Update NEWS with info about curl 8.16 compat fixes
  Fix curl_setopt_ssl test for curl 8.16
  Fix more curl 8.16 issues
  Fix curl 8.16.0 compilation with zts
  Fix curl build failure on macOS+curl 8.16
2025-10-07 14:43:56 +02:00
Jakub Zelenka
11a0fdd2db Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Update NEWS entry for curl 8.16 update
  Update NEWS with info about curl 8.16 compat fixes
  Fix curl_setopt_ssl test for curl 8.16
  Fix more curl 8.16 issues
  Fix curl 8.16.0 compilation with zts
  Fix curl build failure on macOS+curl 8.16
2025-10-07 14:43:18 +02:00
Jakub Zelenka
5eb6a81b60 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Update NEWS entry for curl 8.16 update
  Update NEWS with info about curl 8.16 compat fixes
  Fix curl_setopt_ssl test for curl 8.16
  Fix more curl 8.16 issues
  Fix curl 8.16.0 compilation with zts
  Fix curl build failure on macOS+curl 8.16
2025-10-07 14:41:20 +02:00
Jakub Zelenka
201b358c01 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Update NEWS with info about curl 8.16 compat fixes
  Fix curl_setopt_ssl test for curl 8.16
  Fix more curl 8.16 issues
  Fix curl 8.16.0 compilation with zts
  Fix curl build failure on macOS+curl 8.16
2025-10-07 14:37:47 +02:00
Jakub Zelenka
810aed1141 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Update NEWS with info about curl 8.16 compat fixes
  Fix curl_setopt_ssl test for curl 8.16
  Fix more curl 8.16 issues
  Fix curl 8.16.0 compilation with zts
  Fix curl build failure on macOS+curl 8.16
2025-10-07 14:30:22 +02:00
Jakub Zelenka
36859ad977 Fix curl_setopt_ssl test for curl 8.16 2025-10-07 14:18:41 +02:00
Ilija Tovilo
b810a23587 Fix more curl 8.16 issues
The CURLOPT_FOLLOWLOCATION seems like a gcc bug, where the integer extension of
bool to long is lost, but I was unable to reproduce on godbolt.org.
2025-10-07 14:18:41 +02:00
Ilija Tovilo
da75e41a6f Fix curl 8.16.0 compilation with zts 2025-10-07 14:18:41 +02:00
Niels Dossche
1c8363d2bf Fix curl build failure on macOS+curl 8.16 2025-10-07 14:18:41 +02:00
Niels Dossche
57ce245e1e Reduce code bloat in arginfo by using specialised string releases (#20016)
* Reduce code bloat in arginfo by using specialised string releases

Comparing this patch to master (c7da728574),
with a plain configure command without any options:

```
   text	   data	    bss	    dec	    hex	filename
20683738	1592400	 137712	22413850	156021a	sapi/cli/php
20688522	1592400	 137712	22418634	15614ca	sapi/cli/php_old
```

We see a minor reduction of 0.023% in code size.

* Also use true for the other initialization line

* Also use specialized code for consts
2025-10-02 22:00:20 +02:00
Ilija Tovilo
7a63dcc3ca Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix more curl 8.16 issues
2025-09-23 16:42:31 +02:00
Ilija Tovilo
473ce44108 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix more curl 8.16 issues
2025-09-23 16:22:06 +02:00
Ilija Tovilo
a885372a08 Fix more curl 8.16 issues
The CURLOPT_FOLLOWLOCATION seems like a gcc bug, where the integer extension of
bool to long is lost, but I was unable to reproduce on godbolt.org.
2025-09-23 16:11:19 +02:00
Ilija Tovilo
c79d8b6449 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix curl 8.16.0 compilation with zts
2025-09-22 10:56:51 +02:00
Ilija Tovilo
74cacdd161 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix curl 8.16.0 compilation with zts
2025-09-22 10:56:40 +02:00
Ilija Tovilo
266cb7d892 Fix curl 8.16.0 compilation with zts 2025-09-22 10:55:59 +02:00
Tim Düsterhus
4b6c465588 Implement curl_copy_handle in terms of object cloning (#19841)
This prevents the implementations from going out of sync, causing bugs like
php/php-src#19813.
2025-09-17 17:03:06 +02:00
Niels Dossche
dd27cedddb Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix curl build failure on macOS+curl 8.16
2025-09-13 23:24:31 +02:00
Niels Dossche
8e1df69d34 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix curl build failure on macOS+curl 8.16
2025-09-13 23:24:22 +02:00
Niels Dossche
b46681d686 Fix curl build failure on macOS+curl 8.16
Closes GH-19820.
2025-09-13 23:22:22 +02:00
Tim Düsterhus
82e998559e Merge branch 'PHP-8.4'
* PHP-8.4:
  curl: Fix cloning of POST fields (#19813)
2025-09-12 20:56:12 +02:00
Tim Düsterhus
a94f00adc7 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  curl: Fix cloning of POST fields (#19813)
2025-09-12 20:53:48 +02:00
Tim Düsterhus
871fe600c2 curl: Fix cloning of POST fields (#19813) 2025-09-12 20:53:14 +02:00
Daniel Scherzer
699e5632b1 [RFC] Deprecate curl_share_close() (#19452)
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-12 05:49:52 -07:00
Daniel Scherzer
9b13bb1ae4 [RFC] Deprecate curl_close() (#19451)
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-12 05:44:41 -07:00
Ayesh Karunaratne
6f3bc59950 ext/curl: Add CURLOPT_SSL_SIGNATURE_ALGORITHMS option
Adds support for `CURLOPT_SSL_SIGNATURE_ALGORITHMS`[^1], supported
since Curl version 8.14.0.

[^1]: https://curl.se/libcurl/c/CURLOPT_SSL_SIGNATURE_ALGORITHMS.html

Closes GH-18692
2025-07-26 20:17:05 +02:00
DanielEScherzer
1eadf553f1 Arginfo: avoid using temporary zvals for initializing attribute values (#19141)
Instead of
* adding a zval on the stack
* initializing it
* copying the value to the attribute

Just initialize the value directly in the zend_attribute_arg
2025-07-21 13:33:51 -07:00
Emre Çalışkan
7fb6afbe9f Add support for CURLINFO_QUEUE_TIME_T in curl_getinfo() (#19147)
This patch adds support for the CURLINFO_QUEUE_TIME_T constant in the
curl_getinfo() function when compiled with libcurl >= 8.6.0.

CURLINFO_QUEUE_TIME_T This constant allows retrieving the time (in
microseconds) that the request spent in libcurl’s connection queue
before it was sent.
2025-07-17 14:56:07 +02:00
Emre Çalışkan
e84320ad75 Add support for CURLINFO_CONN_ID in curl_getinfo() (#18984)
This patch adds support for the CURLINFO_CONN_ID constant in the curl_getinfo() function when compiled with libcurl >= 8.2.0.

CURLINFO_CONN_ID allows retrieving the unique identifier of the underlying connection used in the most recent transfer. This is useful for advanced features like connection reuse tracking, diagnostics, or connection pooling implementations at the PHP level.
2025-07-16 11:08:19 +02:00
Jakub Zelenka
2ecafd41ba Remove curl OpenSSL locking for unsupported versions (#18784) 2025-07-16 11:06:21 +02:00
Daniel Scherzer
142e378618 Arginfo: add and use known strings for attribute values 2025-07-14 17:31:22 -07:00
DanielEScherzer
9225cb45ac Make zend_register_*_constant() functions return pointers, use them (#19029)
Have each of the specialized methods for registering a constant return a
pointer to the registered constant the same way that the generic
`zend_register_constant()` function does, and use those in the generated
arginfo files to avoid needing to search for a constant that was just
registered in order to add attributes to it.
2025-07-07 12:23:52 -07:00
Niels Dossche
51149b65ad Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-18990, bug #81029, bug #47314: SOAP HTTP socket not closing on object destruction
  Fix leak when path is too long in ZipArchive::extractTo()
  curl: Remove incorrect string release on error
2025-07-02 18:47:53 +02:00
Niels Dossche
764154dc75 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18990, bug #81029, bug #47314: SOAP HTTP socket not closing on object destruction
  Fix leak when path is too long in ZipArchive::extractTo()
  curl: Remove incorrect string release on error
2025-07-02 18:46:37 +02:00
Niels Dossche
11ea995ff3 curl: Remove incorrect string release on error
The string is owned by the caller, and the caller releases it.

Closes GH-18989.
2025-07-02 18:42:50 +02:00
DanielEScherzer
171501b93f Replace @deprecated with #[\Deprecated] for internal constants (#18780)
Only covers constants declared via stub files, others will be handled
separately in a later commit.

Does not include the intl extension, since that had some errors relating to the
cpp code; that extension will be updated separately.
2025-06-26 11:27:15 -07:00
DanielEScherzer
ddd33fd7e4 Generated arginfo headers: combine preprocessor conditional blocks (2) (#18667)
When global constants' or class constants' availability is based on some
preprocessor condition, the generated arginfo header files wrap the
declarations in the preprocessor `#if` conditional blocks, one per declaration,
even if they are in the same conditional block based on comments in the stub
file. Instead of having multiple conditional blocks one after the other with
the same condition, combine them into a single conditional block.
2025-06-22 14:35:28 -07:00