Compare commits

..

13 Commits
2.3.0 ... 2.3.2

Author SHA1 Message Date
crazywhalecc
51442dc9ac Add redis, igbinary extension for Windows 2024-08-12 12:34:10 +08:00
crazywhalecc
17c27cb7e8 Add extension test 2024-08-12 09:39:49 +08:00
crazywhalecc
c53f1d947c Add tests 2024-08-12 09:39:49 +08:00
crazywhalecc
3e013cd642 Add extra encodings for libiconv 2024-08-12 09:39:49 +08:00
crazywhalecc
4f5177d57e Add libcares support for curl 2024-08-11 12:30:56 +08:00
crazywhalecc
9259f8e53d Update docs for curl command 2024-08-09 16:56:15 +08:00
crazywhalecc
e67e13e81f Fix imap and rar build on macOS bug 2024-07-28 16:01:18 +08:00
crazywhalecc
874010f225 Change openssl link 2024-07-26 20:55:37 +08:00
crazywhalecc
ca6d5da10f Remove redundant files and add tests for #504 bug 2024-07-19 23:52:20 +08:00
crazywhalecc
fbae0021a3 Bump version to 2.3.1 2024-07-19 23:52:20 +08:00
crazywhalecc
b52fe05363 Fix icu missing tool bug 2024-07-19 23:52:20 +08:00
crazywhalecc
c40e41cebe Fix extension test escape string for unix 2024-07-19 23:52:20 +08:00
crazywhalecc
3711db1093 Fix cur build on windows 2024-07-14 01:43:41 +08:00
25 changed files with 122 additions and 42 deletions

View File

@@ -71,10 +71,10 @@ jobs:
- name: "Download Minimal Combination" - name: "Download Minimal Combination"
run: | run: |
if [ "${{ matrix.operating-system.name }}" = "windows-x64" ]; then if [ "${{ matrix.operating-system.name }}" = "windows-x64" ]; then
curl https://dl.static-php.dev/static-php-cli/windows/spc-min/php-${{ env.MICRO_VERSION }}-micro-win.zip -o tmp.zip curl -fsSL https://dl.static-php.dev/static-php-cli/windows/spc-min/php-${{ env.MICRO_VERSION }}-micro-win.zip -o tmp.zip
unzip tmp.zip unzip tmp.zip
else else
curl https://dl.static-php.dev/static-php-cli/minimal/php-${{ env.MICRO_VERSION }}-micro-${{ matrix.operating-system.name }}.tar.gz -o tmp.tgz curl -fsSL https://dl.static-php.dev/static-php-cli/minimal/php-${{ env.MICRO_VERSION }}-micro-${{ matrix.operating-system.name }}.tar.gz -o tmp.tgz
tar -zxvf tmp.tgz tar -zxvf tmp.tgz
fi fi

View File

@@ -176,7 +176,7 @@ jobs:
- name: "Run Build Tests (download)" - name: "Run Build Tests (download)"
run: | run: |
bin/spc download --for-extensions="$(php src/globals/test-extensions.php extensions)" --for-libs="$(php src/globals/test-extensions.php libs)" --with-php=${{ matrix.php }} --ignore-cache-sources=php-src --debug --retry=5 --shallow-clone --prefer-pre-built bin/spc download --for-extensions="$(php src/globals/test-extensions.php extensions)" --for-libs="$(php src/globals/test-extensions.php libs)" --with-php=${{ matrix.php }} --ignore-cache-sources=php-src --debug --retry=5 --shallow-clone
- name: "Download pre-built libraries for pkg-config" - name: "Download pre-built libraries for pkg-config"
if: matrix.os != 'windows-latest' if: matrix.os != 'windows-latest'

View File

@@ -124,15 +124,15 @@ static-php-cli简称 `spc`)有许多特性:
```bash ```bash
# Download from self-hosted nightly builds (sync with main branch) # Download from self-hosted nightly builds (sync with main branch)
# For Linux x86_64 # For Linux x86_64
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64
# For Linux aarch64 # For Linux aarch64
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64
# macOS x86_64 (Intel) # macOS x86_64 (Intel)
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64
# macOS aarch64 (Apple) # macOS aarch64 (Apple)
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64
# Windows (x86_64, win10 build 17063 or later) # Windows (x86_64, win10 build 17063 or later)
curl.exe -o spc.exe https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe curl.exe -fsSL -o spc.exe https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe
# Add execute perm (Linux and macOS only) # Add execute perm (Linux and macOS only)
chmod +x ./spc chmod +x ./spc

