mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Merge branch 'main' into v3-dev
This commit is contained in:
commit
9903c2294c
@ -567,6 +567,13 @@
|
||||
"type": "builtin",
|
||||
"unix-only": true
|
||||
},
|
||||
"pcov": {
|
||||
"type": "external",
|
||||
"source": "pcov",
|
||||
"target": [
|
||||
"shared"
|
||||
]
|
||||
},
|
||||
"pdo": {
|
||||
"type": "builtin"
|
||||
},
|
||||
|
||||
@ -963,6 +963,15 @@
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"pcov": {
|
||||
"type": "url",
|
||||
"url": "https://pecl.php.net/get/pcov",
|
||||
"filename": "pcov.tgz",
|
||||
"license": {
|
||||
"type": "file",
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"pdo_sqlsrv": {
|
||||
"type": "url",
|
||||
"url": "https://pecl.php.net/get/pdo_sqlsrv",
|
||||
|
||||
@ -660,11 +660,19 @@ class FileSystem
|
||||
$source = self::convertPath($source);
|
||||
$dest = self::convertPath($dest);
|
||||
|
||||
// Try rename first (fast, atomic)
|
||||
if (@rename($source, $dest)) {
|
||||
return;
|
||||
// Check if source and dest are on the same device to avoid cross-device rename errors
|
||||
$source_stat = @stat($source);
|
||||
$dest_parent = dirname($dest);
|
||||
$dest_stat = @stat($dest_parent);
|
||||
|
||||
// Only use rename if on same device
|
||||
if ($source_stat !== false && $dest_stat !== false && $source_stat['dev'] === $dest_stat['dev']) {
|
||||
if (@rename($source, $dest)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Fall back to copy + delete for cross-device moves or if rename failed
|
||||
if (is_dir($source)) {
|
||||
self::copyDir($source, $dest);
|
||||
self::removeDir($source);
|
||||
|
||||
@ -13,9 +13,9 @@ declare(strict_types=1);
|
||||
|
||||
// test php version (8.1 ~ 8.4 available, multiple for matrix)
|
||||
$test_php_version = [
|
||||
'8.1',
|
||||
'8.2',
|
||||
'8.3',
|
||||
// '8.1',
|
||||
// '8.2',
|
||||
// '8.3',
|
||||
'8.4',
|
||||
'8.5',
|
||||
// 'git',
|
||||
@ -25,17 +25,17 @@ $test_php_version = [
|
||||
$test_os = [
|
||||
'macos-15-intel', // bin/spc for x86_64
|
||||
'macos-15', // bin/spc for arm64
|
||||
'ubuntu-latest', // bin/spc-alpine-docker for x86_64
|
||||
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
|
||||
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
|
||||
'ubuntu-24.04', // bin/spc for x86_64
|
||||
'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
|
||||
// 'ubuntu-24.04', // bin/spc for x86_64
|
||||
// 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
|
||||
'ubuntu-24.04-arm', // bin/spc for arm64
|
||||
// 'windows-2022', // .\bin\spc.ps1
|
||||
// 'windows-2025',
|
||||
];
|
||||
|
||||
// whether enable thread safe
|
||||
$zts = false;
|
||||
$zts = true;
|
||||
|
||||
$no_strip = false;
|
||||
|
||||
@ -50,14 +50,14 @@ $prefer_pre_built = false;
|
||||
|
||||
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
||||
$extensions = match (PHP_OS_FAMILY) {
|
||||
'Linux', 'Darwin' => 'maxminddb',
|
||||
'Linux', 'Darwin' => 'bcmath',
|
||||
'Windows' => 'bcmath',
|
||||
};
|
||||
|
||||
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
|
||||
$shared_extensions = match (PHP_OS_FAMILY) {
|
||||
'Linux' => '',
|
||||
'Darwin' => '',
|
||||
'Linux' => 'pcov',
|
||||
'Darwin' => 'pcov',
|
||||
'Windows' => '',
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user