mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-05 07:45:39 +08:00
mongodb: export PHP_VERSION_ID for in-tree builds (#1156)
This commit is contained in:
@@ -16,6 +16,14 @@ use StaticPHP\Util\FileSystem;
|
||||
#[Extension('mongodb')]
|
||||
class mongodb extends PhpExtensionPackage
|
||||
{
|
||||
#[BeforeStage('php', [php::class, 'configureForUnix'], 'ext-mongodb')]
|
||||
#[PatchDescription('Export PHP_VERSION_ID so mongo-php-driver >= 2.3.3 skips its php-config lookup (in-tree builds have no php-config).')]
|
||||
public function exportPhpVersionIdForUnix(): void
|
||||
{
|
||||
$id = php::getPHPVersionID();
|
||||
f_putenv("PHP_VERSION_ID={$id}");
|
||||
}
|
||||
|
||||
#[BeforeStage('php', [php::class, 'buildconfForWindows'], 'ext-mongodb')]
|
||||
#[PatchDescription('Add /utf-8 flag to CFLAGS_MONGODB for Windows build to fix compilation error on non-English Windows.')]
|
||||
public function patchBeforeBuild(): void
|
||||
|
||||
Reference in New Issue
Block a user