[PECL-CVS] [pecl-search_engine-solr] master: Add brotli and zstd checks for Windows builds

[email protected] (Shivam Mathur) Mon, 11 May 2026 07:08:53 +0000
Newsgroups php.pecl.cvs
Message-ID <[email protected]>
Author: Shivam Mathur (shivammathur)
Pusher: bix0r
Date: 2026-05-11T11:09:43+05:30

Commit: https://github.com/php/pecl-search_engine-solr/commit/8826e5b3ac30feda0f9b95cdb46c754a609bfee8
Raw diff: https://github.com/php/pecl-search_engine-solr/commit/8826e5b3ac30feda0f9b95cdb46c754a609bfee8.diff

Add brotli and zstd checks for Windows builds

This fixes the build with recent build of curl that has support for brotli and zstd encoding

Changed paths:
  M  .github/workflows/windows-tests.yml
  M  config.w32


Diff:

diff --git a/.github/workflows/windows-tests.yml b/.github/workflows/windows-tests.yml
index 2972ab2d..b7c21209 100644
--- a/.github/workflows/windows-tests.yml
+++ b/.github/workflows/windows-tests.yml
@@ -37,7 +37,7 @@ jobs:
           php-version: ${{ matrix.php-version }}
           arch: ${{ matrix.arch }}
           ts: ${{ matrix.ts }}
-          libs: 'zlib,libxml2,libcurl,libiconv,libssh2,openssl,nghttp2'
+          libs: 'zlib,libxml2,libcurl,libiconv,libssh2,openssl,nghttp2,brotli,libzstd'
   release:
     runs-on: ubuntu-latest
     needs: build
diff --git a/config.w32 b/config.w32
index fb4873d1..95eb0882 100644
--- a/config.w32
+++ b/config.w32
@@ -20,6 +20,13 @@ if(PHP_SOLR != 'no')
 		WARNING('solr was not enabled; nghttp2 library not found');
 		PHP_SOLR = "no";
 	}
+	if(!CHECK_LIB('brotlidec-static.lib;brotlidec.lib', 'solr', PHP_SOLR) ||
+		!CHECK_LIB('brotlicommon-static.lib;brotlicommon.lib', 'solr', PHP_SOLR)) {
+		WARNING('brotli libraries were not found; Accept-Encoding brotli may be unavailable');
+	}
+	if(!CHECK_LIB('libzstd_a.lib;libzstd.lib', 'solr', PHP_SOLR)) {
+		WARNING('zstd library not found; Accept-Encoding zstd may be unavailable');
+	}
 	if(!CHECK_LIB('crypt32.lib', 'solr', PHP_SOLR)) {
 		WARNING('solr was not enabled; crypt32 library not found');
 		PHP_SOLR = "no";