1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00
Commit Graph

1531 Commits

Author SHA1 Message Date
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
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
Niels Dossche 89be689f77 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix memory leaks when returning refcounted value from curl callback
2025-06-21 00:37:57 +02:00
Niels Dossche ca487ae131 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leaks when returning refcounted value from curl callback
2025-06-21 00:37:51 +02:00
Niels Dossche c6b058b7d2 Fix memory leaks when returning refcounted value from curl callback
Closes GH-18883.
2025-06-21 00:31:37 +02:00
Niels Dossche 029a78813d Simplify callers of zval_try_get_long() (#18830)
Since 2b383848 references are handled properly by the Zend API, so we
can simplify the callers by removing reference handling from there.
2025-06-12 17:49:22 +02:00
Peter Kokot ae92b85572 Fix linking ext/curl against OpenSSL (#13262)
This is backport for 8.3 of b222c020bf
that originally targeted only 8.4+. This is however a bug fix.

Following 68f6ab7113, the ext/curl doesn't
need to be linked against OpenSSL anymore, if curl_version_info_data
ssl_version is OpenSSL/1.1 or later.

With OpenSSL 3 and later the check for old SSL crypto locking callbacks
was detected here.

This also uses a common PHP_SETUP_OPENSSL macro for checking OpenSSL and
syncs the minimum OpenSSL version (currently 1.0.2 or later) across the
PHP build system.
2025-06-06 13:51:21 +02:00
Niels Dossche a84cc91682 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix memory leak when curl_slist_append() fails
2025-05-31 11:14:19 +02:00
Niels Dossche b2d107db4f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak when curl_slist_append() fails
2025-05-31 11:14:13 +02:00
Niels Dossche d9d991928f Fix memory leak when curl_slist_append() fails
If curl_slist_append() returns NULL, then the original pointer is lost
and not freed.

Closes GH-18711.
2025-05-31 11:11:54 +02:00
Ayesh Karunaratne 8e46d9a03a ext/curl: format Caddyfile 2025-05-29 01:49:09 +05:30
David Carlier 07959fc007 Merge branch 'PHP-8.4' 2025-05-02 21:33:02 +01:00
David Carlier 351face053 Merge branch 'PHP-8.3' into PHP-8.4 2025-05-02 21:32:20 +01:00
David Carlier 24ab0f1ea1 Fixed GH-18458: Authorization set with CURLOPT_USERPWD with NULL value.
Close GH-18460
2025-05-02 21:31:50 +01:00
David Carlier d9d58c9d79 Revert "Fixed GH-18458: Authorization set with CURLOPT_USERPWD with NULL value."
This reverts commit bb431f124c.
2025-04-29 22:48:16 +01:00
David Carlier bb431f124c Fixed GH-18458: Authorization set with CURLOPT_USERPWD with NULL value. 2025-04-29 22:41:32 +01:00
David Carlier ad65698a48 ext/curl: CURLOPT_FOLLOWLOCATION option handling.
it had been considered as boolean for years but since 8.13, it can
accept values beyond 1L, respectively CURLFOLLOW_OBEYCODE and
CURLFOLLOW_FIRSTONLY.

close GH-18444
2025-04-29 21:53:38 +01:00