Compare commits

...

14 Commits

Author SHA1 Message Date
Marc
3ce68b64cf Revert "fix libheif" (#1154) 2026-07-08 12:52:28 +07:00
Jerry Ma
9a403ae79e Merge branch 'main' into revert-1153-fix/heif 2026-07-08 13:27:54 +08:00
Jerry Ma
532972337e Enable SQLite column metadata (#1204) 2026-07-07 22:39:33 +08:00
Jan Jakeš
fe1ef6e2e0 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.
2026-07-07 13:11:42 +02:00
Jerry Ma
f2b2af774c pin zstd, proper fix: https://github.com/kjdev/php-ext-zstd/pull/100 (#1195) 2026-06-25 19:06:00 +08:00
henderkes
a78e6fa5f8 pin zstd, proper fix: https://github.com/kjdev/php-ext-zstd/pull/100 2026-06-25 15:39:18 +07:00
Marc
5d9e4e2c81 Revert "fix(xlswriter): fix macOS build with modern Clang (C23)" (#1122) 2026-06-04 09:45:26 +07:00
Marc
ca3daad350 Revert "fix libheif" 2026-05-22 16:25:09 +07:00
Marc
eb97711347 fix libheif (#1153) 2026-05-22 16:20:10 +07:00
henderkes
5c8ec7a56d fix libheif 2026-05-22 15:28:36 +07:00
Marc
e85cd55dba add pgo to frankenphp (default as of 1.12.3) (#1142) 2026-05-16 22:04:04 +07:00
Marc
f9f4ca9a01 fix openssl check for password-argon2 (#1140) 2026-05-16 22:03:41 +07:00
henderkes
99a512c4a4 fix openssl check for password-argon2 2026-05-15 14:35:25 +07:00
Marc
75856e361e Revert "fix(xlswriter): fix macOS build with modern Clang (C23)" 2026-04-25 21:08:08 +07:00
7 changed files with 35 additions and 42 deletions

View File

@@ -333,10 +333,9 @@
} }
}, },
"ext-zstd": { "ext-zstd": {
"type": "git", "type": "ghtagtar",
"repo": "kjdev/php-ext-zstd",
"path": "php-src/ext/zstd", "path": "php-src/ext/zstd",
"rev": "master",
"url": "https://github.com/kjdev/php-ext-zstd",
"license": { "license": {
"type": "file", "type": "file",
"path": "LICENSE" "path": "LICENSE"

View File

@@ -26,7 +26,7 @@ class password_argon2 extends Extension
public function getConfigureArg(bool $shared = false): string public function getConfigureArg(bool $shared = false): string
{ {
if ($this->builder->getLib('openssl') !== null) { if ($this->builder->getExt('openssl')?->isBuildStatic() || $this->isBuildShared()) {
if ($this->builder->getPHPVersionID() >= 80500 || ($this->builder->getPHPVersionID() >= 80400 && !$this->builder->getOption('enable-zts'))) { if ($this->builder->getPHPVersionID() >= 80500 || ($this->builder->getPHPVersionID() >= 80400 && !$this->builder->getOption('enable-zts'))) {
return '--without-password-argon2'; // use --with-openssl-argon2 in openssl extension instead return '--without-password-argon2'; // use --with-openssl-argon2 in openssl extension instead
} }

View File

@@ -1,23 +0,0 @@
<?php
declare(strict_types=1);
namespace SPC\builder\extension;
use SPC\builder\Extension;
use SPC\store\FileSystem;
use SPC\util\CustomExt;
#[CustomExt('pdo_sqlite')]
class pdo_sqlite extends Extension
{
public function patchBeforeConfigure(): bool
{
FileSystem::replaceFileRegex(
SOURCE_PATH . '/php-src/configure',
'/sqlite3_column_table_name=yes/',
'sqlite3_column_table_name=no'
);
return true;
}
}

View File

@@ -7,7 +7,6 @@ namespace SPC\builder\extension;
use SPC\builder\Extension; use SPC\builder\Extension;
use SPC\store\SourcePatcher; use SPC\store\SourcePatcher;
use SPC\util\CustomExt; use SPC\util\CustomExt;
use SPC\util\GlobalEnvManager;
#[CustomExt('xlswriter')] #[CustomExt('xlswriter')]
class xlswriter extends Extension class xlswriter extends Extension
@@ -29,13 +28,6 @@ class xlswriter extends Extension
public function patchBeforeMake(): bool public function patchBeforeMake(): bool
{ {
$patched = parent::patchBeforeMake(); $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') { if (PHP_OS_FAMILY === 'Windows') {
// fix windows build with openssl extension duplicate symbol bug // fix windows build with openssl extension duplicate symbol bug
SourcePatcher::patchFile('spc_fix_xlswriter_win32.patch', $this->source_dir); SourcePatcher::patchFile('spc_fix_xlswriter_win32.patch', $this->source_dir);
@@ -48,10 +40,4 @@ class xlswriter extends Extension
} }
return $patched; return $patched;
} }
// Remove when https://github.com/viest/php-ext-xlswriter/pull/560 is merged
protected function getExtraEnv(): array
{
return ['CFLAGS' => '-std=gnu17'];
}
} }

View File

@@ -10,7 +10,12 @@ trait sqlite
{ {
protected function build(): void protected function build(): void
{ {
UnixAutoconfExecutor::create($this)->configure()->make(); UnixAutoconfExecutor::create($this)
->appendEnv([
'CFLAGS' => '-DSQLITE_ENABLE_COLUMN_METADATA=1',
])
->configure()
->make();
$this->patchPkgconfPrefix(['sqlite3.pc']); $this->patchPkgconfPrefix(['sqlite3.pc']);
} }
} }

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
$pdo = new PDO('sqlite::memory:');
$pdo->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.');
}

View File

@@ -0,0 +1,10 @@
<?php
declare(strict_types=1);
$sqlite = new SQLite3(':memory:');
$enabled = $sqlite->querySingle("SELECT sqlite_compileoption_used('ENABLE_COLUMN_METADATA')");
if ((int) $enabled !== 1) {
throw new RuntimeException('SQLite was not built with SQLITE_ENABLE_COLUMN_METADATA.');
}