View File

@@ -134,15 +134,15 @@ Download from self-hosted nightly builds using commands below:
```bash ```bash
# Download from self-hosted nightly builds (sync with main branch) # Download from self-hosted nightly builds (sync with main branch)
# For Linux x86_64 # For Linux x86_64
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64
# For Linux aarch64 # For Linux aarch64
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64
# macOS x86_64 (Intel) # macOS x86_64 (Intel)
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64
# macOS aarch64 (Apple) # macOS aarch64 (Apple)
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64
# Windows (x86_64, win10 build 17063 or later) # Windows (x86_64, win10 build 17063 or later)
curl.exe -o spc.exe https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe curl.exe -fsSL -o spc.exehttps://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe
# Add execute perm (Linux and macOS only) # Add execute perm (Linux and macOS only)
chmod +x ./spc chmod +x ./spc

View File

@@ -205,11 +205,14 @@
}, },
"igbinary": { "igbinary": {
"support": { "support": {
"Windows": "wip",
"BSD": "wip" "BSD": "wip"
}, },
"type": "external", "type": "external",
"source": "igbinary" "source": "igbinary",
"ext-suggests": [
"session",
"apcu"
]
}, },
"imagick": { "imagick": {
"support": { "support": {
@@ -537,7 +540,6 @@
}, },
"redis": { "redis": {
"support": { "support": {
"Windows": "wip",
"BSD": "wip" "BSD": "wip"
}, },
"type": "external", "type": "external",
@@ -547,7 +549,7 @@
"session", "session",
"igbinary" "igbinary"
], ],
"lib-suggests": [ "lib-suggests-unix": [
"zstd", "zstd",
"liblz4" "liblz4"
] ]

View File

@@ -53,7 +53,8 @@
"libssh2", "libssh2",
"brotli", "brotli",
"nghttp2", "nghttp2",
"zstd" "zstd",
"libcares"
], ],
"lib-suggests-windows": [ "lib-suggests-windows": [
"brotli", "brotli",

View File

@@ -546,9 +546,15 @@
} }
}, },
"openssl": { "openssl": {
"type": "filelist", "type": "ghrel",
"url": "https://www.openssl.org/source/", "repo": "openssl/openssl",
"regex": "/href=\"(?<file>openssl-(?<version>[^\"]+)\\.tar\\.gz)\"/", "match": "openssl.+\\.tar\\.gz",
"prefer-stable": true,
"alt": {
"type": "filelist",
"url": "https://www.openssl.org/source/",
"regex": "/href=\"(?<file>openssl-(?<version>[^\"]+)\\.tar\\.gz)\"/"
},
"provide-pre-built": true, "provide-pre-built": true,
"license": { "license": {
"type": "file", "type": "file",

View File

@@ -129,7 +129,7 @@
<div v-if="selectedEnv === 'spc'" class="command-container"> <div v-if="selectedEnv === 'spc'" class="command-container">
<b>{{ I18N[lang].downloadSPCBinaryCommand }}</b> <b>{{ I18N[lang].downloadSPCBinaryCommand }}</b>
<div class="command-preview" v-if="selectedSystem !== 'windows'"> <div class="command-preview" v-if="selectedSystem !== 'windows'">
curl -o spc.tgz https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-{{ selectedSystem }}-{{ selectedArch }}.tar.gz && tar -zxvf spc.tgz && rm spc.tgz<br> curl -fsSL -o spc.tgz https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-{{ selectedSystem }}-{{ selectedArch }}.tar.gz && tar -zxvf spc.tgz && rm spc.tgz<br>
</div> </div>
<div v-else> <div v-else>
<div class="warning custom-block"> <div class="warning custom-block">

View File

@@ -14,15 +14,15 @@ Here's how to download from self-hosted server:
```bash ```bash
# Download from self-hosted nightly builds (sync with main branch) # Download from self-hosted nightly builds (sync with main branch)
# For Linux x86_64 # For Linux x86_64
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64
# For Linux aarch64 # For Linux aarch64
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64
# macOS x86_64 (Intel) # macOS x86_64 (Intel)
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64
# macOS aarch64 (Apple) # macOS aarch64 (Apple)
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64
# Windows (x86_64, win10 build 17063 or later) # Windows (x86_64, win10 build 17063 or later)
curl.exe -o spc.exe https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe curl.exe -fsSL -o spc.exe https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe
# Add execute perm (Linux and macOS only) # Add execute perm (Linux and macOS only)
chmod +x ./spc chmod +x ./spc

View File

@@ -11,15 +11,15 @@
```bash ```bash
# Download from self-hosted nightly builds (sync with main branch) # Download from self-hosted nightly builds (sync with main branch)
# For Linux x86_64 # For Linux x86_64
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64
# For Linux aarch64 # For Linux aarch64
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64
# macOS x86_64 (Intel) # macOS x86_64 (Intel)
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64
# macOS aarch64 (Apple) # macOS aarch64 (Apple)
curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64 curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64
# Windows (x86_64, win10 build 17063 or later) # Windows (x86_64, win10 build 17063 or later)
curl.exe -o spc.exe https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe curl.exe -fsSL -o spc.exe https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe
# Add execute perm (Linux and macOS only) # Add execute perm (Linux and macOS only)
chmod +x ./spc chmod +x ./spc

View File

@@ -28,7 +28,7 @@ use Symfony\Component\Console\Application;
*/ */
final class ConsoleApplication extends Application final class ConsoleApplication extends Application
{ {
public const VERSION = '2.3.0'; public const VERSION = '2.3.2';
public function __construct() public function __construct()
{ {

View File

@@ -180,8 +180,8 @@ class Extension
if (file_exists(ROOT_DIR . '/src/globals/ext-tests/' . $this->getName() . '.php')) { if (file_exists(ROOT_DIR . '/src/globals/ext-tests/' . $this->getName() . '.php')) {
// Trim additional content & escape special characters to allow inline usage // Trim additional content & escape special characters to allow inline usage
$test = str_replace( $test = str_replace(
['<?php', 'declare(strict_types=1);', "\n", '"', '$'], ['<?php', 'declare(strict_types=1);', "\n", '"', '$', '!'],
['', '', '', '\"', '\$'], ['', '', '', '\"', '\$', '"\'!\'"'],
file_get_contents(ROOT_DIR . '/src/globals/ext-tests/' . $this->getName() . '.php') file_get_contents(ROOT_DIR . '/src/globals/ext-tests/' . $this->getName() . '.php')
); );

View File

@@ -6,11 +6,23 @@ namespace SPC\builder\extension;
use SPC\builder\Extension; use SPC\builder\Extension;
use SPC\exception\WrongUsageException; use SPC\exception\WrongUsageException;
use SPC\store\FileSystem;
use SPC\util\CustomExt; use SPC\util\CustomExt;
#[CustomExt('imap')] #[CustomExt('imap')]
class imap extends Extension class imap extends Extension
{ {
public function patchBeforeBuildconf(): bool
{
if ($this->builder->getLib('openssl')) {
// sometimes imap with openssl does not contain zlib (required by openssl)
// we need to add it manually
FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/ext/imap/config.m4', 'TST_LIBS="$DLIBS $IMAP_SHARED_LIBADD"', 'TST_LIBS="$DLIBS $IMAP_SHARED_LIBADD -lz"');
return true;
}
return false;
}
/** /**
* @throws WrongUsageException * @throws WrongUsageException
*/ */

View File

@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace SPC\builder\extension;
use SPC\builder\Extension;
use SPC\builder\macos\MacOSBuilder;
use SPC\exception\FileSystemException;
use SPC\store\FileSystem;
use SPC\util\CustomExt;
#[CustomExt('rar')]
class rar extends Extension
{
/**
* @throws FileSystemException
*/
public function patchBeforeBuildconf(): bool
{
// workaround for newer Xcode clang (>= 15.0)
if ($this->builder instanceof MacOSBuilder) {
FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/ext/rar/config.m4', '-Wall -fvisibility=hidden', '-Wall -Wno-incompatible-function-pointer-types -fvisibility=hidden');
return true;
}
return false;
}
}

View File

@@ -23,4 +23,12 @@ class redis extends Extension
} }
return $arg; return $arg;
} }
public function getWindowsConfigureArg(): string
{
$arg = '--enable-redis';
$arg .= $this->builder->getExt('session') ? ' --enable-redis-session' : ' --disable-redis-session';
$arg .= $this->builder->getExt('igbinary') ? ' --enable-redis-igbinary' : ' --disable-redis-igbinary';
return $arg;
}
} }

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace SPC\builder\linux\library; namespace SPC\builder\linux\library;
use SPC\store\FileSystem;
class icu extends LinuxLibraryBase class icu extends LinuxLibraryBase
{ {
use \SPC\builder\unix\library\icu; use \SPC\builder\unix\library\icu;
@@ -12,7 +14,7 @@ class icu extends LinuxLibraryBase
protected function build(): void protected function build(): void
{ {
$cppflags = 'CPPFLAGS="-DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=1 -DU_STATIC_IMPLEMENTATION=1"'; $cppflags = 'CPPFLAGS="-DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=1 -DU_STATIC_IMPLEMENTATION=1"';
$cxxflags = 'CXXFLAGS="-std=c++17"'; $cxxflags = 'CXXFLAGS="-std=c++17"';
$ldflags = 'LDFLAGS="-static"'; $ldflags = 'LDFLAGS="-static"';
shell()->cd($this->source_dir . '/source') shell()->cd($this->source_dir . '/source')
@@ -26,7 +28,7 @@ class icu extends LinuxLibraryBase
'--enable-extras=no ' . '--enable-extras=no ' .
'--enable-icuio=yes ' . '--enable-icuio=yes ' .
'--enable-dyload=no ' . '--enable-dyload=no ' .
'--enable-tools=no ' . '--enable-tools=yes ' .
'--enable-tests=no ' . '--enable-tests=no ' .
'--enable-samples=no ' . '--enable-samples=no ' .
'--prefix=' . BUILD_ROOT_PATH '--prefix=' . BUILD_ROOT_PATH
@@ -36,5 +38,6 @@ class icu extends LinuxLibraryBase
->exec('make install'); ->exec('make install');
$this->patchPkgconfPrefix(['icu-i18n.pc', 'icu-io.pc', 'icu-uc.pc'], PKGCONF_PATCH_PREFIX); $this->patchPkgconfPrefix(['icu-i18n.pc', 'icu-io.pc', 'icu-uc.pc'], PKGCONF_PATCH_PREFIX);
FileSystem::removeDir(BUILD_LIB_PATH . '/icu');
} }
} }

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace SPC\builder\macos\library; namespace SPC\builder\macos\library;
use SPC\store\FileSystem;
class icu extends MacOSLibraryBase class icu extends MacOSLibraryBase
{ {
use \SPC\builder\unix\library\icu; use \SPC\builder\unix\library\icu;
@@ -14,11 +16,12 @@ class icu extends MacOSLibraryBase
{ {
$root = BUILD_ROOT_PATH; $root = BUILD_ROOT_PATH;
shell()->cd($this->source_dir . '/source') shell()->cd($this->source_dir . '/source')
->exec("./runConfigureICU MacOSX --enable-static --disable-shared --disable-extras --disable-samples --disable-tests --disable-tools --prefix={$root}") ->exec("./runConfigureICU MacOSX --enable-static --disable-shared --disable-extras --disable-samples --disable-tests --prefix={$root}")
->exec('make clean') ->exec('make clean')
->exec("make -j{$this->builder->concurrency}") ->exec("make -j{$this->builder->concurrency}")
->exec('make install'); ->exec('make install');
$this->patchPkgconfPrefix(['icu-i18n.pc', 'icu-io.pc', 'icu-uc.pc'], PKGCONF_PATCH_PREFIX); $this->patchPkgconfPrefix(['icu-i18n.pc', 'icu-io.pc', 'icu-uc.pc'], PKGCONF_PATCH_PREFIX);
FileSystem::removeDir(BUILD_LIB_PATH . '/icu');
} }
} }

View File

@@ -47,6 +47,7 @@ class imap extends MacOSLibraryBase
} else { } else {
$ssl_options = 'SSLTYPE=none'; $ssl_options = 'SSLTYPE=none';
} }
$out = shell()->execWithResult('echo "-include $(xcrun --show-sdk-path)/usr/include/poll.h -include $(xcrun --show-sdk-path)/usr/include/time.h -include $(xcrun --show-sdk-path)/usr/include/utime.h"')[1][0];
shell()->cd($this->source_dir) shell()->cd($this->source_dir)
->exec('make clean') ->exec('make clean')
->exec('touch ip6') ->exec('touch ip6')
@@ -55,7 +56,7 @@ class imap extends MacOSLibraryBase
->exec('chmod +x src/osdep/unix/drivers') ->exec('chmod +x src/osdep/unix/drivers')
->exec('chmod +x src/osdep/unix/mkauths') ->exec('chmod +x src/osdep/unix/mkauths')
->exec( ->exec(
"yes | EXTRACFLAGS='-Wimplicit-function-declaration -include $(xcrun --show-sdk-path)/usr/include/poll.h -include $(xcrun --show-sdk-path)/usr/include/time.h -include $(xcrun --show-sdk-path)/usr/include/utime.h' make osx {$ssl_options}" "yes | make osx {$ssl_options} EXTRACFLAGS='-Wimplicit-function-declaration -Wno-incompatible-function-pointer-types {$out}'"
); );
try { try {
shell() shell()

View File

@@ -47,6 +47,8 @@ trait curl
$extra .= $this->builder->getLib('idn2') ? '-DUSE_LIBIDN2=ON ' : '-DUSE_LIBIDN2=OFF '; $extra .= $this->builder->getLib('idn2') ? '-DUSE_LIBIDN2=ON ' : '-DUSE_LIBIDN2=OFF ';
// lib:psl // lib:psl
$extra .= $this->builder->getLib('psl') ? '-DCURL_USE_LIBPSL=ON ' : '-DCURL_USE_LIBPSL=OFF '; $extra .= $this->builder->getLib('psl') ? '-DCURL_USE_LIBPSL=ON ' : '-DCURL_USE_LIBPSL=OFF ';
// lib:libcares
$extra .= $this->builder->getLib('libcares') ? '-DENABLE_ARES=ON ' : '';
FileSystem::resetDir($this->source_dir . '/build'); FileSystem::resetDir($this->source_dir . '/build');
// compile // compile

View File

@@ -15,6 +15,7 @@ trait libiconv
'./configure ' . './configure ' .
'--enable-static ' . '--enable-static ' .
'--disable-shared ' . '--disable-shared ' .
'--enable-extra-encodings ' .
'--prefix=' '--prefix='
) )
->exec('make clean') ->exec('make clean')

View File

@@ -12,6 +12,7 @@ class curl extends WindowsLibraryBase
protected function build(): void protected function build(): void
{ {
FileSystem::createDir(BUILD_BIN_PATH);
cmd()->cd($this->source_dir . '\winbuild') cmd()->cd($this->source_dir . '\winbuild')
->execWithWrapper( ->execWithWrapper(
$this->builder->makeSimpleWrapper('nmake'), $this->builder->makeSimpleWrapper('nmake'),

View File

@@ -57,6 +57,9 @@ class SourcePatcher
); );
} }
// patch php-src/build/php.m4 PKG_CHECK_MODULES -> PKG_CHECK_MODULES_STATIC
FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/build/php.m4', 'PKG_CHECK_MODULES(', 'PKG_CHECK_MODULES_STATIC(');
if ($builder->getOption('enable-micro-win32')) { if ($builder->getOption('enable-micro-win32')) {
SourcePatcher::patchMicroWin32(); SourcePatcher::patchMicroWin32();
} else { } else {

View File

@@ -0,0 +1,6 @@
<?php
declare(strict_types=1);
assert(function_exists('iconv'));
assert(iconv('UTF-8', 'CP437', 'foo') === 'foo');

View File

@@ -3,3 +3,6 @@
declare(strict_types=1); declare(strict_types=1);
assert(class_exists(NumberFormatter::class)); assert(class_exists(NumberFormatter::class));
assert(function_exists('locale_get_default'));
$fmt = new NumberFormatter('de-DE', NumberFormatter::DECIMAL);
assert(strval($fmt->parse('1.100')) === '1100');

View File

@@ -19,13 +19,13 @@ $upx = true;
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) { $extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'swoole,bz2,gmp,intl,password-argon2,gd,mbregex,iconv,redis,sodium,yaml,readline,openssl,sqlite3,sqlsrv,zip,zlib', 'Linux', 'Darwin' => 'iconv',
'Windows' => 'amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,exif,ffi,fileinfo,filter,ftp,gd,iconv,libxml,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_sqlite,pdo_sqlsrv,phar,rar,session,shmop,simdjson,simplexml,soap,sockets,sqlite3,sqlsrv,ssh2,swow,sysvshm,tokenizer,xml,xmlreader,xmlwriter,yac,yaml,zip,zlib', 'Windows' => 'igbinary,redis,session',
}; };
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`). // If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
$with_libs = match (PHP_OS_FAMILY) { $with_libs = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'brotli,bzip2,gmp,icu,libargon2,libavif,libcares,libevent,libiconv,liblz4,libpng,libsodium,libtiff,libwebp,libyaml,ncurses,onig,openssl,pkg-config,readline,sqlite,unixodbc,xz,zlib', 'Linux', 'Darwin' => '',
'Windows' => '', 'Windows' => '',
}; };