From 991c404d93eea8175a79de8a7536c00fa5c32f2b Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 9 Jun 2022 11:07:37 +0200 Subject: [PATCH 01/16] changelog --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ package.xml | 46 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 93 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b76f56d..d113f31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,53 @@ # ChangeLog v3 +## 3.3.0, 2022-MM-DD + +* Fix http\Client::requeue() not updating response callback +* Backport bug fixes and features from v4: + * Fixed configure reliably finding the right libcurl features available + * Fixed cookie handling with libcurl 7.77+ and consistently across all + supported libcurl versions (follow-up to gh issue #116) + * Fixed cookies failing with libcurl >= 7.77 (see gh issue #116) + * Fixed tests using $_ENV instead of getenv() to find executables in PATH (see gh issue #113) + * Fixed configure on systems which do not provide icu-config + * Fixed gh-issue #89: Cookie handling cannot be disabled since v3.2.1 + * Added http\Env::reset(): resets internal HTTP request cache (see gh issue #90) + * Added request options: + * http\Client\Curl::$abstract_unix_socket + * http\Client\Curl::$altsvc + * http\Client\Curl::$altsvc_ctrl + * http\Client\Curl::$aws_sigv4 + * http\Client\Curl::$doh_url + * http\Client\Curl::$dns_shuffle_addresses + * http\Client\Curl::$haproxy_protocol + * http\Client\Curl::$hsts + * http\Client\Curl::$hsts_ctrl + * http\Client\Curl::$http09_allowed + * http\Client\Curl::$maxage_conn + * http\Client\Curl::$pinned_publickey + * http\Client\Curl::$proxy_ssl + * http\Client\Curl::$socks5_auth + * http\Client\Curl::$tcp_fastopen + * http\Client\Curl::$tls13_ciphers + * http\Client\Curl::$xoauth2_bearer + * Added request option constants: + * http\Client\Curl\AUTH_AWS_SIGV4 + * http\Client\Curl\AUTH_BEARER + * http\Client\Curl\AUTH_NONE + * http\Client\Curl\HTTP_VERSION_2_PRIOR_KNOWLEDGE + * http\Client\Curl\HTTP_VERSION_3 + * http\Client\Curl\SSL_VERSION_MAX_* + * http\Client\Curl\SSL_VERSION_TLSv1_3 + * Added library version constants: + * http\Client\Curl\Versions\BROTLI + * http\Client\Curl\Versions\CAINFO + * http\Client\Curl\Versions\CAPATH + * http\Client\Curl\Versions\HYPER + * http\Client\Curl\Versions\ICONV + * http\Client\Curl\Versions\NGHTTP2 + * http\Client\Curl\Versions\QUIC + * http\Client\Curl\Versions\ZSTD + ## 3.2.5, 2022-02-25 * Fixed gh-issue #123: Segfault with libcurl 7.81 diff --git a/package.xml b/package.xml index 0576cf2..321efde 100644 --- a/package.xml +++ b/package.xml @@ -42,7 +42,51 @@ https://mdref.m6w6.name/http BSD-2-Clause = 7.77 (see gh issue #116) + * Fixed tests using $_ENV instead of getenv() to find executables in PATH (see gh issue #113) + * Fixed configure on systems which do not provide icu-config + * Fixed gh-issue #89: Cookie handling cannot be disabled since v3.2.1 + * Added http\Env::reset(): resets internal HTTP request cache (see gh issue #90) + * Added request options: + * http\Client\Curl::$abstract_unix_socket + * http\Client\Curl::$altsvc + * http\Client\Curl::$altsvc_ctrl + * http\Client\Curl::$aws_sigv4 + * http\Client\Curl::$doh_url + * http\Client\Curl::$dns_shuffle_addresses + * http\Client\Curl::$haproxy_protocol + * http\Client\Curl::$hsts + * http\Client\Curl::$hsts_ctrl + * http\Client\Curl::$http09_allowed + * http\Client\Curl::$maxage_conn + * http\Client\Curl::$pinned_publickey + * http\Client\Curl::$proxy_ssl + * http\Client\Curl::$socks5_auth + * http\Client\Curl::$tcp_fastopen + * http\Client\Curl::$tls13_ciphers + * http\Client\Curl::$xoauth2_bearer + * Added request option constants: + * http\Client\Curl\AUTH_AWS_SIGV4 + * http\Client\Curl\AUTH_BEARER + * http\Client\Curl\AUTH_NONE + * http\Client\Curl\HTTP_VERSION_2_PRIOR_KNOWLEDGE + * http\Client\Curl\HTTP_VERSION_3 + * http\Client\Curl\SSL_VERSION_MAX_* + * http\Client\Curl\SSL_VERSION_TLSv1_3 + * Added library version constants: + * http\Client\Curl\Versions\BROTLI + * http\Client\Curl\Versions\CAINFO + * http\Client\Curl\Versions\CAPATH + * http\Client\Curl\Versions\HYPER + * http\Client\Curl\Versions\ICONV + * http\Client\Curl\Versions\NGHTTP2 + * http\Client\Curl\Versions\QUIC + * http\Client\Curl\Versions\ZSTD ]]> -- 2.30.2 From b03233ec64943f70146131b1a8c46988be8f25e3 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 9 Jun 2022 11:09:45 +0200 Subject: [PATCH 02/16] changelog --- CHANGELOG.md | 4 ++++ package.xml | 6 +++--- php_http.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 571b488..a3da485 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # ChangeLog v4 +## 4.2.3, 2022-MM-DD + +* Fix http\Client::requeue() not updating response callback + ## 4.2.2, 2022-02-25 * Fixed gh-issue #123: Segfault with libcurl 7.81 diff --git a/package.xml b/package.xml index 2c8b432..73e8c18 100644 --- a/package.xml +++ b/package.xml @@ -31,9 +31,9 @@ https://mdref.m6w6.name/http mike@php.net yes - 2022-02-25 + 2022-06-10 - 4.2.2 + 4.2.3 4.2.0 @@ -42,7 +42,7 @@ https://mdref.m6w6.name/http BSD-2-Clause diff --git a/php_http.h b/php_http.h index f4b4b33..0665b9c 100644 --- a/php_http.h +++ b/php_http.h @@ -13,7 +13,7 @@ #ifndef PHP_EXT_HTTP_H #define PHP_EXT_HTTP_H -#define PHP_PECL_HTTP_VERSION "4.2.2" +#define PHP_PECL_HTTP_VERSION "4.2.3dev" extern zend_module_entry http_module_entry; #define phpext_http_ptr &http_module_entry -- 2.30.2 From a6785d51967e49fca5a096a12d70f72f88205623 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 10 Jun 2022 09:32:22 +0200 Subject: [PATCH 03/16] release v4.2.3 * Fix http\Client::requeue() not updating response callback --- .gitignore | 1 + CHANGELOG.md | 2 +- php_http.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a20dd1d..99028c9 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,4 @@ vendor/ /tests/helper/server.log *gcov *lcov +.vscode diff --git a/CHANGELOG.md b/CHANGELOG.md index a3da485..f8b483b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # ChangeLog v4 -## 4.2.3, 2022-MM-DD +## 4.2.3, 2022-06-10 * Fix http\Client::requeue() not updating response callback diff --git a/php_http.h b/php_http.h index 0665b9c..58fdc27 100644 --- a/php_http.h +++ b/php_http.h @@ -13,7 +13,7 @@ #ifndef PHP_EXT_HTTP_H #define PHP_EXT_HTTP_H -#define PHP_PECL_HTTP_VERSION "4.2.3dev" +#define PHP_PECL_HTTP_VERSION "4.2.3" extern zend_module_entry http_module_entry; #define phpext_http_ptr &http_module_entry -- 2.30.2 From 6d755d36c3b140d60b2eef577d90cacee656a7ed Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 24 May 2023 12:57:19 +0200 Subject: [PATCH 04/16] ci: update versions --- .github/workflows/ci.yml | 173 +++++--- .github/workflows/curl-matrix.yml | 446 +++++--------------- scripts/curlver.dist | 12 +- scripts/gen_github_workflow_ci.php | 20 +- scripts/gen_github_workflow_curl-matrix.php | 8 +- 5 files changed, 251 insertions(+), 408 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ed701c..e04f594 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,25 +8,29 @@ on: jobs: next-0: - name: "next-0 (8.1)" + name: "next-0 (master)" + continue-on-error: true env: - PHP: "8.1" + PHP: "master" enable_debug: "yes" enable_zts: "yes" enable_iconv: "yes" TEST_PHP_ARGS: "-d error_reporting=24575" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Info + run: | + locale -a && locale - name: Install run: | sudo apt-get install -y \ php-cli \ php-pear \ libcurl4-openssl-dev \ - libidn11-dev \ + libidn-dev \ libidn2-0-dev \ libicu-dev \ libevent-dev \ @@ -43,27 +47,28 @@ jobs: run: | make -f scripts/ci/Makefile test - next-1: - name: "next-1 (master)" - continue-on-error: true + old-0: + name: "old-0 (8.1)" env: - PHP: "master" + PHP: "8.1" enable_debug: "yes" enable_zts: "yes" enable_iconv: "yes" - TEST_PHP_ARGS: "-d error_reporting=24575" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Info + run: | + locale -a && locale - name: Install run: | sudo apt-get install -y \ php-cli \ php-pear \ libcurl4-openssl-dev \ - libidn11-dev \ + libidn-dev \ libidn2-0-dev \ libicu-dev \ libevent-dev \ @@ -80,28 +85,69 @@ jobs: run: | make -f scripts/ci/Makefile test - cur-none-0: - name: "cur-none-0 (8.0)" + old-1: + name: "old-1 (8.0)" env: PHP: "8.0" + enable_debug: "yes" + enable_zts: "yes" + enable_iconv: "yes" + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Info + run: | + locale -a && locale + - name: Install + run: | + sudo apt-get install -y \ + php-cli \ + php-pear \ + libcurl4-openssl-dev \ + libidn-dev \ + libidn2-0-dev \ + libicu-dev \ + libevent-dev \ + libbrotli-dev \ + re2c + - name: Prepare + run: | + make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php + make -f scripts/ci/Makefile pecl PECL=m6w6/ext-raphf.git:raphf:master + - name: Build + run: | + make -f scripts/ci/Makefile ext PECL=http + - name: Test + run: | + make -f scripts/ci/Makefile test + + cur-none-0: + name: "cur-none-0 (8.2)" + env: + PHP: "8.2" with_http_libicu_dir: "no" with_http_libidn_dir: "no" with_http_libidn2_dir: "no" with_http_libcurl_dir: "no" with_http_libevent_dir: "no" with_http_libbrotli_dir: "no" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Info + run: | + locale -a && locale - name: Install run: | sudo apt-get install -y \ php-cli \ php-pear \ libcurl4-openssl-dev \ - libidn11-dev \ + libidn-dev \ libidn2-0-dev \ libicu-dev \ libevent-dev \ @@ -119,24 +165,27 @@ jobs: make -f scripts/ci/Makefile test cur-dbg-zts-0: - name: "cur-dbg-zts-0 (8.0)" + name: "cur-dbg-zts-0 (8.2)" env: - PHP: "8.0" + PHP: "8.2" enable_debug: "yes" enable_zts: "yes" enable_iconv: "yes" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Info + run: | + locale -a && locale - name: Install run: | sudo apt-get install -y \ php-cli \ php-pear \ libcurl4-openssl-dev \ - libidn11-dev \ + libidn-dev \ libidn2-0-dev \ libicu-dev \ libevent-dev \ @@ -154,24 +203,27 @@ jobs: make -f scripts/ci/Makefile test cur-dbg-zts-1: - name: "cur-dbg-zts-1 (8.0)" + name: "cur-dbg-zts-1 (8.2)" env: - PHP: "8.0" + PHP: "8.2" enable_debug: "no" enable_zts: "yes" enable_iconv: "yes" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Info + run: | + locale -a && locale - name: Install run: | sudo apt-get install -y \ php-cli \ php-pear \ libcurl4-openssl-dev \ - libidn11-dev \ + libidn-dev \ libidn2-0-dev \ libicu-dev \ libevent-dev \ @@ -189,24 +241,27 @@ jobs: make -f scripts/ci/Makefile test cur-dbg-zts-2: - name: "cur-dbg-zts-2 (8.0)" + name: "cur-dbg-zts-2 (8.2)" env: - PHP: "8.0" + PHP: "8.2" enable_debug: "yes" enable_zts: "no" enable_iconv: "yes" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Info + run: | + locale -a && locale - name: Install run: | sudo apt-get install -y \ php-cli \ php-pear \ libcurl4-openssl-dev \ - libidn11-dev \ + libidn-dev \ libidn2-0-dev \ libicu-dev \ libevent-dev \ @@ -224,24 +279,27 @@ jobs: make -f scripts/ci/Makefile test cur-dbg-zts-3: - name: "cur-dbg-zts-3 (8.0)" + name: "cur-dbg-zts-3 (8.2)" env: - PHP: "8.0" + PHP: "8.2" enable_debug: "no" enable_zts: "no" enable_iconv: "yes" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Info + run: | + locale -a && locale - name: Install run: | sudo apt-get install -y \ php-cli \ php-pear \ libcurl4-openssl-dev \ - libidn11-dev \ + libidn-dev \ libidn2-0-dev \ libicu-dev \ libevent-dev \ @@ -259,27 +317,30 @@ jobs: make -f scripts/ci/Makefile test cur-cov-0: - name: "cur-cov-0 (8.0)" + name: "cur-cov-0 (8.2)" env: CFLAGS: "-O0 -g --coverage" CXXFLAGS: "-O0 -g --coverage" - PHP: "8.0" + PHP: "8.2" enable_iconv: "yes" with_http_libicu_dir: "yes" with_http_libidn_dir: "no" with_http_libidn2_dir: "no" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Info + run: | + locale -a && locale - name: Install run: | sudo apt-get install -y \ php-cli \ php-pear \ libcurl4-openssl-dev \ - libidn11-dev \ + libidn-dev \ libidn2-0-dev \ libicu-dev \ libevent-dev \ @@ -302,27 +363,30 @@ jobs: bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy cur-cov-1: - name: "cur-cov-1 (8.0)" + name: "cur-cov-1 (8.2)" env: CFLAGS: "-O0 -g --coverage" CXXFLAGS: "-O0 -g --coverage" - PHP: "8.0" + PHP: "8.2" enable_iconv: "yes" with_http_libicu_dir: "no" with_http_libidn_dir: "yes" with_http_libidn2_dir: "no" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Info + run: | + locale -a && locale - name: Install run: | sudo apt-get install -y \ php-cli \ php-pear \ libcurl4-openssl-dev \ - libidn11-dev \ + libidn-dev \ libidn2-0-dev \ libicu-dev \ libevent-dev \ @@ -345,27 +409,30 @@ jobs: bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy cur-cov-2: - name: "cur-cov-2 (8.0)" + name: "cur-cov-2 (8.2)" env: CFLAGS: "-O0 -g --coverage" CXXFLAGS: "-O0 -g --coverage" - PHP: "8.0" + PHP: "8.2" enable_iconv: "yes" with_http_libicu_dir: "no" with_http_libidn_dir: "no" with_http_libidn2_dir: "yes" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Info + run: | + locale -a && locale - name: Install run: | sudo apt-get install -y \ php-cli \ php-pear \ libcurl4-openssl-dev \ - libidn11-dev \ + libidn-dev \ libidn2-0-dev \ libicu-dev \ libevent-dev \ diff --git a/.github/workflows/curl-matrix.yml b/.github/workflows/curl-matrix.yml index d66ecec..a37e548 100644 --- a/.github/workflows/curl-matrix.yml +++ b/.github/workflows/curl-matrix.yml @@ -10,12 +10,12 @@ jobs: name: curl-master continue-on-error: true env: - PHP: "8.0" + PHP: "8.2" CURL: "master" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -27,8 +27,8 @@ jobs: path: curl - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -46,7 +46,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -63,132 +63,16 @@ jobs: cd http make -f scripts/ci/Makefile test - curl-7_81_0: - name: curl-7_81_0 - continue-on-error: true - env: - PHP: "8.0" - CURL: "7_81_0" - enable_debug: "yes" - enable_iconv: "yes" - with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - with: - submodules: true - path: http - - uses: actions/checkout@v2 - with: - repository: curl/curl - path: curl - ref: curl-7_81_0 # - - name: Install - run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ - sudo apt-get update -y && \ - sudo apt-get build-dep -y libcurl4-openssl-dev && \ - sudo apt-get install -y \ - php-cli \ - php-pear \ - libidn11-dev \ - libidn2-0-dev \ - libicu-dev \ - libevent-dev \ - libbrotli-dev \ - re2c - - name: Curl - run: | - sudo chmod +x /usr/share/libtool/build-aux/ltmain.sh - sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool - cd curl - ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 - make -j2 - make install - - name: Prepare - run: | - cd http - make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php - make -f scripts/ci/Makefile pecl PECL=m6w6/ext-raphf.git:raphf:master - - name: Build - run: | - cd http - make -f scripts/ci/Makefile ext PECL=http - - name: Test - run: | - cd http - make -f scripts/ci/Makefile test - - curl-7_80_0: - name: curl-7_80_0 - continue-on-error: true - env: - PHP: "8.0" - CURL: "7_80_0" - enable_debug: "yes" - enable_iconv: "yes" - with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - with: - submodules: true - path: http - - uses: actions/checkout@v2 - with: - repository: curl/curl - path: curl - ref: curl-7_80_0 # - - name: Install - run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ - sudo apt-get update -y && \ - sudo apt-get build-dep -y libcurl4-openssl-dev && \ - sudo apt-get install -y \ - php-cli \ - php-pear \ - libidn11-dev \ - libidn2-0-dev \ - libicu-dev \ - libevent-dev \ - libbrotli-dev \ - re2c - - name: Curl - run: | - sudo chmod +x /usr/share/libtool/build-aux/ltmain.sh - sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool - cd curl - ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 - make -j2 - make install - - name: Prepare - run: | - cd http - make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php - make -f scripts/ci/Makefile pecl PECL=m6w6/ext-raphf.git:raphf:master - - name: Build - run: | - cd http - make -f scripts/ci/Makefile ext PECL=http - - name: Test - run: | - cd http - make -f scripts/ci/Makefile test - - curl-7_79_1: - name: curl-7_79_1 + curl-8_1_1: + name: curl-8_1_1 continue-on-error: true env: - PHP: "8.0" - CURL: "7_79_1" + PHP: "8.2" + CURL: "8_1_1" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -198,11 +82,11 @@ jobs: with: repository: curl/curl path: curl - ref: curl-7_79_1 # + ref: curl-8_1_1 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -220,7 +104,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -237,16 +121,16 @@ jobs: cd http make -f scripts/ci/Makefile test - curl-7_78_0: - name: curl-7_78_0 + curl-8_0_1: + name: curl-8_0_1 continue-on-error: true env: - PHP: "8.0" - CURL: "7_78_0" + PHP: "8.2" + CURL: "8_0_1" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -256,11 +140,11 @@ jobs: with: repository: curl/curl path: curl - ref: curl-7_78_0 # + ref: curl-8_0_1 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -278,7 +162,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -295,16 +179,16 @@ jobs: cd http make -f scripts/ci/Makefile test - curl-7_76_1: - name: curl-7_76_1 + curl-7_88_1: + name: curl-7_88_1 continue-on-error: true env: - PHP: "8.0" - CURL: "7_76_1" + PHP: "8.2" + CURL: "7_88_1" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -314,11 +198,11 @@ jobs: with: repository: curl/curl path: curl - ref: curl-7_76_1 # + ref: curl-7_88_1 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -336,7 +220,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -353,16 +237,16 @@ jobs: cd http make -f scripts/ci/Makefile test - curl-7_74_0: - name: curl-7_74_0 + curl-7_87_0: + name: curl-7_87_0 continue-on-error: true env: - PHP: "8.0" - CURL: "7_74_0" + PHP: "8.2" + CURL: "7_87_0" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -372,11 +256,11 @@ jobs: with: repository: curl/curl path: curl - ref: curl-7_74_0 # + ref: curl-7_87_0 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -394,7 +278,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -411,16 +295,16 @@ jobs: cd http make -f scripts/ci/Makefile test - curl-7_71_1: - name: curl-7_71_1 + curl-7_85_0: + name: curl-7_85_0 continue-on-error: true env: - PHP: "8.0" - CURL: "7_71_1" + PHP: "8.2" + CURL: "7_85_0" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -430,11 +314,11 @@ jobs: with: repository: curl/curl path: curl - ref: curl-7_71_1 # + ref: curl-7_85_0 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -452,7 +336,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -469,16 +353,16 @@ jobs: cd http make -f scripts/ci/Makefile test - curl-7_68_0: - name: curl-7_68_0 + curl-7_81_0: + name: curl-7_81_0 continue-on-error: true env: - PHP: "8.0" - CURL: "7_68_0" + PHP: "8.2" + CURL: "7_81_0" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -488,11 +372,11 @@ jobs: with: repository: curl/curl path: curl - ref: curl-7_68_0 # + ref: curl-7_81_0 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -510,7 +394,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -527,16 +411,16 @@ jobs: cd http make -f scripts/ci/Makefile test - curl-7_67_0: - name: curl-7_67_0 + curl-7_78_0: + name: curl-7_78_0 continue-on-error: true env: - PHP: "8.0" - CURL: "7_67_0" + PHP: "8.2" + CURL: "7_78_0" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -546,11 +430,11 @@ jobs: with: repository: curl/curl path: curl - ref: curl-7_67_0 # + ref: curl-7_78_0 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -568,7 +452,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -585,16 +469,16 @@ jobs: cd http make -f scripts/ci/Makefile test - curl-7_64_0: - name: curl-7_64_0 + curl-7_74_0: + name: curl-7_74_0 continue-on-error: true env: - PHP: "8.0" - CURL: "7_64_0" + PHP: "8.2" + CURL: "7_74_0" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -604,11 +488,11 @@ jobs: with: repository: curl/curl path: curl - ref: curl-7_64_0 # + ref: curl-7_74_0 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -626,7 +510,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -647,12 +531,12 @@ jobs: name: curl-7_61_1 continue-on-error: true env: - PHP: "8.0" + PHP: "8.2" CURL: "7_61_1" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -665,124 +549,8 @@ jobs: ref: curl-7_61_1 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ - sudo apt-get update -y && \ - sudo apt-get build-dep -y libcurl4-openssl-dev && \ - sudo apt-get install -y \ - php-cli \ - php-pear \ - libidn11-dev \ - libidn2-0-dev \ - libicu-dev \ - libevent-dev \ - libbrotli-dev \ - re2c - - name: Curl - run: | - sudo chmod +x /usr/share/libtool/build-aux/ltmain.sh - sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool - cd curl - ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 - make -j2 - make install - - name: Prepare - run: | - cd http - make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php - make -f scripts/ci/Makefile pecl PECL=m6w6/ext-raphf.git:raphf:master - - name: Build - run: | - cd http - make -f scripts/ci/Makefile ext PECL=http - - name: Test - run: | - cd http - make -f scripts/ci/Makefile test - - curl-7_58_0: - name: curl-7_58_0 - continue-on-error: true - env: - PHP: "8.0" - CURL: "7_58_0" - enable_debug: "yes" - enable_iconv: "yes" - with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - with: - submodules: true - path: http - - uses: actions/checkout@v2 - with: - repository: curl/curl - path: curl - ref: curl-7_58_0 # - - name: Install - run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ - sudo apt-get update -y && \ - sudo apt-get build-dep -y libcurl4-openssl-dev && \ - sudo apt-get install -y \ - php-cli \ - php-pear \ - libidn11-dev \ - libidn2-0-dev \ - libicu-dev \ - libevent-dev \ - libbrotli-dev \ - re2c - - name: Curl - run: | - sudo chmod +x /usr/share/libtool/build-aux/ltmain.sh - sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool - cd curl - ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 - make -j2 - make install - - name: Prepare - run: | - cd http - make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php - make -f scripts/ci/Makefile pecl PECL=m6w6/ext-raphf.git:raphf:master - - name: Build - run: | - cd http - make -f scripts/ci/Makefile ext PECL=http - - name: Test - run: | - cd http - make -f scripts/ci/Makefile test - - curl-7_52_1: - name: curl-7_52_1 - continue-on-error: true - env: - PHP: "8.0" - CURL: "7_52_1" - enable_debug: "yes" - enable_iconv: "yes" - with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - with: - submodules: true - path: http - - uses: actions/checkout@v2 - with: - repository: curl/curl - path: curl - ref: curl-7_52_1 # - - name: Install - run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -800,7 +568,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -821,12 +589,12 @@ jobs: name: curl-7_49_1 continue-on-error: true env: - PHP: "8.0" + PHP: "8.2" CURL: "7_49_1" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -839,8 +607,8 @@ jobs: ref: curl-7_49_1 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -858,7 +626,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -879,12 +647,12 @@ jobs: name: curl-7_31_0 continue-on-error: true env: - PHP: "8.0" + PHP: "8.2" CURL: "7_31_0" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -897,8 +665,8 @@ jobs: ref: curl-7_31_0 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -916,7 +684,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -937,12 +705,12 @@ jobs: name: curl-7_20_1 continue-on-error: true env: - PHP: "8.0" + PHP: "8.2" CURL: "7_20_1" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -955,8 +723,8 @@ jobs: ref: curl-7_20_1 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -974,7 +742,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -995,12 +763,12 @@ jobs: name: curl-7_19_7 continue-on-error: true env: - PHP: "8.0" + PHP: "8.2" CURL: "7_19_7" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -1013,8 +781,8 @@ jobs: ref: curl-7_19_7 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -1032,7 +800,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare @@ -1053,12 +821,12 @@ jobs: name: curl-7_18_2 continue-on-error: true env: - PHP: "8.0" + PHP: "8.2" CURL: "7_18_2" enable_debug: "yes" enable_iconv: "yes" with_http_libcurl_dir: "/opt" - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -1071,8 +839,8 @@ jobs: ref: curl-7_18_2 # - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ @@ -1090,7 +858,7 @@ jobs: sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare diff --git a/scripts/curlver.dist b/scripts/curlver.dist index 829777b..416cb07 100644 --- a/scripts/curlver.dist +++ b/scripts/curlver.dist @@ -1,15 +1,15 @@ -# current is 7.81.0 ATM +# current is 8.1.1 ATM # 7.21.5-7.29.0 fail to configure on gh actions -alpine: 7.78.0 7.67.0 +alpine: 8.1.1 7.78.0 centos: 7.61.1 # 7.29.0 -debian: 7.74.0 7.64.0 7.52.1 -fedora: 7.78.0 7.76.1 7.71.1 +debian: 7.88.1 7.74.0 +fedora: 7.87.0 7.85.0 other: 7.49.1 7.31.0 -ubuntu: 7.74.0 7.68.0 7.58.0 +ubuntu: 7.81.0 7.74.0 # always test against a few recent -latest: master 7.81.0 7.80.0 7.79.1 +latest: master 8.1.1 8.0.1 7.88.1 7.81.0 # and a couple ancient oldest: 7.18.2 7.19.7 7.20.1 diff --git a/scripts/gen_github_workflow_ci.php b/scripts/gen_github_workflow_ci.php index c23f23e..41ce95f 100755 --- a/scripts/gen_github_workflow_ci.php +++ b/scripts/gen_github_workflow_ci.php @@ -11,16 +11,21 @@ jobs: github([ "next" => [ -// most useful for all additional versions except current - "PHP" => ["8.1", "master"], + "PHP" => ["master"], "enable_debug" => "yes", "enable_zts" => "yes", "enable_iconv" => "yes", "TEST_PHP_ARGS" => "-d error_reporting=24575" // ignore E_DEPRECATED ], +"old" => [ + "PHP" => ["8.1", "8.0"], + "enable_debug" => "yes", + "enable_zts" => "yes", + "enable_iconv" => "yes", +], "cur-none" => [ // everything disabled for current "PHP" => $cur, @@ -62,18 +67,21 @@ foreach ($job as $id => $env) { printf(" %s: \"%s\"\n", $key, $val); } ?> - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Info + run: | + locale -a && locale - name: Install run: | sudo apt-get install -y \ php-cli \ php-pear \ libcurl4-openssl-dev \ - libidn11-dev \ + libidn-dev \ libidn2-0-dev \ libicu-dev \ libevent-dev \ diff --git a/scripts/gen_github_workflow_curl-matrix.php b/scripts/gen_github_workflow_curl-matrix.php index 66b50c9..be6748b 100755 --- a/scripts/gen_github_workflow_curl-matrix.php +++ b/scripts/gen_github_workflow_curl-matrix.php @@ -34,7 +34,7 @@ rsort($curlver, SORT_NATURAL); $gen = include __DIR__ . "/ci/gen-matrix.php"; $job = $gen->github([ "curl" => [ - "PHP" => "8.0", + "PHP" => "8.2", "CURL" => $curlver, "enable_debug" => "yes", "enable_iconv" => "yes", @@ -49,7 +49,7 @@ foreach ($job as $id => $env) { printf(" %s: \"%s\"\n", $key, $val); } ?> - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -64,8 +64,8 @@ foreach ($job as $id => $env) { - name: Install run: | - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \ - echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \ + echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \ sudo apt-get update -y && \ sudo apt-get build-dep -y libcurl4-openssl-dev && \ sudo apt-get install -y \ -- 2.30.2 From 1229a7c5017098ba11a77db5719ae0797fd67568 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 25 May 2023 12:38:32 +0200 Subject: [PATCH 05/16] tests: use more unlikely used ports --- tests/helper/server.inc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/helper/server.inc b/tests/helper/server.inc index f203ed6..b5bc3b7 100644 --- a/tests/helper/server.inc +++ b/tests/helper/server.inc @@ -7,9 +7,9 @@ function logger() { if (!ini_get("date.timezone")) { date_default_timezone_set(@date_default_timezone_get()); } - error_log(sprintf("%s(%s): %s", - basename(getenv("SCRIPT_FILENAME"), ".php"), - basename(current(get_included_files()), ".inc"), + error_log(sprintf("%s(%s): %s", + basename(getenv("SCRIPT_FILENAME"), ".php"), + basename(current(get_included_files()), ".inc"), call_user_func_array("sprintf", func_get_args()) )); } @@ -72,11 +72,11 @@ function ext_lib_name($ext) { } function serve($cb) { - /* stream_socket_server() automatically sets SO_REUSEADDR, + /* stream_socket_server() automatically sets SO_REUSEADDR, * which is, well, bad if the tests are run in parallel */ $offset = rand(0,2000); - foreach (range(8000+$offset, 9000+$offset) as $port) { + foreach (range(40000+$offset, 50000+$offset) as $port) { logger("serve: Trying port %d", $port); if (($server = @stream_socket_server("tcp://localhost:$port"))) { fprintf(STDERR, "%s\n", $port); @@ -149,28 +149,28 @@ function nghttpd($cb) { $stdin = $pipes[0]; $stdout = $pipes[1]; $stderr = $pipes[2]; - + sleep(1); $status = proc_get_status($proc); logger("nghttpd: %s", new http\Params($status)); if (!$status["running"]) { continue; } - + try { $cb($port, $stdin, $stdout, $stderr); } catch (Exception $e) { echo $e,"\n"; } - + proc_terminate($proc); - + fpassthru($stderr); fpassthru($stdout); return; } } - + } function proc($bin, $args, $cb) { @@ -186,7 +186,7 @@ function proc($bin, $args, $cb) { $port = trim(fgets($stderr)); $R = array($stderr); $W = array(); $E = array(); } while (is_numeric($port) && stream_select($R, $W, $E, 0, 10000)); - + if (is_numeric($port)) { try { $cb($port, $stdin, $stdout, $stderr); @@ -194,9 +194,9 @@ function proc($bin, $args, $cb) { echo $e,"\n"; } } - + proc_terminate($proc); - + fpassthru($stderr); fpassthru($stdout); } -- 2.30.2 From 435d451fbaaa8b88bd3215f9598b437929f57dee Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 25 May 2023 11:57:14 +0200 Subject: [PATCH 06/16] configure: libidn 1.36-1.38 has broken locale detection --- autoconf/pecl/pecl.m4 | 4 +--- config9.m4 | 13 +++++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/autoconf/pecl/pecl.m4 b/autoconf/pecl/pecl.m4 index d8735b0..cb2bb70 100644 --- a/autoconf/pecl/pecl.m4 +++ b/autoconf/pecl/pecl.m4 @@ -271,7 +271,7 @@ AC_DEFUN([PECL_CHECK_CUSTOM], [ LDFLAGS="$LDFLAGS -L$PECL_CACHE_VAR([$1_prefix])/$PHP_LIBDIR" LIBS="$LIBS -l$4" dnl PECL_EVAL_LIBLINE([$LDFLAGS $LIBS]) - + AC_CACHE_VAL(PECL_CACHE_VAR([$1_version]), [ pushd $PECL_CACHE_VAR([$1_prefix]) >/dev/null PECL_CACHE_VAR([$1_version])=$5 @@ -281,7 +281,6 @@ AC_DEFUN([PECL_CHECK_CUSTOM], [ if test -n "$PECL_CHECKED_VERSION([$1])"; then PECL_VAR([HAVE_$1])=true - PECL_DEFINE([HAVE_$1]) PECL_DEFINE_UQ($1[_VERSION], "$PECL_CHECKED_VERSION([$1])") else PECL_VAR([HAVE_$1])=false @@ -336,7 +335,6 @@ AC_DEFUN([PECL_CHECK_CONFIG], [ if test -n "$PECL_CHECKED_VERSION([$1])"; then PECL_VAR([HAVE_$1])=true - PECL_DEFINE([HAVE_$1]) PECL_DEFINE_UQ([$1_VERSION], "$PECL_CHECKED_VERSION([$1])") else PECL_VAR([HAVE_$1])=false diff --git a/config9.m4 b/config9.m4 index 695701b..35f1af1 100644 --- a/config9.m4 +++ b/config9.m4 @@ -24,7 +24,7 @@ if test "$PHP_HTTP" != "no"; then AC_CHECK_LIB(nsl, getdomainname) ]) AC_CHECK_FUNCS(mbrtowc mbtowc iswalnum inet_pton) - + CFLAGS="$CFLAGS -Wno-strict-prototypes" dnl ZLIB @@ -80,7 +80,16 @@ if test "$PHP_HTTP" != "no"; then if test "$PHP_HTTP_LIBIDN_DIR" != "no"; then PECL_CHECK_PKGCONFIG(libidn, [$PHP_HTTP_LIBIDN_DIR]) if $PECL_VAR([HAVE_LIBIDN]); then - PECL_DEFINE([HAVE_IDNA2003]) + PECL_HAVE_VERSION(libidn, 1.36, [ + PECL_HAVE_VERSION(libidn, 1.39, [ + PECL_DEFINE([HAVE_IDNA2003]) + ], [ + PECL_VAR([HAVE_LIBIDN])=false + AC_MSG_WARN([libidn locale detection broken; disabling libidn support]) + ]) + ], [ + PECL_DEFINE([HAVE_IDNA2003]) + ]) fi PECL_CHECK_DONE(libidn, $PECL_VAR([HAVE_LIBIDN])) fi -- 2.30.2 From b13eb9ae54f8df02628d1690ee1f092c5f357f75 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 24 May 2023 13:57:27 +0200 Subject: [PATCH 07/16] client_curl_user: fix arginfo --- src/php_http_client_curl_user.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/php_http_client_curl_user.c b/src/php_http_client_curl_user.c index 95ea6f5..2e646f6 100644 --- a/src/php_http_client_curl_user.c +++ b/src/php_http_client_curl_user.c @@ -22,6 +22,11 @@ typedef struct php_http_client_curl_user_ev { php_http_client_curl_user_context_t *context; } php_http_client_curl_user_ev_t; +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_user_handler, 0, 1, IS_LONG, 1) + ZEND_ARG_OBJ_INFO(0, client, "http\\Client", 0) + ZEND_ARG_TYPE_INFO(0, stream, IS_RESOURCE, 1) + ZEND_ARG_TYPE_INFO(0, action, IS_LONG, 1) +ZEND_END_ARG_INFO(); static ZEND_NAMED_FUNCTION(php_http_client_curl_user_handler) { zval *zstream = NULL, *zclient = NULL; @@ -186,6 +191,10 @@ static void *php_http_client_curl_user_init(php_http_client_t *client, void *use ctx->closure.common.type = ZEND_INTERNAL_FUNCTION; ctx->closure.common.function_name = zend_string_init(ZEND_STRL("php_http_client_curl_user_handler"), 0); ctx->closure.internal_function.handler = php_http_client_curl_user_handler; + ctx->closure.internal_function.arg_info = (zend_internal_arg_info *) &ai_user_handler[1]; + ctx->closure.internal_function.num_args = 3; + ctx->closure.internal_function.required_num_args = 1; + zend_create_closure(zclosure, &ctx->closure, NULL, NULL, NULL); -- 2.30.2 From d758be5353448f9a72764198a6bf9d86b09daa2a Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 24 May 2023 18:26:55 +0200 Subject: [PATCH 08/16] curl: CURLOPT_TLSAUTH_TYPE never accepted enum CURL_TLSAUTH :facepalm: --- autoconf/pecl/libcurl.m4 | 30 +++++---------------- scripts/gen_github_workflow_curl-matrix.php | 2 +- src/php_http_client_curl.c | 6 +++-- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/autoconf/pecl/libcurl.m4 b/autoconf/pecl/libcurl.m4 index 8de9499..f630b06 100644 --- a/autoconf/pecl/libcurl.m4 +++ b/autoconf/pecl/libcurl.m4 @@ -126,38 +126,22 @@ AC_DEFUN([PECL_HAVE_LIBCURL_SSL], [dnl ;; esac - PECL_HAVE_CONST([curl/curl.h], [CURLOPT_TLSAUTH_TYPE], int, [ - AC_CACHE_CHECK([whether CURLOPT_TLSAUTH_TYPE expects CURL_TLSAUTH_SRP], PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP]), [ - PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])= + PECL_HAVE_CONST([curl/curl.h], [CURL_VERSION_TLSAUTH_SRP], int, [ + AC_CACHE_CHECK([for CURLOPT_TLSAUTH_TYPE SRP support], PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP]), [ + PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])=no AC_TRY_RUN([ #include int main(int argc, char *argv[]) { - CURL *ch = curl_easy_init(); - return curl_easy_setopt(ch, CURLOPT_TLSAUTH_TYPE, CURL_TLSAUTH_SRP); + int has_feature = curl_version_info(CURLVERSION_NOW)->features & CURL_VERSION_TLSAUTH_SRP; + int set_failure = curl_easy_setopt(curl_easy_init(), CURLOPT_TLSAUTH_TYPE, "SRP""); + return !has_feature || set_failure; } ], [ PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])=yes - ], [ - AC_TRY_RUN([ - #include - int main(int argc, char *argv[]) { - CURL *ch = curl_easy_init(); - return curl_easy_setopt(ch, CURLOPT_TLSAUTH_TYPE, "SRP"); - } - ], [ - PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])=no - ]) ]) ]) - if test -n "$PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])"; then + if test "$PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])" = "yes"; then PECL_DEFINE([HAVE_LIBCURL_TLSAUTH_TYPE]) - if $PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP]); then - PECL_DEFINE([LIBCURL_TLSAUTH_SRP], [CURL_TLSAUTH_SRP]) - PECL_DEFINE([LIBCURL_TLSAUTH_DEF], [CURL_TLSAUTH_NONE]) - else - PECL_DEFINE([LIBCURL_TLSAUTH_SRP], ["SRP"]) - PECL_DEFINE([LIBCURL_TLSAUTH_DEF], [""]) - fi fi ]) diff --git a/scripts/gen_github_workflow_curl-matrix.php b/scripts/gen_github_workflow_curl-matrix.php index be6748b..beaa65d 100755 --- a/scripts/gen_github_workflow_curl-matrix.php +++ b/scripts/gen_github_workflow_curl-matrix.php @@ -83,7 +83,7 @@ foreach ($job as $id => $env) { sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool cd curl ./buildconf - ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 + ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap make -j2 make install - name: Prepare diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index 46502ba..156c569 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -1202,8 +1202,10 @@ static ZEND_RESULT_CODE php_http_curle_option_set_ssl_tlsauthtype(php_http_optio if (val && Z_LVAL_P(val)) { switch (Z_LVAL_P(val)) { + case CURL_TLSAUTH_NONE: + break; case CURL_TLSAUTH_SRP: - if (CURLE_OK == curl_easy_setopt(ch, opt->option, PHP_HTTP_LIBCURL_TLSAUTH_SRP)) { + if (CURLE_OK == curl_easy_setopt(ch, opt->option, "SRP")) { return SUCCESS; } /* no break */ @@ -1211,7 +1213,7 @@ static ZEND_RESULT_CODE php_http_curle_option_set_ssl_tlsauthtype(php_http_optio return FAILURE; } } - if (CURLE_OK != curl_easy_setopt(ch, opt->option, PHP_HTTP_LIBCURL_TLSAUTH_DEF)) { + if (CURLE_OK != curl_easy_setopt(ch, opt->option, "NONE")) { return FAILURE; } return SUCCESS; -- 2.30.2 From 0d535ef69ab2648132433bc9c4acf9a93114138d Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 25 May 2023 11:27:07 +0200 Subject: [PATCH 09/16] curl: newer versions omit the Expect header fixes #129 --- tests/client025.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/client025.phpt b/tests/client025.phpt index 4cb63af..21f4c2d 100644 --- a/tests/client025.phpt +++ b/tests/client025.phpt @@ -36,8 +36,8 @@ PUT / HTTP/1.1 Accept: */* Content-Length: %d Content-Range: bytes 1-2/3 -Expect: 100-continue -Host: localhost:%d +%r(Expect: 100-continue +)?%rHost: localhost:%d User-Agent: %s X-Original-Content-Length: %d -- 2.30.2 From e0eade6161307006e897acf3a862c565bdf5be39 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 25 May 2023 13:02:23 +0200 Subject: [PATCH 10/16] tests: curl SSL bug in 7.87 --- tests/client012.phpt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/client012.phpt b/tests/client012.phpt index 5dd1513..3b1e1c0 100644 --- a/tests/client012.phpt +++ b/tests/client012.phpt @@ -1,16 +1,19 @@ --TEST-- client ssl --SKIPIF-- - --FILE-- -getSslOptions() ); -$client->attach($observer = new class implements SplObserver { +$client->attach($observer = new class implements SplObserver { public $data = []; #[ReturnTypeWillChange] -- 2.30.2 From f6a4f311af4931f98481409570fa0c398fac862c Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 25 May 2023 13:50:43 +0200 Subject: [PATCH 11/16] tests: cookis broken again in 7.88.1 --- tests/client021.phpt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/client021.phpt b/tests/client021.phpt index aaf4625..f8eeeb5 100644 --- a/tests/client021.phpt +++ b/tests/client021.phpt @@ -4,8 +4,9 @@ client cookies --FILE-- -- 2.30.2 From ff2148e3f14ab76babbabc7a759fc80fefd1e769 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 2 Oct 2023 11:03:03 +0200 Subject: [PATCH 12/16] release 4.2.4 * Fix Error using ssl array in options : Could not set option tlsauthtype (see gh issue #131) * Fix arginfo wargnings of the internal curl client user handler * Disable libidn support for v1.36-v1.38 due to broken locale detection --- CHANGELOG.md | 7 +++++++ package.xml | 9 ++++++--- php_http.h | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8b483b..48f701d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # ChangeLog v4 +## 4.2.4, 2023-10-02 + +* Fix Error using ssl array in options : Could not set option tlsauthtype + (see gh issue #131) +* Fix arginfo wargnings of the internal curl client user handler +* Disable libidn support for v1.36-v1.38 due to broken locale detection + ## 4.2.3, 2022-06-10 * Fix http\Client::requeue() not updating response callback diff --git a/package.xml b/package.xml index 73e8c18..f9e4832 100644 --- a/package.xml +++ b/package.xml @@ -31,9 +31,9 @@ https://mdref.m6w6.name/http mike@php.net yes - 2022-06-10 + 2023-10-02 - 4.2.3 + 4.2.4 4.2.0 @@ -42,7 +42,10 @@ https://mdref.m6w6.name/http BSD-2-Clause diff --git a/php_http.h b/php_http.h index 58fdc27..cfa1160 100644 --- a/php_http.h +++ b/php_http.h @@ -13,7 +13,7 @@ #ifndef PHP_EXT_HTTP_H #define PHP_EXT_HTTP_H -#define PHP_PECL_HTTP_VERSION "4.2.3" +#define PHP_PECL_HTTP_VERSION "4.2.4" extern zend_module_entry http_module_entry; #define phpext_http_ptr &http_module_entry -- 2.30.2 From 88e279db21e25244ecb6b804af0a6565db4ecbf1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 29 Jan 2024 16:10:26 +0100 Subject: [PATCH 13/16] Fix incompatible pointer types --- src/php_http_url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/php_http_url.c b/src/php_http_url.c index 943a436..459396f 100644 --- a/src/php_http_url.c +++ b/src/php_http_url.c @@ -73,7 +73,7 @@ static inline char *localhostname(void) static php_http_url_t *php_http_url_from_env(void) { zval *https, *zhost, *zport; - long port; + zend_long port; php_http_buffer_t buf; php_http_buffer_init_ex(&buf, MAX(PHP_HTTP_BUFFER_DEFAULT_SIZE, sizeof(php_http_url_t)<<2), PHP_HTTP_BUFFER_INIT_PREALLOC); -- 2.30.2 From 61bceaf39e055ba23af3c901bdfc601241eb604a Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 31 May 2023 17:27:39 +0200 Subject: [PATCH 14/16] curl: update CURLINFO --- BUGS | 4 +- scripts/gen_curlinfo.php | 9 +++-- src/php_http_client_curl.c | 77 +++++++++++++++++++++++++++++++++++++- 3 files changed, 83 insertions(+), 7 deletions(-) diff --git a/BUGS b/BUGS index 4c2ad80..0b98179 100644 --- a/BUGS +++ b/BUGS @@ -2,15 +2,13 @@ Known Issues ============ Windows: - If you keep getting "SSL connect error" when trying to issue + If you keep getting "SSL connect error" when trying to issue requests, try another (newer) libeay32.dll/ssleay32.dll pair. Internals: Inflating raw deflated data causes a re-initialization of the inflate stream where the corresponding window bits are modified to tell libz to not check for zlib header bytes. This is not preventable AFAICS. - LFS dependant parts of libcurl are left out because of off_t, - respectively off64_t confusion. Persistent handles and "cookiestore" request option do interfere, as libcurl saves the cookies to the file on curl_easy_destroy(), cookies are not saved until the CURL handle will be recycled. diff --git a/scripts/gen_curlinfo.php b/scripts/gen_curlinfo.php index 92ff65e..ab4391d 100755 --- a/scripts/gen_curlinfo.php +++ b/scripts/gen_curlinfo.php @@ -42,6 +42,9 @@ $ifdefs = array( 'RETRY_AFTER' => 'PHP_HTTP_CURL_VERSION(7,66,0)', 'EFFECTIVE_METHOD' => 'PHP_HTTP_CURL_VERSION(7,72,0)', 'PROXY_ERROR' => 'PHP_HTTP_CURL_VERSION(7,73,0)', + 'REFERER' => 'PHP_HTTP_CURL_VERSION(7,76,0)', + 'CAINFO' => 'PHP_HTTP_CURL_VERSION(7,84,0)', + 'CAPATH' => 'PHP_HTTP_CURL_VERSION(7,84,0)', ); $exclude = array( 'ACTIVESOCKET', @@ -102,12 +105,12 @@ $templates = array( ', ); -$infos = file_re('curl.h', '/^\s*(CURLINFO_(\w+))\s*=\s*CURLINFO_(STRING|LONG|DOUBLE|SLIST|OFF_T)\s*\+\s*\d+\s*,?\s*$/m'); - +$infos = file_re('curl.h', '/\s*(CURLINFO_(\w+))\s*(?:CURL_DEPRECATED\(\d+\.\d+\.\d+,\s*"[\w _-]+"\))?\s*=\s*CURLINFO_(STRING|LONG|DOUBLE|SLIST|OFF_T)\s*\+\s*\d+\s*,?\s*/m'); +var_dump($infos); ob_start(); foreach ($infos as $info) { list(, $full, $short, $type) = $info; - if (in_array($short, $exclude) || substr($short, -2) === "_T") continue; + if (in_array($short, $exclude)) continue; if (isset($ifdefs[$short])) printf("#if %s\n", $ifdefs[$short]); printf($templates[$type], $full, strtolower((isset($translate[$short])) ? $translate[$short] : $short)); if (isset($ifdefs[$short])) printf("#endif\n"); diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index 156c569..4decc7a 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -367,18 +367,34 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info) ZVAL_DOUBLE(&tmp, d); zend_hash_str_update(info, "size_upload", lenof("size_upload"), &tmp); } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SIZE_UPLOAD_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "size_upload_t", lenof("size_upload_t"), &tmp); + } if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SIZE_DOWNLOAD, &d)) { ZVAL_DOUBLE(&tmp, d); zend_hash_str_update(info, "size_download", lenof("size_download"), &tmp); } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SIZE_DOWNLOAD_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "size_download_t", lenof("size_download_t"), &tmp); + } if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SPEED_DOWNLOAD, &d)) { ZVAL_DOUBLE(&tmp, d); zend_hash_str_update(info, "speed_download", lenof("speed_download"), &tmp); } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SPEED_DOWNLOAD_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "speed_download_t", lenof("speed_download_t"), &tmp); + } if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SPEED_UPLOAD, &d)) { ZVAL_DOUBLE(&tmp, d); zend_hash_str_update(info, "speed_upload", lenof("speed_upload"), &tmp); } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SPEED_UPLOAD_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "speed_upload_t", lenof("speed_upload_t"), &tmp); + } if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_HEADER_SIZE, &l)) { ZVAL_LONG(&tmp, l); zend_hash_str_update(info, "header_size", lenof("header_size"), &tmp); @@ -395,14 +411,26 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info) ZVAL_LONG(&tmp, l); zend_hash_str_update(info, "filetime", lenof("filetime"), &tmp); } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_FILETIME_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "filetime_t", lenof("filetime_t"), &tmp); + } if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d)) { ZVAL_DOUBLE(&tmp, d); zend_hash_str_update(info, "content_length_download", lenof("content_length_download"), &tmp); } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "content_length_download_t", lenof("content_length_download_t"), &tmp); + } if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CONTENT_LENGTH_UPLOAD, &d)) { ZVAL_DOUBLE(&tmp, d); zend_hash_str_update(info, "content_length_upload", lenof("content_length_upload"), &tmp); } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "content_length_upload_t", lenof("content_length_upload_t"), &tmp); + } if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_STARTTRANSFER_TIME, &d)) { ZVAL_DOUBLE(&tmp, d); zend_hash_str_update(info, "starttransfer_time", lenof("starttransfer_time"), &tmp); @@ -513,6 +541,34 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info) zend_hash_str_update(info, "scheme", lenof("scheme"), &tmp); } #endif + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_TOTAL_TIME_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "total_time_t", lenof("total_time_t"), &tmp); + } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_NAMELOOKUP_TIME_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "namelookup_time_t", lenof("namelookup_time_t"), &tmp); + } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CONNECT_TIME_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "connect_time_t", lenof("connect_time_t"), &tmp); + } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_PRETRANSFER_TIME_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "pretransfer_time_t", lenof("pretransfer_time_t"), &tmp); + } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_STARTTRANSFER_TIME_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "starttransfer_time_t", lenof("starttransfer_time_t"), &tmp); + } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_REDIRECT_TIME_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "redirect_time_t", lenof("redirect_time_t"), &tmp); + } + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_APPCONNECT_TIME_T, &o)) { + ZVAL_LONG(&tmp, o); + zend_hash_str_update(info, "appconnect_time_t", lenof("appconnect_time_t"), &tmp); + } #if PHP_HTTP_CURL_VERSION(7,66,0) if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_RETRY_AFTER, &o)) { ZVAL_LONG(&tmp, o); @@ -531,6 +587,24 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info) zend_hash_str_update(info, "proxy_error", lenof("proxy_error"), &tmp); } #endif +#if PHP_HTTP_CURL_VERSION(7,76,0) + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_REFERER, &c)) { + ZVAL_STRING(&tmp, STR_PTR(c)); + zend_hash_str_update(info, "referer", lenof("referer"), &tmp); + } +#endif +#if PHP_HTTP_CURL_VERSION(7,84,0) + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CAINFO, &c)) { + ZVAL_STRING(&tmp, STR_PTR(c)); + zend_hash_str_update(info, "cainfo", lenof("cainfo"), &tmp); + } +#endif +#if PHP_HTTP_CURL_VERSION(7,84,0) + if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CAPATH, &c)) { + ZVAL_STRING(&tmp, STR_PTR(c)); + zend_hash_str_update(info, "capath", lenof("capath"), &tmp); + } +#endif /* END::CURLINFO */ @@ -630,8 +704,9 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info) #if (PHP_HTTP_CURL_VERSION(7,19,1) && PHP_HTTP_HAVE_LIBCURL_OPENSSL) || \ (PHP_HTTP_CURL_VERSION(7,34,0) && PHP_HTTP_HAVE_LIBCURL_NSS) || \ + (PHP_HTTP_CURL_VERSION(7,39,0) && PHP_HTTP_HAVE_LIBCURL_GSKIT) || \ (PHP_HTTP_CURL_VERSION(7,42,0) && PHP_HTTP_HAVE_LIBCURL_GNUTLS) || \ - (PHP_HTTP_CURL_VERSION(7,39,0) && PHP_HTTP_HAVE_LIBCURL_GSKIT) + (PHP_HTTP_CURL_VERSION(7,79,0) && PHP_HTTP_HAVE_LIBCURL_SECURETRANSPORT) { int i; zval ci_array, subarray; -- 2.30.2 From 25e50bfda03270c424896255dfe2f54597a2b594 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 5 Feb 2024 20:16:43 +0100 Subject: [PATCH 15/16] Fix #133: Glitch in CURL_VERSION_TLSAUTH_SRP autoconf probe --- autoconf/pecl/libcurl.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoconf/pecl/libcurl.m4 b/autoconf/pecl/libcurl.m4 index f630b06..fd0e711 100644 --- a/autoconf/pecl/libcurl.m4 +++ b/autoconf/pecl/libcurl.m4 @@ -133,7 +133,7 @@ AC_DEFUN([PECL_HAVE_LIBCURL_SSL], [dnl #include int main(int argc, char *argv[]) { int has_feature = curl_version_info(CURLVERSION_NOW)->features & CURL_VERSION_TLSAUTH_SRP; - int set_failure = curl_easy_setopt(curl_easy_init(), CURLOPT_TLSAUTH_TYPE, "SRP""); + int set_failure = curl_easy_setopt(curl_easy_init(), CURLOPT_TLSAUTH_TYPE, "SRP"); return !has_feature || set_failure; } ], [ -- 2.30.2 From 145787367ace42a52a21bb91199f3af31532aca4 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 5 Feb 2024 20:36:16 +0100 Subject: [PATCH 16/16] prepare v4.2.5 * Fix incompatible pointer types (32-bit) (see gh issue #134) * Fix glitch in CURL_VERSION_TLSAUTH_SRP autoconf probe (see gh issue #133) --- CHANGELOG.md | 13 +++++++++---- package.xml | 10 ++++------ php_http.h | 4 ++-- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48f701d..47ec2a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,15 @@ # ChangeLog v4 +## 4.2.5, 2024-02-05 + +* Fix incompatible pointer types (32-bit) (see gh issue #134) +* Fix glitch in CURL_VERSION_TLSAUTH_SRP autoconf probe (see gh issue #133) + ## 4.2.4, 2023-10-02 * Fix Error using ssl array in options : Could not set option tlsauthtype (see gh issue #131) -* Fix arginfo wargnings of the internal curl client user handler +* Fix arginfo wargnings of the internal curl client user handler * Disable libidn support for v1.36-v1.38 due to broken locale detection ## 4.2.3, 2022-06-10 @@ -19,7 +24,7 @@ * Fixed failing tests with PHP-8.1 (see gh issue #120) * Fixed configure reliably finding the right libcurl features available -* Fixed cookie handling with libcurl 7.77+ and consistently across all +* Fixed cookie handling with libcurl 7.77+ and consistently across all supported libcurl versions (follow-up to gh issue #116) ## 4.2.0, 2021-08-30 @@ -66,7 +71,7 @@ * http\Client\Curl\Versions\NGHTTP2 * http\Client\Curl\Versions\QUIC * http\Client\Curl\Versions\ZSTD - + ## 4.0.0, 2021-01-13 Changes from beta1: @@ -76,7 +81,7 @@ Changes from beta1: ## 4.0.0beta1, 2020-09-23 * PHP 8 compatibility - - Drop ext-propro support: + - Drop ext-propro support: PHP 8 removes the object get/set API from the ZendEngine, which renders that extension dysfunctional. As a consequence, the header property of http\Message and derived classes cannot be modified in place, and thus diff --git a/package.xml b/package.xml index f9e4832..5daf785 100644 --- a/package.xml +++ b/package.xml @@ -31,9 +31,9 @@ https://mdref.m6w6.name/http mike@php.net yes - 2023-10-02 + 2024-02-05 - 4.2.4 + 4.2.5 4.2.0 @@ -42,10 +42,8 @@ https://mdref.m6w6.name/http BSD-2-Clause diff --git a/php_http.h b/php_http.h index cfa1160..f8cede2 100644 --- a/php_http.h +++ b/php_http.h @@ -13,14 +13,14 @@ #ifndef PHP_EXT_HTTP_H #define PHP_EXT_HTTP_H -#define PHP_PECL_HTTP_VERSION "4.2.4" +#define PHP_PECL_HTTP_VERSION "4.2.5" extern zend_module_entry http_module_entry; #define phpext_http_ptr &http_module_entry extern int http_module_number; -#endif /* PHP_EXT_HTTP_H */ +#endif /* PHP_EXT_HTTP_H */ /* * Local variables: -- 2.30.2