From 75856e361e281dc35b79aba58340c45557fcea1c Mon Sep 17 00:00:00 2001 From: Marc Date: Sat, 25 Apr 2026 21:08:08 +0700 Subject: [PATCH 1/3] Revert "fix(xlswriter): fix macOS build with modern Clang (C23)" --- src/SPC/builder/extension/xlswriter.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/SPC/builder/extension/xlswriter.php b/src/SPC/builder/extension/xlswriter.php index 8ef826d0..24d32d94 100644 --- a/src/SPC/builder/extension/xlswriter.php +++ b/src/SPC/builder/extension/xlswriter.php @@ -7,7 +7,6 @@ namespace SPC\builder\extension; use SPC\builder\Extension; use SPC\store\SourcePatcher; use SPC\util\CustomExt; -use SPC\util\GlobalEnvManager; #[CustomExt('xlswriter')] class xlswriter extends Extension @@ -29,13 +28,6 @@ class xlswriter extends Extension public function patchBeforeMake(): bool { $patched = parent::patchBeforeMake(); - - // Remove when https://github.com/viest/php-ext-xlswriter/pull/560 is merged - if (PHP_OS_FAMILY !== 'Windows') { - GlobalEnvManager::putenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS=' . getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS') . ' -std=gnu17'); - $patched = true; - } - if (PHP_OS_FAMILY === 'Windows') { // fix windows build with openssl extension duplicate symbol bug SourcePatcher::patchFile('spc_fix_xlswriter_win32.patch', $this->source_dir); @@ -48,10 +40,4 @@ class xlswriter extends Extension } return $patched; } - - // Remove when https://github.com/viest/php-ext-xlswriter/pull/560 is merged - protected function getExtraEnv(): array - { - return ['CFLAGS' => '-std=gnu17']; - } } From a78e6fa5f8606ce8d78be8071def9c64d589c9be Mon Sep 17 00:00:00 2001 From: henderkes Date: Thu, 25 Jun 2026 15:39:18 +0700 Subject: [PATCH 2/3] pin zstd, proper fix: https://github.com/kjdev/php-ext-zstd/pull/100 --- config/source.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/source.json b/config/source.json index 258b35e3..a80a5d0a 100644 --- a/config/source.json +++ b/config/source.json @@ -333,10 +333,9 @@ } }, "ext-zstd": { - "type": "git", + "type": "ghtagtar", + "repo": "kjdev/php-ext-zstd", "path": "php-src/ext/zstd", - "rev": "master", - "url": "https://github.com/kjdev/php-ext-zstd", "license": { "type": "file", "path": "LICENSE" From fe1ef6e2e024ad9d66b3905477e1053ffd08503d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jake=C5=A1?= Date: Tue, 7 Jul 2026 13:11:42 +0200 Subject: [PATCH 3/3] Enable SQLite column metadata Build Unix SQLite with SQLITE_ENABLE_COLUMN_METADATA so the metadata APIs are available on macOS and Linux. Remove the pdo_sqlite configure override that forced PHP to treat sqlite3_column_table_name() as unavailable, and add sanity checks for both SQLite compile options and PDO column metadata. --- src/SPC/builder/extension/pdo_sqlite.php | 23 ----------------------- src/SPC/builder/unix/library/sqlite.php | 7 ++++++- src/globals/ext-tests/pdo_sqlite.php | 16 ++++++++++++++++ src/globals/ext-tests/sqlite3.php | 10 ++++++++++ 4 files changed, 32 insertions(+), 24 deletions(-) delete mode 100644 src/SPC/builder/extension/pdo_sqlite.php create mode 100644 src/globals/ext-tests/pdo_sqlite.php create mode 100644 src/globals/ext-tests/sqlite3.php diff --git a/src/SPC/builder/extension/pdo_sqlite.php b/src/SPC/builder/extension/pdo_sqlite.php deleted file mode 100644 index 4d6f296c..00000000 --- a/src/SPC/builder/extension/pdo_sqlite.php +++ /dev/null @@ -1,23 +0,0 @@ -configure()->make(); + UnixAutoconfExecutor::create($this) + ->appendEnv([ + 'CFLAGS' => '-DSQLITE_ENABLE_COLUMN_METADATA=1', + ]) + ->configure() + ->make(); $this->patchPkgconfPrefix(['sqlite3.pc']); } } diff --git a/src/globals/ext-tests/pdo_sqlite.php b/src/globals/ext-tests/pdo_sqlite.php new file mode 100644 index 00000000..9e5e7f14 --- /dev/null +++ b/src/globals/ext-tests/pdo_sqlite.php @@ -0,0 +1,16 @@ +exec('CREATE TABLE spc_column_metadata_test (id INTEGER)'); + +$stmt = $pdo->query('SELECT id FROM spc_column_metadata_test'); +if ($stmt === false) { + throw new RuntimeException('Failed to query SQLite metadata test table.'); +} + +$metadata = $stmt->getColumnMeta(0); +if (($metadata['table'] ?? null) !== 'spc_column_metadata_test') { + throw new RuntimeException('PDO SQLite column metadata does not include the origin table.'); +} diff --git a/src/globals/ext-tests/sqlite3.php b/src/globals/ext-tests/sqlite3.php new file mode 100644 index 00000000..c3221e35 --- /dev/null +++ b/src/globals/ext-tests/sqlite3.php @@ -0,0 +1,10 @@ +querySingle("SELECT sqlite_compileoption_used('ENABLE_COLUMN_METADATA')"); + +if ((int) $enabled !== 1) { + throw new RuntimeException('SQLite was not built with SQLITE_ENABLE_COLUMN_METADATA.'); +}