From 5383cf7c25bcc61467d49fdbbd5e5a01b28353d3 Mon Sep 17 00:00:00 2001 From: Gabe Date: Fri, 27 Sep 2024 12:00:54 +0100 Subject: [PATCH 001/101] Fix typo in README.md (#546) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ef29db8..176d0895 100755 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-m # macOS aarch64 (Apple) 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) -curl.exe -fsSL -o spc.exehttps://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) chmod +x ./spc From b62963489a447fa73816c2f05588cd236e14c94d Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Sun, 29 Sep 2024 15:24:33 +0800 Subject: [PATCH 002/101] Add optional workflow (#548) * Add optional workflow * Add optional workflow --- .github/workflows/tests.yml | 37 ++++++++++++++++++++++++--------- src/globals/test-extensions.php | 8 ++++++- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1088c104..5b10f310 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -111,22 +111,39 @@ jobs: run: | vendor/bin/phpunit tests/ --no-coverage + define-matrix: + name: "Define Matrix" + runs-on: ubuntu-latest + outputs: + php: ${{ steps.gendef.outputs.php }} + os: ${{ steps.gendef.outputs.os }} + steps: + - name: "Checkout" + uses: actions/checkout@v4 + + - name: "Setup PHP" + uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + + - name: Define + id: gendef + run: | + PHP_VERSIONS=$(php src/globals/test-extensions.php php) + OS_VERSIONS=$(php src/globals/test-extensions.php os) + echo 'php='"$PHP_VERSIONS" >> "$GITHUB_OUTPUT" + echo 'os='"$OS_VERSIONS" >> "$GITHUB_OUTPUT" + + build: name: "Build PHP Test (PHP ${{ matrix.php }} ${{ matrix.os }})" runs-on: ${{ matrix.os }} + needs: define-matrix timeout-minutes: 120 strategy: matrix: - php: - - "8.0" - - "8.1" - - "8.2" - - "8.3" - os: - - ubuntu-latest - - macos-13 - - windows-latest - - macos-14 + php: ${{ fromJSON(needs.define-matrix.outputs.php) }} + os: ${{ fromJSON(needs.define-matrix.outputs.os) }} fail-fast: false steps: - name: "Checkout" diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 755bdf4a..881be3fd 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -11,6 +11,10 @@ declare(strict_types=1); // --------------------------------- edit area --------------------------------- +$test_php_version = ['8.3']; + +$test_os = ['macos-13', 'macos-14', 'ubuntu-latest', 'windows-latest']; + $zts = false; $no_strip = false; @@ -58,7 +62,7 @@ function _getCombination(string $type = 'common'): string } if (!isset($argv[1])) { - exit("Please use 'extensions', 'cmd' or 'libs' as output type"); + exit("Please use 'extensions', 'cmd', 'os', 'php' or 'libs' as output type"); } $trim_value = "\r\n \t,"; @@ -73,6 +77,8 @@ if (PHP_OS_FAMILY === 'Windows') { } echo match ($argv[1]) { + 'os' => json_encode($test_os), + 'php' => json_encode($test_php_version), 'extensions' => $final_extensions, 'libs' => $final_libs, 'libs_cmd' => ($final_libs === '' ? '' : (' --with-libs=' . $final_libs)), From 2f320507aef07cf52e260b377b864d018c9c1bc4 Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Fri, 4 Oct 2024 22:09:06 +0800 Subject: [PATCH 003/101] Fix windows xz build libs (#550) --- config/lib.json | 2 +- src/SPC/builder/windows/library/xz.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/lib.json b/config/lib.json index 7e4525fe..94061623 100644 --- a/config/lib.json +++ b/config/lib.json @@ -643,7 +643,7 @@ "liblzma.a" ], "static-libs-windows": [ - "liblzma.lib", + "lzma.lib", "liblzma_a.lib" ], "headers-unix": [ diff --git a/src/SPC/builder/windows/library/xz.php b/src/SPC/builder/windows/library/xz.php index cf5b7234..a48df52d 100644 --- a/src/SPC/builder/windows/library/xz.php +++ b/src/SPC/builder/windows/library/xz.php @@ -32,7 +32,7 @@ class xz extends WindowsLibraryBase ); // copy liblzma.lib to liblzma_a.lib - copy(BUILD_LIB_PATH . '/liblzma.lib', BUILD_LIB_PATH . '/liblzma_a.lib'); + copy(BUILD_LIB_PATH . '/lzma.lib', BUILD_LIB_PATH . '/liblzma_a.lib'); // patch lzma.h FileSystem::replaceFileStr(BUILD_INCLUDE_PATH . '/lzma.h', 'defined(LZMA_API_STATIC)', 'defined(_WIN32)'); } From 4e88dba630a427fd3031aedb8ab0889f4734c0bf Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 1 Oct 2024 15:37:37 +0800 Subject: [PATCH 004/101] Separate env to env.ini file --- config/env.ini | 134 +++++++++++++++++++ src/SPC/ConsoleApplication.php | 5 +- src/SPC/command/BaseCommand.php | 6 + src/SPC/command/DoctorCommand.php | 7 +- src/SPC/util/GlobalEnvManager.php | 212 +++++++++--------------------- src/globals/defines.php | 18 --- src/globals/functions.php | 5 + src/globals/internal-env.php | 49 +++++++ src/globals/test-extensions.php | 10 +- 9 files changed, 267 insertions(+), 179 deletions(-) create mode 100644 config/env.ini create mode 100644 src/globals/internal-env.php diff --git a/config/env.ini b/config/env.ini new file mode 100644 index 00000000..793cbe44 --- /dev/null +++ b/config/env.ini @@ -0,0 +1,134 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; static-php-cli (spc) env configuration +; +; This file is used to set default env vars for static-php-cli build. +; As dynamic build process, some of these vars can be overwritten by CLI options. +; And you can also overwrite these vars by setting them in your shell environment. +; +; We need to use some pre-defined internal env vars, like `BUILD_ROOT_PATH`, `DOWNLOAD_PATH`, etc. +; Please note that these vars cannot be defined in this file, they are only be defined before static-php-cli running. +; Here's a list of these pre-defined internal env vars, these vars are only be defined in the static-php-cli build process if not set in the shell environment: +; +; BUILD_ROOT_PATH: the root path of the build process. (default: `$(pwd)/buildroot`) +; BUILD_INCLUDE_PATH: the path of the include files. (default: `$BUILD_ROOT_PATH/include`) +; BUILD_LIB_PATH: the path of the lib files. (default: `$BUILD_ROOT_PATH/lib`) +; BUILD_BIN_PATH: the path of the bin files. (default: `$BUILD_ROOT_PATH/bin`) +; PKG_ROOT_PATH: the root path of the package files. (default: `$(pwd)/pkgroot`) +; SOURCE_PATH: the path of the source files. (default: `$(pwd)/source`) +; DOWNLOAD_PATH: the path of the download files. (default: `$(pwd)/downloads`) +; CPU_COUNT: the count of the CPU cores. (default: `$(nproc)`) +; GNU_ARCH: the GNU arch of the current system. (default: `$(uname -m)`, e.g. `x86_64`, `aarch64`) +; MAC_ARCH: the MAC arch of the current system. (default: `$(uname -m)`, e.g. `x86_64`, `arm64`) +; +; Here's a list of env vars, these value cannot be changed anywhere: +; +; WORKING_DIR: the working directory of the build process. (default: `$(pwd)`) +; ROOT_DIR: the root directory of static-php-cli. (default: `/path/to/static-php-cli`, when running in phar or micro mode: `phar://path/to/spc.phar`) +; +; * These vars are only be defined in Unix (macOS, Linux, FreeBSD)Builder * +; PATH: static-php-cli will add `$BUILD_BIN_PATH` to PATH. +; PKG_CONFIG: static-php-cli will set `$BUILD_BIN_PATH/pkg-config` to PKG_CONFIG. +; PKG_CONFIG_PATH: static-php-cli will set `$BUILD_LIB_PATH/pkgconfig` to PKG_CONFIG_PATH. +; SPC_PHP_DEFAULT_OPTIMIZE_CFLAGS: the default optimization CFLAGS for compiling php. (if --no-strip option is set: `-g -O0`, else: `-g -Os`) +; +; * These vars are only be defined in LinuxBuilder * +; SPC_LINUX_DEFAULT_CC: the default compiler for linux. (For alpine linux: `gcc`, default: `$GNU_ARCH-linux-musl-gcc`) +; SPC_LINUX_DEFAULT_CXX: the default c++ compiler for linux. (For alpine linux: `g++`, default: `$GNU_ARCH-linux-musl-g++`) +; SPC_LINUX_DEFAULT_AR: the default archiver for linux. (For alpine linux: `ar`, default: `$GNU_ARCH-linux-musl-ar`) +; SPC_PHP_DEFAULT_LD_LIBRARY_PATH: the default LD_LIBRARY_PATH for php. (linux: `/usr/local/musl/$GNU_ARCH-linux-musl/lib`, default: empty) + + +[global] +; Build concurrency for make -jN +SPC_CONCURRENCY=${CPU_COUNT} +; Ignore PHP version check before building some extensions +SPC_SKIP_PHP_VERSION_CHECK="no" +; Ignore some check item for bin/spc doctor command, comma separated +SPC_SKIP_DOCTOR_CHECK_ITEMS="if homebrew has installed" + +[windows] +; php-sdk-binary-tools path +PHP_SDK_PATH=${WORKING_DIR}\php-sdk-binary-tools +; upx executable path +UPX_EXEC=${PKG_ROOT_PATH}\bin\upx.exe +; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches +SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream,cli_static + +[linux] +; include PATH for musl libc. +SPC_NO_MUSL_PATH=no +; compiler environments +CC=${SPC_LINUX_DEFAULT_CC} +CXX=${SPC_LINUX_DEFAULT_CXX} +AR=${SPC_LINUX_DEFAULT_AR} +LD=ld.gold +; default compiler flags, used in CMake toolchain file, openssl and pkg-config build +SPC_DEFAULT_C_FLAGS= +SPC_DEFAULT_CXX_FLAGS= +; extra libs for building php executable, used in `make` command for building php (this value may changed by extension build process, space separated) +SPC_EXTRA_LIBS= +; upx executable path +UPX_EXEC=${PKG_ROOT_PATH}/bin/upx +; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches +SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream + +; *** default build command for building php *** +; buildconf command +SPC_CMD_PREFIX_PHP_BUILDCONF="./buildconf --force" +; configure command +SPC_CMD_PREFIX_PHP_CONFIGURE="${SPC_PHP_DEFAULT_LD_LIBRARY_PATH} ./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg" +; make command +SPC_CMD_PREFIX_PHP_MAKE="make -j${SPC_CONCURRENCY}" + +; *** default build vars for building php *** +; CFLAGS for configuring php +SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS="${SPC_DEFAULT_C_FLAGS}" +; CPPFLAGS for configuring php +SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS="-I${BUILD_INCLUDE_PATH}" +; LDFLAGS for configuring php +SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS="-L${BUILD_LIB_PATH}" +; LIBS for configuring php +SPC_CMD_VAR_PHP_CONFIGURE_LIBS="-ldl -lpthread -lm" +; EXTRA_CFLAGS for `make` php +SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="${SPC_PHP_DEFAULT_OPTIMIZE_CFLAGS} -fno-ident -fPIE" +; EXTRA_LIBS for `make` php +SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="" +; EXTRA_LDFLAGS_PROGRAM for `make` php +SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM="-all-static" + +[macos] +; compiler environments +CC=clang +CXX=clang++ +; default compiler flags, used in CMake toolchain file, openssl and pkg-config build +SPC_DEFAULT_C_FLAGS="--target=${MAC_ARCH}-apple-darwin" +SPC_DEFAULT_CXX_FLAGS="--target=${MAC_ARCH}-apple-darwin" +; extra libs for building php executable, used in `make` command for building php (this value may changed by extension build process, space separated) +SPC_EXTRA_LIBS= +; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches +SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream,macos_iconv + +; *** default build command for building php *** +; buildconf command +SPC_CMD_PREFIX_PHP_BUILDCONF="./buildconf --force" +; configure command +SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg" +; make command +SPC_CMD_PREFIX_PHP_MAKE="make -j${SPC_CONCURRENCY}" + +; *** default build vars for building php *** +; CFLAGS for configuring php +SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS="${SPC_DEFAULT_C_FLAGS} -Werror=unknown-warning-option" +; CPPFLAGS for configuring php +SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS="-I${BUILD_INCLUDE_PATH}" +; LDFLAGS for configuring php +SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS="-L${BUILD_LIB_PATH}" +; EXTRA_CFLAGS for `make` php +SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="${SPC_PHP_DEFAULT_OPTIMIZE_CFLAGS}" +; EXTRA_LIBS for `make` php +SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="-lresolv" + +[freebsd] +; compiler environments +CC=clang +CXX=clang++ diff --git a/src/SPC/ConsoleApplication.php b/src/SPC/ConsoleApplication.php index 534cbe03..6532b535 100644 --- a/src/SPC/ConsoleApplication.php +++ b/src/SPC/ConsoleApplication.php @@ -30,12 +30,15 @@ use Symfony\Component\Console\Application; */ final class ConsoleApplication extends Application { - public const VERSION = '2.3.4'; + public const VERSION = '2.3.5'; public function __construct() { parent::__construct('static-php-cli', self::VERSION); + // Define internal env vars and constants + require_once ROOT_DIR . '/src/globals/internal-env.php'; + $this->addCommands( [ // Common commands diff --git a/src/SPC/command/BaseCommand.php b/src/SPC/command/BaseCommand.php index d67b133a..7b79a4c8 100644 --- a/src/SPC/command/BaseCommand.php +++ b/src/SPC/command/BaseCommand.php @@ -10,6 +10,7 @@ use Psr\Log\LogLevel; use SPC\ConsoleApplication; use SPC\exception\ExceptionHandler; use SPC\exception\WrongUsageException; +use SPC\util\GlobalEnvManager; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; @@ -94,6 +95,11 @@ abstract class BaseCommand extends Command $question = new ConfirmationQuestion($prompt->label . $case, $prompt->default); return $helper->ask($input, $output, $question); }); + + // init GlobalEnv + if (!$this instanceof BuildCommand) { + GlobalEnvManager::init(); + } if ($this->shouldExecute()) { try { // show raw argv list for logger()->debug diff --git a/src/SPC/command/DoctorCommand.php b/src/SPC/command/DoctorCommand.php index bc77511a..1b5b8d14 100644 --- a/src/SPC/command/DoctorCommand.php +++ b/src/SPC/command/DoctorCommand.php @@ -23,6 +23,8 @@ class DoctorCommand extends BaseCommand { try { $checker = new CheckListHandler(); + // skipped items + $skip_items = array_filter(explode(',', getenv('SPC_SKIP_DOCTOR_CHECK_ITEMS') ?: '')); $fix_policy = $this->input->getOption('auto-fix') ? FIX_POLICY_AUTOFIX : FIX_POLICY_PROMPT; foreach ($checker->runChecks() as $check) { @@ -32,13 +34,12 @@ class DoctorCommand extends BaseCommand $this->output->write('Checking ' . $check->item_name . ' ... '); - $result = call_user_func($check->callback); - if ($result === null) { + // check if this item is skipped + if (in_array($check->item_name, $skip_items) || ($result = call_user_func($check->callback)) === null) { $this->output->writeln('skipped'); } elseif ($result instanceof CheckResult) { if ($result->isOK()) { $this->output->writeln($result->getMessage() ?? 'ok'); - continue; } diff --git a/src/SPC/util/GlobalEnvManager.php b/src/SPC/util/GlobalEnvManager.php index 083262d4..952db78c 100644 --- a/src/SPC/util/GlobalEnvManager.php +++ b/src/SPC/util/GlobalEnvManager.php @@ -5,11 +5,9 @@ declare(strict_types=1); namespace SPC\util; use SPC\builder\BuilderBase; -use SPC\builder\freebsd\SystemUtil as BSDSystemUtil; -use SPC\builder\linux\SystemUtil as LinuxSystemUtil; -use SPC\builder\macos\SystemUtil as MacOSSystemUtil; -use SPC\builder\windows\SystemUtil as WindowsSystemUtil; +use SPC\builder\linux\SystemUtil; use SPC\exception\RuntimeException; +use SPC\exception\WrongUsageException; /** * Environment variable manager @@ -29,168 +27,78 @@ class GlobalEnvManager * @param BuilderBase $builder Builder * @throws RuntimeException */ - public static function init(BuilderBase $builder): void + public static function init(?BuilderBase $builder = null): void { - // Init global env, build related path - self::putenv('BUILD_ROOT_PATH=' . BUILD_ROOT_PATH); - self::putenv('BUILD_INCLUDE_PATH=' . BUILD_INCLUDE_PATH); - self::putenv('BUILD_LIB_PATH=' . BUILD_LIB_PATH); - self::putenv('BUILD_BIN_PATH=' . BUILD_BIN_PATH); - self::putenv('PKG_ROOT_PATH=' . PKG_ROOT_PATH); - self::putenv('SOURCE_PATH=' . SOURCE_PATH); - self::putenv('DOWNLOAD_PATH=' . DOWNLOAD_PATH); + // Check pre-defined env vars exists + if (getenv('BUILD_ROOT_PATH') === false) { + throw new RuntimeException('You must include src/globals/internal-env.php before using GlobalEnvManager'); + } - // Init SPC env - self::initIfNotExists('SPC_CONCURRENCY', match (PHP_OS_FAMILY) { - 'Windows' => (string) WindowsSystemUtil::getCpuCount(), - 'Darwin' => (string) MacOSSystemUtil::getCpuCount(), - 'Linux' => (string) LinuxSystemUtil::getCpuCount(), - 'BSD' => (string) BSDSystemUtil::getCpuCount(), - default => '1', - }); - - // Init system-specific env - match (PHP_OS_FAMILY) { - 'Windows' => self::initWindowsEnv(), - 'Darwin' => self::initDarwinEnv($builder), - 'Linux' => self::initLinuxEnv($builder), - 'BSD' => 'TODO', - default => logger()->warning('Unknown OS: ' . PHP_OS_FAMILY), - }; - } - - private static function initWindowsEnv(): void - { - // Windows need php-sdk binary tools - self::initIfNotExists('PHP_SDK_PATH', WORKING_DIR . DIRECTORY_SEPARATOR . 'php-sdk-binary-tools'); - self::initIfNotExists('UPX_EXEC', PKG_ROOT_PATH . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'upx.exe'); - self::initIfNotExists('SPC_MICRO_PATCHES', 'static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream,cli_static'); - } - - private static function initLinuxEnv(BuilderBase $builder): void - { - // Init C Compiler and C++ Compiler (alpine) - if (LinuxSystemUtil::isMuslDist()) { - self::initIfNotExists('CC', 'gcc'); - self::initIfNotExists('CXX', 'g++'); - self::initIfNotExists('AR', 'ar'); - self::initIfNotExists('LD', 'ld.gold'); - } else { - $arch = arch2gnu(php_uname('m')); - self::initIfNotExists('CC', "{$arch}-linux-musl-gcc"); - self::initIfNotExists('CXX', "{$arch}-linux-musl-g++"); - self::initIfNotExists('AR', "{$arch}-linux-musl-ar"); - self::initIfNotExists('LD', 'ld.gold'); - if (getenv('SPC_NO_MUSL_PATH') !== 'yes') { - self::putenv("PATH=/usr/local/musl/bin:/usr/local/musl/{$arch}-linux-musl/bin:" . getenv('PATH')); + // Define env vars for unix + if (is_unix()) { + self::putenv('PATH=' . BUILD_ROOT_PATH . '/bin:' . getenv('PATH')); + self::putenv('PKG_CONFIG=' . BUILD_BIN_PATH . '/pkg-config'); + self::putenv('PKG_CONFIG_PATH=' . BUILD_ROOT_PATH . '/lib/pkgconfig'); + if ($builder instanceof BuilderBase) { + self::putenv('SPC_PHP_DEFAULT_OPTIMIZE_CFLAGS=' . ($builder->getOption('no-strip') ? '-g -O0' : '-g -Os')); } } - // Init arch-specific cflags - self::initIfNotExists('SPC_DEFAULT_C_FLAGS', ''); - self::initIfNotExists('SPC_DEFAULT_CXX_FLAGS', ''); - self::initIfNotExists('SPC_EXTRA_LIBS', ''); + // Define env vars for linux + if (PHP_OS_FAMILY === 'Linux') { + $arch = GNU_ARCH; + if (SystemUtil::isMuslDist()) { + self::putenv('SPC_LINUX_DEFAULT_CC=gcc'); + self::putenv('SPC_LINUX_DEFAULT_CXX=g++'); + self::putenv('SPC_LINUX_DEFAULT_AR=ar'); + } else { + self::putenv("SPC_LINUX_DEFAULT_CC={$arch}-linux-musl-gcc"); + self::putenv("SPC_LINUX_DEFAULT_CXX={$arch}-linux-musl-g++"); + self::putenv("SPC_LINUX_DEFAULT_AR={$arch}-linux-musl-ar"); + } + self::putenv("SPC_PHP_DEFAULT_LD_LIBRARY_PATH=/usr/local/musl/{$arch}-linux-musl/lib"); + } - // SPC_MICRO_PATCHES for linux - self::initIfNotExists('SPC_MICRO_PATCHES', 'static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream'); - - // Init linux-only env - self::initIfNotExists('UPX_EXEC', PKG_ROOT_PATH . '/bin/upx'); - self::initIfNotExists('GNU_ARCH', arch2gnu(php_uname('m'))); - - // optimization flags with different strip option - $php_extra_cflags_optimize = $builder->getOption('no-strip') ? '-g -O0' : '-g -Os'; - // optimization flags with different c compiler - $clang_use_lld = str_ends_with(getenv('CC'), 'clang') && LinuxSystemUtil::findCommand('lld') ? '-Xcompiler -fuse-ld=lld ' : ''; - - $init_spc_cmd_maps = [ - // Init default build command prefix - 'SPC_CMD_PREFIX_PHP_BUILDCONF' => './buildconf --force', - 'SPC_CMD_PREFIX_PHP_CONFIGURE' => $builder->getOption('ld_library_path') . ' ./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg', - 'SPC_CMD_PREFIX_PHP_MAKE' => 'make -j' . getenv('SPC_CONCURRENCY'), - // Init default build vars for build command - 'SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS' => getenv('SPC_DEFAULT_C_FLAGS'), - 'SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS' => '-I' . BUILD_INCLUDE_PATH, - 'SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS' => '-L' . BUILD_LIB_PATH, - 'SPC_CMD_VAR_PHP_CONFIGURE_LIBS' => '-ldl -lpthread -lm', - 'SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS' => $php_extra_cflags_optimize . ' -fno-ident -fPIE', - 'SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS' => '', - 'SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM' => $clang_use_lld . '-all-static', + // Init env.ini file, read order: + // WORKING_DIR/config/env.ini + // ROOT_DIR/config/env.ini + $ini_files = [ + WORKING_DIR . '/config/env.ini', + ROOT_DIR . '/config/env.ini', ]; - foreach ($init_spc_cmd_maps as $name => $value) { - self::initIfNotExists($name, $value); + $ini = null; + foreach ($ini_files as $ini_file) { + if (file_exists($ini_file)) { + $ini = parse_ini_file($ini_file, true); + break; + } } - - self::initUnixEnv($builder); - } - - private static function initDarwinEnv(BuilderBase $builder): void - { - // Init C Compiler and C++ Compiler - self::initIfNotExists('CC', 'clang'); - self::initIfNotExists('CXX', 'clang++'); - - // Init arch-specific cflags - self::initIfNotExists('SPC_DEFAULT_C_FLAGS', match (php_uname('m')) { - 'arm64', 'aarch64' => '--target=arm64-apple-darwin', - default => '--target=x86_64-apple-darwin', - }); - // Init arch-specific cxxflags - self::initIfNotExists('SPC_DEFAULT_CXX_FLAGS', match (php_uname('m')) { - 'arm64', 'aarch64' => '--target=arm64-apple-darwin', - default => '--target=x86_64-apple-darwin', - }); - - // Init extra libs (will be appended before `before-php-buildconf` event point) - self::initIfNotExists('SPC_EXTRA_LIBS', ''); - - // SPC_MICRO_PATCHES for macOS - self::initIfNotExists('SPC_MICRO_PATCHES', 'static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream,macos_iconv'); - - $init_spc_cmd_maps = [ - // Init default build command prefix - 'SPC_CMD_PREFIX_PHP_BUILDCONF' => './buildconf --force', - 'SPC_CMD_PREFIX_PHP_CONFIGURE' => './configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg', - 'SPC_CMD_PREFIX_PHP_MAKE' => 'make -j' . getenv('SPC_CONCURRENCY'), - // Init default build vars for build command - 'SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS' => getenv('SPC_DEFAULT_C_FLAGS') . ' -Werror=unknown-warning-option', - 'SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS' => '-I' . BUILD_INCLUDE_PATH, - 'SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS' => '-L' . BUILD_LIB_PATH, - 'SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS' => $builder->getOption('no-strip') ? '-g -O0' : '-g -Os', - 'SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS' => '-lresolv', - ]; - foreach ($init_spc_cmd_maps as $name => $value) { - self::initIfNotExists($name, $value); + if ($ini === null) { + throw new WrongUsageException('env.ini not found'); } - - self::initUnixEnv($builder); - } - - private static function initUnixEnv(BuilderBase $builder): void - { - self::putenv('PATH=' . BUILD_ROOT_PATH . '/bin:' . getenv('PATH')); - self::putenv('PKG_CONFIG=' . BUILD_BIN_PATH . '/pkg-config'); - self::putenv('PKG_CONFIG_PATH=' . BUILD_ROOT_PATH . '/lib/pkgconfig'); - } - - /** - * Initialize the environment variable if it does not exist - * - * @param string $name Environment variable name - * @param string $value Environment variable value - */ - private static function initIfNotExists(string $name, string $value): void - { - if (($val = getenv($name)) === false) { - self::putenv($name . '=' . $value); - } else { - logger()->debug("env [{$name}] existing: {$val}"); + if ($ini === false || !isset($ini['global'])) { + throw new WrongUsageException('Failed to parse ' . $ini_file); } + self::applyConfig($ini['global']); + match (PHP_OS_FAMILY) { + 'Windows' => self::applyConfig($ini['windows']), + 'Darwin' => self::applyConfig($ini['macos']), + 'Linux' => self::applyConfig($ini['linux']), + 'BSD' => self::applyConfig($ini['freebsd']), + default => null, + }; } - private static function putenv(string $val): void + public static function putenv(string $val): void { f_putenv($val); self::$env_cache[] = $val; } + + private static function applyConfig(array $ini): void + { + foreach ($ini as $k => $v) { + self::putenv($k . '=' . $v); + } + } } diff --git a/src/globals/defines.php b/src/globals/defines.php index aa622eb1..c6b12737 100644 --- a/src/globals/defines.php +++ b/src/globals/defines.php @@ -2,7 +2,6 @@ declare(strict_types=1); -use SPC\store\FileSystem; use ZM\Logger\ConsoleLogger; define('WORKING_DIR', getcwd()); @@ -11,23 +10,6 @@ define('ROOT_DIR', dirname(__DIR__, 2)); // CLI start time define('START_TIME', microtime(true)); -define('BUILD_ROOT_PATH', FileSystem::convertPath(is_string($a = getenv('BUILD_ROOT_PATH')) ? $a : (WORKING_DIR . '/buildroot'))); -define('SOURCE_PATH', FileSystem::convertPath(is_string($a = getenv('SOURCE_PATH')) ? $a : (WORKING_DIR . '/source'))); -define('DOWNLOAD_PATH', FileSystem::convertPath(is_string($a = getenv('DOWNLOAD_PATH')) ? $a : (WORKING_DIR . '/downloads'))); -define('PKG_ROOT_PATH', FileSystem::convertPath(is_string($a = getenv('PKG_ROOT_PATH')) ? $a : (WORKING_DIR . '/pkgroot'))); -define('BUILD_BIN_PATH', FileSystem::convertPath(is_string($a = getenv('INSTALL_BIN_PATH')) ? $a : (BUILD_ROOT_PATH . '/bin'))); -define('BUILD_LIB_PATH', FileSystem::convertPath(is_string($a = getenv('INSTALL_LIB_PATH')) ? $a : (BUILD_ROOT_PATH . '/lib'))); -define('BUILD_INCLUDE_PATH', FileSystem::convertPath(is_string($a = getenv('INSTALL_INCLUDE_PATH')) ? $a : (BUILD_ROOT_PATH . '/include'))); -define('SEPARATED_PATH', [ - '/' . pathinfo(BUILD_LIB_PATH)['basename'], // lib - '/' . pathinfo(BUILD_INCLUDE_PATH)['basename'], // include - BUILD_ROOT_PATH, -]); - -if (PHP_OS_FAMILY === 'Windows') { - define('PHP_SDK_PATH', is_string($a = getenv('PHP_SDK_PATH')) ? $a : (WORKING_DIR . DIRECTORY_SEPARATOR . 'php-sdk-binary-tools')); -} - // for windows, prevent calling Invoke-WebRequest and wsl command const SPC_CURL_EXEC = PHP_OS_FAMILY === 'Windows' ? 'curl.exe' : 'curl'; const SPC_GIT_EXEC = PHP_OS_FAMILY === 'Windows' ? 'git.exe' : 'git'; diff --git a/src/globals/functions.php b/src/globals/functions.php index 2a9de625..e50407ca 100644 --- a/src/globals/functions.php +++ b/src/globals/functions.php @@ -31,6 +31,11 @@ function logger(): LoggerInterface return $ob_logger; } +function is_unix(): bool +{ + return in_array(PHP_OS_FAMILY, ['Linux', 'Darwin', 'BSD']); +} + /** * Transfer architecture name to gnu triplet * diff --git a/src/globals/internal-env.php b/src/globals/internal-env.php new file mode 100644 index 00000000..60ea8370 --- /dev/null +++ b/src/globals/internal-env.php @@ -0,0 +1,49 @@ + (string) WindowsSystemUtil::getCpuCount(), + 'Darwin' => (string) MacOSSystemUtil::getCpuCount(), + 'Linux' => (string) LinuxSystemUtil::getCpuCount(), + 'BSD' => (string) BSDSystemUtil::getCpuCount(), + default => 1, +}); +define('GNU_ARCH', arch2gnu(php_uname('m'))); +define('MAC_ARCH', match ($_im8a = arch2gnu(php_uname('m'))) { + 'aarch64' => 'arm64', + default => $_im8a +}); + +// deprecated variables +define('SEPARATED_PATH', [ + '/' . pathinfo(BUILD_LIB_PATH)['basename'], // lib + '/' . pathinfo(BUILD_INCLUDE_PATH)['basename'], // include + BUILD_ROOT_PATH, +]); + +// add these to env vars with same name +GlobalEnvManager::putenv('BUILD_ROOT_PATH=' . BUILD_ROOT_PATH); +GlobalEnvManager::putenv('BUILD_INCLUDE_PATH=' . BUILD_INCLUDE_PATH); +GlobalEnvManager::putenv('BUILD_LIB_PATH=' . BUILD_LIB_PATH); +GlobalEnvManager::putenv('BUILD_BIN_PATH=' . BUILD_BIN_PATH); +GlobalEnvManager::putenv('PKG_ROOT_PATH=' . PKG_ROOT_PATH); +GlobalEnvManager::putenv('SOURCE_PATH=' . SOURCE_PATH); +GlobalEnvManager::putenv('DOWNLOAD_PATH=' . DOWNLOAD_PATH); +GlobalEnvManager::putenv('CPU_COUNT=' . CPU_COUNT); +GlobalEnvManager::putenv('GNU_ARCH=' . GNU_ARCH); +GlobalEnvManager::putenv('MAC_ARCH=' . MAC_ARCH); diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 881be3fd..e54f5e5e 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -13,7 +13,7 @@ declare(strict_types=1); $test_php_version = ['8.3']; -$test_os = ['macos-13', 'macos-14', 'ubuntu-latest', 'windows-latest']; +$test_os = ['macos-14', 'ubuntu-latest']; $zts = false; @@ -23,13 +23,13 @@ $upx = true; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'gmssl', - 'Windows' => 'gmssl', + 'Linux', 'Darwin' => '', + 'Windows' => '', }; // If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`). $with_libs = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'liblz4', + 'Linux', 'Darwin' => '', 'Windows' => '', }; @@ -37,7 +37,7 @@ $with_libs = match (PHP_OS_FAMILY) { // You can use `common`, `bulk`, `minimal` or `none`. // note: combination is only available for *nix platform. Windows must use `none` combination $base_combination = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'none', + 'Linux', 'Darwin' => 'common', 'Windows' => 'none', }; From 6af0a85dce459058f7f6a0897d6b6a709bebd016 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 1 Oct 2024 15:42:43 +0800 Subject: [PATCH 005/101] Add debug messages for doctor --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5b10f310..9f799734 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -177,7 +177,7 @@ jobs: run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - name: "Run Build Tests (doctor)" - run: bin/spc doctor --auto-fix + run: bin/spc doctor --auto-fix --debug - name: "Prepare UPX for Windows" if: matrix.os == 'windows-latest' From 24aac060512ff89a6bd5f886ad66171de2deb045 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 1 Oct 2024 15:49:08 +0800 Subject: [PATCH 006/101] Overwrite compile variables for musl wrapper build --- src/SPC/doctor/item/LinuxMuslCheck.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SPC/doctor/item/LinuxMuslCheck.php b/src/SPC/doctor/item/LinuxMuslCheck.php index e672ca20..6db69f39 100644 --- a/src/SPC/doctor/item/LinuxMuslCheck.php +++ b/src/SPC/doctor/item/LinuxMuslCheck.php @@ -73,9 +73,9 @@ class LinuxMuslCheck FileSystem::extractSource($musl_version_name, DOWNLOAD_PATH . "/{$musl_version_name}.tar.gz"); logger()->info('Installing musl wrapper'); shell()->cd(SOURCE_PATH . "/{$musl_version_name}") - ->exec('./configure --disable-gcc-wrapper') - ->exec('make -j') - ->exec("{$prefix}make install"); + ->exec('CC=gcc CXX=g++ AR=ar LD=ld ./configure --disable-gcc-wrapper') + ->exec('CC=gcc CXX=g++ AR=ar LD=ld make -j') + ->exec("CC=gcc CXX=g++ AR=ar LD=ld {$prefix}make install"); // TODO: add path using putenv instead of editing /etc/profile return true; } catch (RuntimeException) { From cfda286532c18b46cfe23fc4d6d7041ecac5f648 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 1 Oct 2024 16:00:13 +0800 Subject: [PATCH 007/101] Add pre-built test --- .github/workflows/tests.yml | 2 +- src/globals/test-extensions.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f799734..4816b076 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -193,7 +193,7 @@ jobs: - name: "Run Build Tests (download)" 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 + 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 $(php src/globals/test-extensions.php prefer_pre_built) - name: "Download pre-built libraries for pkg-config" if: matrix.os != 'windows-latest' diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index e54f5e5e..7871d623 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -21,6 +21,8 @@ $no_strip = false; $upx = true; +$prefer_pre_built = true; + // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { 'Linux', 'Darwin' => '', @@ -86,5 +88,6 @@ echo match ($argv[1]) { 'zts' => $zts ? '--enable-zts' : '', 'no_strip' => $no_strip ? '--no-strip' : '', 'upx' => $upx ? '--with-upx-pack' : '', + 'prefer_pre_built' => $prefer_pre_built ? '--prefer-pre-built' : '', default => '', }; From 4d551f3994db08619b10d3784cd8433bfe4ecd2b Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 1 Oct 2024 16:05:42 +0800 Subject: [PATCH 008/101] Add SPC_NO_MUSL_PATH env var --- src/SPC/util/GlobalEnvManager.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SPC/util/GlobalEnvManager.php b/src/SPC/util/GlobalEnvManager.php index 952db78c..b0242710 100644 --- a/src/SPC/util/GlobalEnvManager.php +++ b/src/SPC/util/GlobalEnvManager.php @@ -57,6 +57,9 @@ class GlobalEnvManager self::putenv("SPC_LINUX_DEFAULT_AR={$arch}-linux-musl-ar"); } self::putenv("SPC_PHP_DEFAULT_LD_LIBRARY_PATH=/usr/local/musl/{$arch}-linux-musl/lib"); + if (getenv('SPC_NO_MUSL_PATH') !== 'yes') { + self::putenv("PATH=/usr/local/musl/bin:/usr/local/musl/{$arch}-linux-musl/bin:" . getenv('PATH')); + } } // Init env.ini file, read order: From 8f8054873990bd464e85348c988208e7ec857b31 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 1 Oct 2024 16:11:46 +0800 Subject: [PATCH 009/101] Fix LD_LIBRARY_PATH --- config/env.ini | 10 +++++----- src/SPC/store/source/PhpSource.php | 6 +++++- src/SPC/util/GlobalEnvManager.php | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/config/env.ini b/config/env.ini index 793cbe44..b4ef4730 100644 --- a/config/env.ini +++ b/config/env.ini @@ -32,10 +32,10 @@ ; SPC_PHP_DEFAULT_OPTIMIZE_CFLAGS: the default optimization CFLAGS for compiling php. (if --no-strip option is set: `-g -O0`, else: `-g -Os`) ; ; * These vars are only be defined in LinuxBuilder * -; SPC_LINUX_DEFAULT_CC: the default compiler for linux. (For alpine linux: `gcc`, default: `$GNU_ARCH-linux-musl-gcc`) -; SPC_LINUX_DEFAULT_CXX: the default c++ compiler for linux. (For alpine linux: `g++`, default: `$GNU_ARCH-linux-musl-g++`) -; SPC_LINUX_DEFAULT_AR: the default archiver for linux. (For alpine linux: `ar`, default: `$GNU_ARCH-linux-musl-ar`) -; SPC_PHP_DEFAULT_LD_LIBRARY_PATH: the default LD_LIBRARY_PATH for php. (linux: `/usr/local/musl/$GNU_ARCH-linux-musl/lib`, default: empty) +; SPC_LINUX_DEFAULT_CC: the default compiler for linux. (For alpine linux: `gcc`, default: `$GNU_ARCH-linux-musl-gcc`) +; SPC_LINUX_DEFAULT_CXX: the default c++ compiler for linux. (For alpine linux: `g++`, default: `$GNU_ARCH-linux-musl-g++`) +; SPC_LINUX_DEFAULT_AR: the default archiver for linux. (For alpine linux: `ar`, default: `$GNU_ARCH-linux-musl-ar`) +; SPC_PHP_DEFAULT_LD_LIBRARY_PATH_CMD: the default LD_LIBRARY_PATH for php. (linux: `LD_LIBRARY_PATH=/usr/local/musl/$GNU_ARCH-linux-musl/lib`, default: empty) [global] @@ -76,7 +76,7 @@ SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime ; buildconf command SPC_CMD_PREFIX_PHP_BUILDCONF="./buildconf --force" ; configure command -SPC_CMD_PREFIX_PHP_CONFIGURE="${SPC_PHP_DEFAULT_LD_LIBRARY_PATH} ./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg" +SPC_CMD_PREFIX_PHP_CONFIGURE="${SPC_PHP_DEFAULT_LD_LIBRARY_PATH_CMD} ./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg" ; make command SPC_CMD_PREFIX_PHP_MAKE="make -j${SPC_CONCURRENCY}" diff --git a/src/SPC/store/source/PhpSource.php b/src/SPC/store/source/PhpSource.php index 79835636..5c3c5f53 100644 --- a/src/SPC/store/source/PhpSource.php +++ b/src/SPC/store/source/PhpSource.php @@ -20,7 +20,11 @@ class PhpSource extends CustomSourceBase public function fetch(bool $force = false, ?array $config = null, int $lock_as = SPC_LOCK_SOURCE): void { $major = defined('SPC_BUILD_PHP_VERSION') ? SPC_BUILD_PHP_VERSION : '8.1'; - Downloader::downloadSource('php-src', self::getLatestPHPInfo($major), $force); + if ($major === '8.4') { + Downloader::downloadSource('php-src', ['type' => 'url', 'url' => 'https://downloads.php.net/~saki/php-8.4.0RC1.tar.xz'], $force); + } else { + Downloader::downloadSource('php-src', self::getLatestPHPInfo($major), $force); + } } /** diff --git a/src/SPC/util/GlobalEnvManager.php b/src/SPC/util/GlobalEnvManager.php index b0242710..412db2b2 100644 --- a/src/SPC/util/GlobalEnvManager.php +++ b/src/SPC/util/GlobalEnvManager.php @@ -56,7 +56,7 @@ class GlobalEnvManager self::putenv("SPC_LINUX_DEFAULT_CXX={$arch}-linux-musl-g++"); self::putenv("SPC_LINUX_DEFAULT_AR={$arch}-linux-musl-ar"); } - self::putenv("SPC_PHP_DEFAULT_LD_LIBRARY_PATH=/usr/local/musl/{$arch}-linux-musl/lib"); + self::putenv("SPC_PHP_DEFAULT_LD_LIBRARY_PATH_CMD=\"LD_LIBRARY_PATH=/usr/local/musl/{$arch}-linux-musl/lib\""); if (getenv('SPC_NO_MUSL_PATH') !== 'yes') { self::putenv("PATH=/usr/local/musl/bin:/usr/local/musl/{$arch}-linux-musl/bin:" . getenv('PATH')); } From 25850ef8ebf69b3f061c7be5dd31742fbd17b6f6 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 1 Oct 2024 16:17:11 +0800 Subject: [PATCH 010/101] Fix LD_LIBRARY_PATH --- src/SPC/util/GlobalEnvManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/util/GlobalEnvManager.php b/src/SPC/util/GlobalEnvManager.php index 412db2b2..8bbe863a 100644 --- a/src/SPC/util/GlobalEnvManager.php +++ b/src/SPC/util/GlobalEnvManager.php @@ -56,7 +56,7 @@ class GlobalEnvManager self::putenv("SPC_LINUX_DEFAULT_CXX={$arch}-linux-musl-g++"); self::putenv("SPC_LINUX_DEFAULT_AR={$arch}-linux-musl-ar"); } - self::putenv("SPC_PHP_DEFAULT_LD_LIBRARY_PATH_CMD=\"LD_LIBRARY_PATH=/usr/local/musl/{$arch}-linux-musl/lib\""); + self::putenv("SPC_PHP_DEFAULT_LD_LIBRARY_PATH_CMD=LD_LIBRARY_PATH=/usr/local/musl/{$arch}-linux-musl/lib"); if (getenv('SPC_NO_MUSL_PATH') !== 'yes') { self::putenv("PATH=/usr/local/musl/bin:/usr/local/musl/{$arch}-linux-musl/bin:" . getenv('PATH')); } From 1ce3c1bc473255d8aad304ae4591b50a2c851074 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 1 Oct 2024 16:41:10 +0800 Subject: [PATCH 011/101] Use CPU_COUNT instead of SPC_CONCURRENCY --- config/env.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/env.ini b/config/env.ini index b4ef4730..d84d0acb 100644 --- a/config/env.ini +++ b/config/env.ini @@ -114,7 +114,7 @@ SPC_CMD_PREFIX_PHP_BUILDCONF="./buildconf --force" ; configure command SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg" ; make command -SPC_CMD_PREFIX_PHP_MAKE="make -j${SPC_CONCURRENCY}" +SPC_CMD_PREFIX_PHP_MAKE="make -j${CPU_COUNT}" ; *** default build vars for building php *** ; CFLAGS for configuring php From c841ef5b9acd30bc2823489e0b72d5ee8d3d130f Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 3 Oct 2024 10:44:49 +0800 Subject: [PATCH 012/101] Fix missing constant for PHP_SDK_PATH --- src/SPC/builder/windows/SystemUtil.php | 2 +- src/SPC/builder/windows/WindowsBuilder.php | 2 +- src/SPC/doctor/item/WindowsToolCheckList.php | 8 ++++---- src/SPC/store/FileSystem.php | 4 ++-- src/SPC/util/GlobalEnvManager.php | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/SPC/builder/windows/SystemUtil.php b/src/SPC/builder/windows/SystemUtil.php index e1794f94..4d3d38ff 100644 --- a/src/SPC/builder/windows/SystemUtil.php +++ b/src/SPC/builder/windows/SystemUtil.php @@ -21,7 +21,7 @@ class SystemUtil if (!$paths) { $paths = explode(PATH_SEPARATOR, getenv('Path')); if ($include_sdk_bin) { - $paths[] = PHP_SDK_PATH . '\bin'; + $paths[] = getenv('PHP_SDK_PATH') . '\bin'; } } foreach ($paths as $path) { diff --git a/src/SPC/builder/windows/WindowsBuilder.php b/src/SPC/builder/windows/WindowsBuilder.php index 1c1646d7..ecccce19 100644 --- a/src/SPC/builder/windows/WindowsBuilder.php +++ b/src/SPC/builder/windows/WindowsBuilder.php @@ -38,7 +38,7 @@ class WindowsBuilder extends BuilderBase // ---------- set necessary options ---------- // set sdk (require visual studio 16 or 17) $vs = SystemUtil::findVisualStudio()['version']; - $this->sdk_prefix = PHP_SDK_PATH . "\\phpsdk-{$vs}-x64.bat -t"; + $this->sdk_prefix = getenv('PHP_SDK_PATH') . "\\phpsdk-{$vs}-x64.bat -t"; // set zts $this->zts = $this->getOption('enable-zts', false); diff --git a/src/SPC/doctor/item/WindowsToolCheckList.php b/src/SPC/doctor/item/WindowsToolCheckList.php index b66737cc..bfeb063e 100644 --- a/src/SPC/doctor/item/WindowsToolCheckList.php +++ b/src/SPC/doctor/item/WindowsToolCheckList.php @@ -37,10 +37,10 @@ class WindowsToolCheckList #[AsCheckItem('if php-sdk-binary-tools are downloaded', limit_os: 'Windows', level: 997)] public function checkSDK(): ?CheckResult { - if (!file_exists(PHP_SDK_PATH . DIRECTORY_SEPARATOR . 'phpsdk-starter.bat')) { + if (!file_exists(getenv('PHP_SDK_PATH') . DIRECTORY_SEPARATOR . 'phpsdk-starter.bat')) { return CheckResult::fail('php-sdk-binary-tools not downloaded', 'install-php-sdk'); } - return CheckResult::ok(PHP_SDK_PATH); + return CheckResult::ok(getenv('PHP_SDK_PATH')); } #[AsCheckItem('if git associated command exists', limit_os: 'Windows', level: 996)] @@ -81,8 +81,8 @@ class WindowsToolCheckList public function installPhpSdk(): bool { try { - FileSystem::removeDir(PHP_SDK_PATH); - cmd(true)->exec('git.exe clone --depth 1 https://github.com/php/php-sdk-binary-tools.git ' . PHP_SDK_PATH); + FileSystem::removeDir(getenv('PHP_SDK_PATH')); + cmd(true)->exec('git.exe clone --depth 1 https://github.com/php/php-sdk-binary-tools.git ' . getenv('PHP_SDK_PATH')); } catch (RuntimeException) { return false; } diff --git a/src/SPC/store/FileSystem.php b/src/SPC/store/FileSystem.php index cbf6107e..4b5b32d6 100644 --- a/src/SPC/store/FileSystem.php +++ b/src/SPC/store/FileSystem.php @@ -428,7 +428,7 @@ class FileSystem { $replacement = [ '{pkg_root_path}' => PKG_ROOT_PATH, - '{php_sdk_path}' => defined('PHP_SDK_PATH') ? PHP_SDK_PATH : WORKING_DIR . '/php-sdk-binary-tools', + '{php_sdk_path}' => getenv('PHP_SDK_PATH') ? getenv('PHP_SDK_PATH') : WORKING_DIR . '/php-sdk-binary-tools', '{working_dir}' => WORKING_DIR, '{download_path}' => DOWNLOAD_PATH, '{source_path}' => SOURCE_PATH, @@ -480,7 +480,7 @@ class FileSystem }; } elseif (PHP_OS_FAMILY === 'Windows') { // use php-sdk-binary-tools/bin/7za.exe - $_7z = self::convertPath(PHP_SDK_PATH . '/bin/7za.exe'); + $_7z = self::convertPath(getenv('PHP_SDK_PATH') . '/bin/7za.exe'); // Windows notes: I hate windows tar....... // When extracting .tar.gz like libxml2, it shows a symlink error and returns code[1]. diff --git a/src/SPC/util/GlobalEnvManager.php b/src/SPC/util/GlobalEnvManager.php index 8bbe863a..230ad2e8 100644 --- a/src/SPC/util/GlobalEnvManager.php +++ b/src/SPC/util/GlobalEnvManager.php @@ -46,7 +46,7 @@ class GlobalEnvManager // Define env vars for linux if (PHP_OS_FAMILY === 'Linux') { - $arch = GNU_ARCH; + $arch = arch2gnu(php_uname('m')); if (SystemUtil::isMuslDist()) { self::putenv('SPC_LINUX_DEFAULT_CC=gcc'); self::putenv('SPC_LINUX_DEFAULT_CXX=g++'); From dc9d6703bc70b8961372a592df1a3518a09d7579 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 3 Oct 2024 10:45:05 +0800 Subject: [PATCH 013/101] Fix phpstan, add more phpunit test --- phpstan.neon | 3 +- phpunit.xml.dist | 5 ++ tests/SPC/builder/BuilderProviderTest.php | 28 +++++++ tests/SPC/builder/ExtensionTest.php | 91 +++++++++++++++++++++++ tests/bootstrap.php | 5 ++ 5 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 phpunit.xml.dist create mode 100644 tests/SPC/builder/BuilderProviderTest.php create mode 100644 tests/SPC/builder/ExtensionTest.php create mode 100644 tests/bootstrap.php diff --git a/phpstan.neon b/phpstan.neon index 241a8dbb..1fcd78e5 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,7 +4,6 @@ parameters: paths: - ./src/ ignoreErrors: - - '#Constant .* not found#' - '#Unsafe usage of new static#' - '#class Fiber#' - '#Attribute class JetBrains\\PhpStorm\\ArrayShape does not exist#' @@ -15,4 +14,4 @@ parameters: analyseAndScan: - ./src/globals/ext-tests/swoole.php - ./src/globals/ext-tests/swoole.phpt - - ./src/globals/test-extensions.php \ No newline at end of file + - ./src/globals/test-extensions.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 00000000..9b045629 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/tests/SPC/builder/BuilderProviderTest.php b/tests/SPC/builder/BuilderProviderTest.php new file mode 100644 index 00000000..52a0d35d --- /dev/null +++ b/tests/SPC/builder/BuilderProviderTest.php @@ -0,0 +1,28 @@ +assertInstanceOf(BuilderBase::class, BuilderProvider::makeBuilderByInput(new ArgvInput())); + $this->assertInstanceOf(BuilderBase::class, BuilderProvider::getBuilder()); + } +} diff --git a/tests/SPC/builder/ExtensionTest.php b/tests/SPC/builder/ExtensionTest.php new file mode 100644 index 00000000..d618980d --- /dev/null +++ b/tests/SPC/builder/ExtensionTest.php @@ -0,0 +1,91 @@ +proveLibs($libs); + $builder->proveExts($extensions); + $this->extension = $builder->getExt('mbregex'); + } + + public function testPatches() + { + $this->assertFalse($this->extension->patchBeforeBuildconf()); + $this->assertFalse($this->extension->patchBeforeConfigure()); + $this->assertFalse($this->extension->patchBeforeMake()); + } + + public function testGetExtensionDependency() + { + $this->assertEquals('mbstring', current($this->extension->getExtensionDependency())->getName()); + } + + public function testGetWindowsConfigureArg() + { + $this->assertEquals('', $this->extension->getWindowsConfigureArg()); + } + + public function testGetConfigureArg() + { + $this->assertEquals('', $this->extension->getUnixConfigureArg()); + } + + public function testGetExtVersion() + { + // only swoole has version, we cannot test it + $this->assertEquals(null, $this->extension->getExtVersion()); + } + + public function testGetDistName() + { + $this->assertEquals('mbregex', $this->extension->getName()); + } + + public function testRunCliCheckWindows() + { + if (is_unix()) { + $this->markTestIncomplete('This test is for Windows only'); + } else { + $this->extension->runCliCheckWindows(); + $this->assertTrue(true); + } + } + + public function testGetLibFilesString() + { + $this->assertStringEndsWith('libonig.a', $this->extension->getLibFilesString()); + } + + public function testGetName() + { + $this->assertEquals('mbregex', $this->extension->getName()); + } + + public function testGetUnixConfigureArg() + { + $this->assertEquals('', $this->extension->getUnixConfigureArg()); + } + + public function testGetEnableArg() + { + $this->assertEquals('', $this->extension->getEnableArg()); + } +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 00000000..bca0084d --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,5 @@ + Date: Thu, 3 Oct 2024 10:48:22 +0800 Subject: [PATCH 014/101] Add ignore musl for phpunit test --- .github/workflows/tests.yml | 2 +- src/SPC/builder/linux/LinuxBuilder.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4816b076..b8ee2ebc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -109,7 +109,7 @@ jobs: - name: "Run PHPUnit Tests" run: | - vendor/bin/phpunit tests/ --no-coverage + SPC_NO_MUSL_PATH=yes vendor/bin/phpunit tests/ --no-coverage define-matrix: name: "Define Matrix" diff --git a/src/SPC/builder/linux/LinuxBuilder.php b/src/SPC/builder/linux/LinuxBuilder.php index 14a1b987..1e07a624 100644 --- a/src/SPC/builder/linux/LinuxBuilder.php +++ b/src/SPC/builder/linux/LinuxBuilder.php @@ -35,7 +35,7 @@ class LinuxBuilder extends UnixBuilderBase GlobalEnvManager::init($this); - if (str_ends_with(getenv('CC'), 'linux-musl-gcc') && !file_exists("/usr/local/musl/bin/{$arch}-linux-musl-gcc")) { + if (str_ends_with(getenv('CC'), 'linux-musl-gcc') && !file_exists("/usr/local/musl/bin/{$arch}-linux-musl-gcc") && (getenv('SPC_NO_MUSL_PATH') !== 'yes')) { throw new WrongUsageException('musl-cross-make not installed, please install it first. (You can use `doctor` command to install it)'); } From 0568d4b4c873bc4b8c4f6e7f4643f8ec4022a10b Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 3 Oct 2024 10:53:22 +0800 Subject: [PATCH 015/101] Ignore env that already set in shell scripts --- src/SPC/util/GlobalEnvManager.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SPC/util/GlobalEnvManager.php b/src/SPC/util/GlobalEnvManager.php index 230ad2e8..70893b94 100644 --- a/src/SPC/util/GlobalEnvManager.php +++ b/src/SPC/util/GlobalEnvManager.php @@ -101,7 +101,9 @@ class GlobalEnvManager private static function applyConfig(array $ini): void { foreach ($ini as $k => $v) { - self::putenv($k . '=' . $v); + if (getenv($k) === false) { + self::putenv($k . '=' . $v); + } } } } From c800e3b93ad96157a43f6742580edbd90cd189c1 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 3 Oct 2024 10:56:39 +0800 Subject: [PATCH 016/101] Remove proveExts --- tests/SPC/builder/ExtensionTest.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/SPC/builder/ExtensionTest.php b/tests/SPC/builder/ExtensionTest.php index d618980d..5e8ae92d 100644 --- a/tests/SPC/builder/ExtensionTest.php +++ b/tests/SPC/builder/ExtensionTest.php @@ -7,6 +7,7 @@ namespace SPC\Tests\builder; use PHPUnit\Framework\TestCase; use SPC\builder\BuilderProvider; use SPC\builder\Extension; +use SPC\util\CustomExt; use SPC\util\DependencyUtil; use Symfony\Component\Console\Input\ArgvInput; @@ -22,7 +23,15 @@ class ExtensionTest extends TestCase $builder = BuilderProvider::makeBuilderByInput(new ArgvInput()); [$extensions, $libs] = DependencyUtil::getExtsAndLibs(['mbregex']); $builder->proveLibs($libs); - $builder->proveExts($extensions); + CustomExt::loadCustomExt(); + foreach ($extensions as $extension) { + $class = CustomExt::getExtClass($extension); + $ext = new $class($extension, $builder); + $builder->addExt($ext); + } + foreach ($builder->getExts() as $ext) { + $ext->checkDependency(); + } $this->extension = $builder->getExt('mbregex'); } From 732fa06abb5c85cb7a216dc5881c636015eaa7ca Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 3 Oct 2024 14:52:46 +0800 Subject: [PATCH 017/101] Add new tests, remove redundant code --- composer.json | 3 +- composer.lock | 2473 ++++++++++------- src/SPC/builder/BuilderBase.php | 24 - src/SPC/builder/linux/SystemUtil.php | 47 - tests/SPC/builder/BuilderProviderTest.php | 28 - tests/SPC/builder/BuilderTest.php | 248 ++ tests/SPC/builder/linux/SystemUtilTest.php | 70 + tests/SPC/builder/macos/SystemUtilTest.php | 31 + tests/SPC/builder/unix/UnixSystemUtilTest.php | 52 + tests/SPC/store/CurlHookTest.php | 24 + tests/SPC/store/DownloaderTest.php | 46 + ..._api_AOMediaCodec_libavif_releases.json.gz | Bin 0 -> 15506 bytes tests/bootstrap.php | 1 + tests/mock/SPC_store.php | 24 + 14 files changed, 2021 insertions(+), 1050 deletions(-) delete mode 100644 tests/SPC/builder/BuilderProviderTest.php create mode 100644 tests/SPC/builder/BuilderTest.php create mode 100644 tests/SPC/builder/linux/SystemUtilTest.php create mode 100644 tests/SPC/builder/macos/SystemUtilTest.php create mode 100644 tests/SPC/builder/unix/UnixSystemUtilTest.php create mode 100644 tests/SPC/store/CurlHookTest.php create mode 100644 tests/SPC/store/DownloaderTest.php create mode 100644 tests/assets/github_api_AOMediaCodec_libavif_releases.json.gz create mode 100644 tests/mock/SPC_store.php diff --git a/composer.json b/composer.json index 6bee5fba..ef41d17c 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,7 @@ "require": { "php": ">= 8.1", "ext-mbstring": "*", + "ext-zlib": "*", "laravel/prompts": "^0.1.12", "symfony/console": "^5.4 || ^6 || ^7", "zhamao/logger": "^1.0" @@ -22,7 +23,7 @@ "humbug/box": "^4.5", "nunomaduro/collision": "^7.8", "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.3 || ^9" + "phpunit/phpunit": "^10.3" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index fbdcb19e..3f5302da 100644 --- a/composer.lock +++ b/composer.lock @@ -4,35 +4,35 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "186e104804f9b096eaf08f153e52fb36", + "content-hash": "75f83f478863481b58c20716481f30a6", "packages": [ { "name": "illuminate/collections", - "version": "v10.48.13", + "version": "v11.26.0", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", - "reference": "994cedcd2060b65918efe46da805ac31b0563034" + "reference": "4d333ea19a27230b424b9af56f34cd658b5bbce2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/994cedcd2060b65918efe46da805ac31b0563034", - "reference": "994cedcd2060b65918efe46da805ac31b0563034", + "url": "https://api.github.com/repos/illuminate/collections/zipball/4d333ea19a27230b424b9af56f34cd658b5bbce2", + "reference": "4d333ea19a27230b424b9af56f34cd658b5bbce2", "shasum": "" }, "require": { - "illuminate/conditionable": "^10.0", - "illuminate/contracts": "^10.0", - "illuminate/macroable": "^10.0", - "php": "^8.1" + "illuminate/conditionable": "^11.0", + "illuminate/contracts": "^11.0", + "illuminate/macroable": "^11.0", + "php": "^8.2" }, "suggest": { - "symfony/var-dumper": "Required to use the dump method (^6.2)." + "symfony/var-dumper": "Required to use the dump method (^7.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "11.x-dev" } }, "autoload": { @@ -59,20 +59,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-06-04T13:31:47+00:00" + "time": "2024-09-27T14:54:48+00:00" }, { "name": "illuminate/conditionable", - "version": "v10.48.13", + "version": "v11.26.0", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", - "reference": "d0958e4741fc9d6f516a552060fd1b829a85e009" + "reference": "362dd761b9920367bca1427a902158225e9e3a23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/conditionable/zipball/d0958e4741fc9d6f516a552060fd1b829a85e009", - "reference": "d0958e4741fc9d6f516a552060fd1b829a85e009", + "url": "https://api.github.com/repos/illuminate/conditionable/zipball/362dd761b9920367bca1427a902158225e9e3a23", + "reference": "362dd761b9920367bca1427a902158225e9e3a23", "shasum": "" }, "require": { @@ -81,7 +81,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "11.x-dev" } }, "autoload": { @@ -105,31 +105,31 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-02-03T08:06:17+00:00" + "time": "2024-06-28T20:10:30+00:00" }, { "name": "illuminate/contracts", - "version": "v10.48.13", + "version": "v11.26.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac" + "reference": "56312862af937bd6da8e6dc8bbd88188dfb478f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac", - "reference": "8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/56312862af937bd6da8e6dc8bbd88188dfb478f8", + "reference": "56312862af937bd6da8e6dc8bbd88188dfb478f8", "shasum": "" }, "require": { - "php": "^8.1", + "php": "^8.2", "psr/container": "^1.1.1|^2.0.1", "psr/simple-cache": "^1.0|^2.0|^3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "11.x-dev" } }, "autoload": { @@ -153,29 +153,29 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-01-15T18:52:32+00:00" + "time": "2024-09-22T15:08:08+00:00" }, { "name": "illuminate/macroable", - "version": "v10.48.13", + "version": "v11.26.0", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", - "reference": "dff667a46ac37b634dcf68909d9d41e94dc97c27" + "reference": "e1cb9e51b9ed5d3c9bc1ab431d0a52fe42a990ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/macroable/zipball/dff667a46ac37b634dcf68909d9d41e94dc97c27", - "reference": "dff667a46ac37b634dcf68909d9d41e94dc97c27", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/e1cb9e51b9ed5d3c9bc1ab431d0a52fe42a990ed", + "reference": "e1cb9e51b9ed5d3c9bc1ab431d0a52fe42a990ed", "shasum": "" }, "require": { - "php": "^8.1" + "php": "^8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "11.x-dev" } }, "autoload": { @@ -199,20 +199,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-06-05T12:46:42+00:00" + "time": "2024-06-28T20:10:30+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.24", + "version": "v0.1.25", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "409b0b4305273472f3754826e68f4edbd0150149" + "reference": "7b4029a84c37cb2725fc7f011586e2997040bc95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/409b0b4305273472f3754826e68f4edbd0150149", - "reference": "409b0b4305273472f3754826e68f4edbd0150149", + "url": "https://api.github.com/repos/laravel/prompts/zipball/7b4029a84c37cb2725fc7f011586e2997040bc95", + "reference": "7b4029a84c37cb2725fc7f011586e2997040bc95", "shasum": "" }, "require": { @@ -255,9 +255,9 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.24" + "source": "https://github.com/laravel/prompts/tree/v0.1.25" }, - "time": "2024-06-17T13:58:22+00:00" + "time": "2024-08-12T22:06:33+00:00" }, { "name": "psr/container", @@ -314,16 +314,16 @@ }, { "name": "psr/log", - "version": "3.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { @@ -358,9 +358,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-07-14T16:46:02+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "psr/simple-cache", @@ -415,16 +415,16 @@ }, { "name": "symfony/console", - "version": "v6.4.8", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91" + "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/be5854cee0e8c7b110f00d695d11debdfa1a2a91", - "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91", + "url": "https://api.github.com/repos/symfony/console/zipball/72d080eb9edf80e36c19be61f72c98ed8273b765", + "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765", "shasum": "" }, "require": { @@ -489,7 +489,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.8" + "source": "https://github.com/symfony/console/tree/v6.4.12" }, "funding": [ { @@ -505,7 +505,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-09-20T08:15:52+00:00" }, { "name": "symfony/deprecation-contracts", @@ -576,20 +576,20 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -635,7 +635,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -651,24 +651,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", - "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -713,7 +713,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -729,24 +729,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -794,7 +794,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -810,24 +810,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -874,7 +874,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -890,7 +890,7 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/service-contracts", @@ -977,20 +977,20 @@ }, { "name": "symfony/string", - "version": "v6.4.8", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "a147c0f826c4a1f3afb763ab8e009e37c877a44d" + "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/a147c0f826c4a1f3afb763ab8e009e37c877a44d", - "reference": "a147c0f826c4a1f3afb763ab8e009e37c877a44d", + "url": "https://api.github.com/repos/symfony/string/zipball/d66f9c343fa894ec2037cc928381df90a7ad4306", + "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -1000,11 +1000,12 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/intl": "^6.2|^7.0", + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0|^7.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1043,7 +1044,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.8" + "source": "https://github.com/symfony/string/tree/v7.1.5" }, "funding": [ { @@ -1059,7 +1060,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-09-20T08:28:38+00:00" }, { "name": "zhamao/logger", @@ -1134,43 +1135,36 @@ "packages-dev": [ { "name": "amphp/amp", - "version": "v2.6.4", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d" + "reference": "138801fb68cfc9c329da8a7b39d01ce7291ee4b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", - "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", + "url": "https://api.github.com/repos/amphp/amp/zipball/138801fb68cfc9c329da8a7b39d01ce7291ee4b0", + "reference": "138801fb68cfc9c329da8a7b39d01ce7291ee4b0", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^7 | ^8 | ^9", - "react/promise": "^2", - "vimeo/psalm": "^3.12" + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "5.23.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, "autoload": { "files": [ - "lib/functions.php", - "lib/Internal/functions.php" + "src/functions.php", + "src/Future/functions.php", + "src/Internal/functions.php" ], "psr-4": { - "Amp\\": "lib" + "Amp\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1178,10 +1172,6 @@ "MIT" ], "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, { "name": "Aaron Piotrowski", "email": "aaron@trowski.com" @@ -1193,6 +1183,10 @@ { "name": "Niklas Keller", "email": "me@kelunik.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" } ], "description": "A non-blocking concurrency framework for PHP applications.", @@ -1209,9 +1203,8 @@ "promise" ], "support": { - "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.4" + "source": "https://github.com/amphp/amp/tree/v3.0.2" }, "funding": [ { @@ -1219,41 +1212,45 @@ "type": "github" } ], - "time": "2024-03-21T18:52:26+00:00" + "time": "2024-05-10T21:37:46+00:00" }, { "name": "amphp/byte-stream", - "version": "v1.8.2", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc" + "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/4f0e968ba3798a423730f567b1b50d3441c16ddc", - "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/daa00f2efdbd71565bf64ffefa89e37542addf93", + "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93", "shasum": "" }, "require": { - "amphp/amp": "^2", - "php": ">=7.1" + "amphp/amp": "^3", + "amphp/parser": "^1.1", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2.3" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.4", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "psalm/phar": "^3.11.4" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.22.1" }, "type": "library", "autoload": { "files": [ - "lib/functions.php" + "src/functions.php", + "src/Internal/functions.php" ], "psr-4": { - "Amp\\ByteStream\\": "lib" + "Amp\\ByteStream\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1282,7 +1279,7 @@ ], "support": { "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.2" + "source": "https://github.com/amphp/byte-stream/tree/v2.1.1" }, "funding": [ { @@ -1290,45 +1287,204 @@ "type": "github" } ], - "time": "2024-04-13T18:00:56+00:00" + "time": "2024-02-17T04:49:38+00:00" }, { - "name": "amphp/parallel", - "version": "v1.4.3", + "name": "amphp/cache", + "version": "v2.0.1", "source": { "type": "git", - "url": "https://github.com/amphp/parallel.git", - "reference": "3aac213ba7858566fd83d38ccb85b91b2d652cb0" + "url": "https://github.com/amphp/cache.git", + "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/3aac213ba7858566fd83d38ccb85b91b2d652cb0", - "reference": "3aac213ba7858566fd83d38ccb85b91b2d652cb0", + "url": "https://api.github.com/repos/amphp/cache/zipball/46912e387e6aa94933b61ea1ead9cf7540b7797c", + "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.6.1", - "amphp/parser": "^1", - "amphp/process": "^1", + "amphp/amp": "^3", "amphp/serialization": "^1", - "amphp/sync": "^1.0.1", - "php": ">=7.1" + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "phpunit/phpunit": "^8 || ^7" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Cache\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + } + ], + "description": "A fiber-aware cache API based on Amp and Revolt.", + "homepage": "https://amphp.org/cache", + "support": { + "issues": "https://github.com/amphp/cache/issues", + "source": "https://github.com/amphp/cache/tree/v2.0.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-04-19T03:38:06+00:00" + }, + { + "name": "amphp/dns", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/dns.git", + "reference": "758266b0ea7470e2e42cd098493bc6d6c7100cf7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/dns/zipball/758266b0ea7470e2e42cd098493bc6d6c7100cf7", + "reference": "758266b0ea7470e2e42cd098493bc6d6c7100cf7", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", + "amphp/parser": "^1", + "amphp/windows-registry": "^1.0.1", + "daverandom/libdns": "^2.0.2", + "ext-filter": "*", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.20" }, "type": "library", "autoload": { "files": [ - "lib/Context/functions.php", - "lib/Sync/functions.php", - "lib/Worker/functions.php" + "src/functions.php" ], "psr-4": { - "Amp\\Parallel\\": "lib" + "Amp\\Dns\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Wright", + "email": "addr@daverandom.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "Async DNS resolution for Amp.", + "homepage": "https://github.com/amphp/dns", + "keywords": [ + "amp", + "amphp", + "async", + "client", + "dns", + "resolve" + ], + "support": { + "issues": "https://github.com/amphp/dns/issues", + "source": "https://github.com/amphp/dns/tree/v2.2.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-06-02T19:54:12+00:00" + }, + { + "name": "amphp/parallel", + "version": "v2.2.9", + "source": { + "type": "git", + "url": "https://github.com/amphp/parallel.git", + "reference": "73d293f1fc4df1bebc3c4fce1432e82dd7032238" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/parallel/zipball/73d293f1fc4df1bebc3c4fce1432e82dd7032238", + "reference": "73d293f1fc4df1bebc3c4fce1432e82dd7032238", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", + "amphp/parser": "^1", + "amphp/pipeline": "^1", + "amphp/process": "^2", + "amphp/serialization": "^1", + "amphp/socket": "^2", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.18" + }, + "type": "library", + "autoload": { + "files": [ + "src/Context/functions.php", + "src/Context/Internal/functions.php", + "src/Ipc/functions.php", + "src/Worker/functions.php" + ], + "psr-4": { + "Amp\\Parallel\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1340,6 +1496,10 @@ "name": "Aaron Piotrowski", "email": "aaron@trowski.com" }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, { "name": "Stephen Coakley", "email": "me@stephencoakley.com" @@ -1356,7 +1516,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v1.4.3" + "source": "https://github.com/amphp/parallel/tree/v2.2.9" }, "funding": [ { @@ -1364,65 +1524,7 @@ "type": "github" } ], - "time": "2023-03-23T08:04:23+00:00" - }, - { - "name": "amphp/parallel-functions", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/parallel-functions.git", - "reference": "04e92fcacfc921a56dfe12c23b3265e62593a7cb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel-functions/zipball/04e92fcacfc921a56dfe12c23b3265e62593a7cb", - "reference": "04e92fcacfc921a56dfe12c23b3265e62593a7cb", - "shasum": "" - }, - "require": { - "amphp/amp": "^2.0.3", - "amphp/parallel": "^1.4", - "amphp/serialization": "^1.0", - "laravel/serializable-closure": "^1.0", - "php": ">=7.4" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "v2.x-dev", - "amphp/phpunit-util": "^2.0", - "phpunit/phpunit": "^9.5.11" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "Amp\\ParallelFunctions\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Parallel processing made simple.", - "support": { - "issues": "https://github.com/amphp/parallel-functions/issues", - "source": "https://github.com/amphp/parallel-functions/tree/v1.1.0" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2022-02-03T19:32:41+00:00" + "time": "2024-03-24T18:27:44+00:00" }, { "name": "amphp/parser", @@ -1487,36 +1589,106 @@ "time": "2024-03-21T19:16:53+00:00" }, { - "name": "amphp/process", - "version": "v1.1.7", + "name": "amphp/pipeline", + "version": "v1.2.1", "source": { "type": "git", - "url": "https://github.com/amphp/process.git", - "reference": "1949d85b6d71af2818ff68144304a98495628f19" + "url": "https://github.com/amphp/pipeline.git", + "reference": "66c095673aa5b6e689e63b52d19e577459129ab3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/1949d85b6d71af2818ff68144304a98495628f19", - "reference": "1949d85b6d71af2818ff68144304a98495628f19", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/66c095673aa5b6e689e63b52d19e577459129ab3", + "reference": "66c095673aa5b6e689e63b52d19e577459129ab3", "shasum": "" }, "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.4", - "php": ">=7.1" + "amphp/amp": "^3", + "php": ">=8.1", + "revolt/event-loop": "^1" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.18" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Pipeline\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Asynchronous iterators and operators.", + "homepage": "https://amphp.org/pipeline", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "iterator", + "non-blocking" + ], + "support": { + "issues": "https://github.com/amphp/pipeline/issues", + "source": "https://github.com/amphp/pipeline/tree/v1.2.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-07-04T00:56:47+00:00" + }, + { + "name": "amphp/process", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/amphp/process.git", + "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/process/zipball/52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", + "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "files": [ - "lib/functions.php" + "src/functions.php" ], "psr-4": { - "Amp\\Process\\": "lib" + "Amp\\Process\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1537,11 +1709,11 @@ "email": "me@kelunik.com" } ], - "description": "Asynchronous process manager.", - "homepage": "https://github.com/amphp/process", + "description": "A fiber-aware process manager based on Amp and Revolt.", + "homepage": "https://amphp.org/process", "support": { "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v1.1.7" + "source": "https://github.com/amphp/process/tree/v2.0.3" }, "funding": [ { @@ -1549,7 +1721,7 @@ "type": "github" } ], - "time": "2024-04-19T03:00:28+00:00" + "time": "2024-04-19T03:13:44+00:00" }, { "name": "amphp/serialization", @@ -1610,33 +1782,120 @@ "time": "2020-03-25T21:39:07+00:00" }, { - "name": "amphp/sync", - "version": "v1.4.2", + "name": "amphp/socket", + "version": "v2.3.1", "source": { "type": "git", - "url": "https://github.com/amphp/sync.git", - "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf" + "url": "https://github.com/amphp/socket.git", + "reference": "58e0422221825b79681b72c50c47a930be7bf1e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/sync/zipball/85ab06764f4f36d63b1356b466df6111cf4b89cf", - "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf", + "url": "https://api.github.com/repos/amphp/socket/zipball/58e0422221825b79681b72c50c47a930be7bf1e1", + "reference": "58e0422221825b79681b72c50c47a930be7bf1e1", "shasum": "" }, "require": { - "amphp/amp": "^2.2", - "php": ">=7.1" + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/dns": "^2", + "ext-openssl": "*", + "kelunik/certificate": "^1.1", + "league/uri": "^6.5 | ^7", + "league/uri-interfaces": "^2.3 | ^7", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "phpunit/phpunit": "^9 || ^8 || ^7" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "amphp/process": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "5.20" }, "type": "library", "autoload": { "files": [ "src/functions.php", - "src/ConcurrentIterator/functions.php" + "src/Internal/functions.php", + "src/SocketAddress/functions.php" + ], + "psr-4": { + "Amp\\Socket\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@gmail.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Non-blocking socket connection / server implementations based on Amp and Revolt.", + "homepage": "https://github.com/amphp/socket", + "keywords": [ + "amp", + "async", + "encryption", + "non-blocking", + "sockets", + "tcp", + "tls" + ], + "support": { + "issues": "https://github.com/amphp/socket/issues", + "source": "https://github.com/amphp/socket/tree/v2.3.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-04-21T14:33:03+00:00" + }, + { + "name": "amphp/sync", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/sync.git", + "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/sync/zipball/217097b785130d77cfcc58ff583cf26cd1770bf1", + "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.23" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" ], "psr-4": { "Amp\\Sync\\": "src" @@ -1651,12 +1910,16 @@ "name": "Aaron Piotrowski", "email": "aaron@trowski.com" }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, { "name": "Stephen Coakley", "email": "me@stephencoakley.com" } ], - "description": "Mutex, Semaphore, and other synchronization tools for Amp.", + "description": "Non-blocking synchronization primitives for PHP based on Amp and Revolt.", "homepage": "https://github.com/amphp/sync", "keywords": [ "async", @@ -1667,7 +1930,7 @@ ], "support": { "issues": "https://github.com/amphp/sync/issues", - "source": "https://github.com/amphp/sync/tree/v1.4.2" + "source": "https://github.com/amphp/sync/tree/v2.3.0" }, "funding": [ { @@ -1675,11 +1938,63 @@ "type": "github" } ], - "time": "2021-10-25T18:29:10+00:00" + "time": "2024-08-03T19:31:26+00:00" + }, + { + "name": "amphp/windows-registry", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/windows-registry.git", + "reference": "0d569e8f256cca974e3842b6e78b4e434bf98306" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/windows-registry/zipball/0d569e8f256cca974e3842b6e78b4e434bf98306", + "reference": "0d569e8f256cca974e3842b6e78b4e434bf98306", + "shasum": "" + }, + "require": { + "amphp/byte-stream": "^2", + "amphp/process": "^2", + "php": ">=8.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "psalm/phar": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\WindowsRegistry\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Windows Registry Reader.", + "support": { + "issues": "https://github.com/amphp/windows-registry/issues", + "source": "https://github.com/amphp/windows-registry/tree/v1.0.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-01-30T23:01:51+00:00" }, { "name": "captainhook/captainhook-phar", - "version": "5.23.1", + "version": "5.23.5", "source": { "type": "git", "url": "https://github.com/captainhookphp/captainhook-phar.git", @@ -1733,7 +2048,7 @@ ], "support": { "issues": "https://github.com/captainhookphp/captainhook/issues", - "source": "https://github.com/captainhookphp/captainhook-phar/tree/5.23.1" + "source": "https://github.com/captainhookphp/captainhook-phar/tree/5.23.5" }, "funding": [ { @@ -1856,30 +2171,38 @@ }, { "name": "composer/pcre", - "version": "3.1.4", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "04229f163664973f68f38f6f73d917799168ef24" + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", - "reference": "04229f163664973f68f38f6f73d917799168ef24", + "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4", + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4", "shasum": "" }, "require": { "php": "^7.4 || ^8.0" }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, "require-dev": { - "phpstan/phpstan": "^1.3", + "phpstan/phpstan": "^1.11.10", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" + "phpunit/phpunit": "^8 || ^9" }, "type": "library", "extra": { "branch-alias": { "dev-main": "3.x-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -1907,7 +2230,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.4" + "source": "https://github.com/composer/pcre/tree/3.3.1" }, "funding": [ { @@ -1923,28 +2246,28 @@ "type": "tidelift" } ], - "time": "2024-05-27T13:40:54+00:00" + "time": "2024-08-27T18:44:43+00:00" }, { "name": "composer/semver", - "version": "3.4.0", + "version": "3.4.3", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" }, "type": "library", "extra": { @@ -1988,7 +2311,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.0" + "source": "https://github.com/composer/semver/tree/3.4.3" }, "funding": [ { @@ -2004,7 +2327,7 @@ "type": "tidelift" } ], - "time": "2023-08-31T09:50:34+00:00" + "time": "2024-09-19T14:15:21+00:00" }, { "name": "composer/xdebug-handler", @@ -2072,6 +2395,50 @@ ], "time": "2024-05-06T16:37:16+00:00" }, + { + "name": "daverandom/libdns", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/DaveRandom/LibDNS.git", + "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", + "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "Required for IDN support" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "LibDNS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "DNS protocol implementation written in pure PHP", + "keywords": [ + "dns" + ], + "support": { + "issues": "https://github.com/DaveRandom/LibDNS/issues", + "source": "https://github.com/DaveRandom/LibDNS/tree/v2.1.0" + }, + "time": "2024-04-12T12:12:48+00:00" + }, { "name": "doctrine/deprecations", "version": "1.1.3", @@ -2119,76 +2486,6 @@ }, "time": "2024-01-30T19:34:25+00:00" }, - { - "name": "doctrine/instantiator", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:23:10+00:00" - }, { "name": "evenement/evenement", "version": "v3.0.2", @@ -2238,44 +2535,45 @@ }, { "name": "fidry/console", - "version": "0.5.5", + "version": "0.6.10", "source": { "type": "git", "url": "https://github.com/theofidry/console.git", - "reference": "bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7" + "reference": "a681ea3aa7f5c0c78cd437250f64b13d2818c95d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/console/zipball/bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7", - "reference": "bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7", + "url": "https://api.github.com/repos/theofidry/console/zipball/a681ea3aa7f5c0c78cd437250f64b13d2818c95d", + "reference": "a681ea3aa7f5c0c78cd437250f64b13d2818c95d", "shasum": "" }, "require": { - "php": "^7.4.0 || ^8.0.0", - "symfony/console": "^4.4 || ^5.4 || ^6.1", - "symfony/event-dispatcher-contracts": "^1.0 || ^2.5 || ^3.0", - "symfony/service-contracts": "^1.0 || ^2.5 || ^3.0", - "thecodingmachine/safe": "^1.3 || ^2.0", + "php": "^8.2", + "psr/log": "^3.0", + "symfony/console": "^6.4 || ^7.0", + "symfony/deprecation-contracts": "^3.4", + "symfony/event-dispatcher-contracts": "^2.5 || ^3.0", + "symfony/service-contracts": "^2.5 || ^3.0", + "thecodingmachine/safe": "^2.0", "webmozart/assert": "^1.11" }, "conflict": { - "symfony/dependency-injection": "<5.3.0", - "symfony/framework-bundle": "<5.3.0", - "symfony/http-kernel": "<5.3.0" + "symfony/dependency-injection": "<6.4.0", + "symfony/framework-bundle": "<6.4.0", + "symfony/http-kernel": "<6.4.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4", - "composer/semver": "^3.3", - "ergebnis/composer-normalize": "^2.28", - "infection/infection": "^0.26", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.4.3", - "symfony/dependency-injection": "^4.4 || ^5.4 || ^6.1", - "symfony/framework-bundle": "^4.4 || ^5.4 || ^6.1", - "symfony/http-kernel": "^4.4 || ^5.4 || ^6.1", - "symfony/phpunit-bridge": "^4.4.47 || ^5.4 || ^6.0", - "symfony/yaml": "^4.4 || ^5.4 || ^6.1", - "webmozarts/strict-phpunit": "^7.3" + "bamarni/composer-bin-plugin": "^1.8.2", + "composer/semver": "^3.3.2", + "ergebnis/composer-normalize": "^2.33", + "fidry/makefile": "^0.2.1 || ^1.0.0", + "infection/infection": "^0.28", + "phpunit/phpunit": "^10.2", + "symfony/dependency-injection": "^6.4", + "symfony/flex": "^2.4.0", + "symfony/framework-bundle": "^6.4", + "symfony/http-kernel": "^6.4", + "symfony/yaml": "^6.4 || ^7.0" }, "type": "library", "extra": { @@ -2310,7 +2608,7 @@ ], "support": { "issues": "https://github.com/theofidry/console/issues", - "source": "https://github.com/theofidry/console/tree/0.5.5" + "source": "https://github.com/theofidry/console/tree/0.6.10" }, "funding": [ { @@ -2318,20 +2616,20 @@ "type": "github" } ], - "time": "2022-12-18T10:49:34+00:00" + "time": "2024-04-23T08:36:33+00:00" }, { "name": "fidry/cpu-core-counter", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" + "reference": "8520451a140d3f46ac33042715115e290cf5785f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", - "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", + "reference": "8520451a140d3f46ac33042715115e290cf5785f", "shasum": "" }, "require": { @@ -2371,7 +2669,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" }, "funding": [ { @@ -2379,7 +2677,7 @@ "type": "github" } ], - "time": "2024-02-07T09:43:46+00:00" + "time": "2024-08-06T10:04:20+00:00" }, { "name": "fidry/filesystem", @@ -2450,26 +2748,26 @@ }, { "name": "filp/whoops", - "version": "2.15.4", + "version": "2.16.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546" + "reference": "befcdc0e5dce67252aa6322d82424be928214fa2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546", - "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546", + "url": "https://api.github.com/repos/filp/whoops/zipball/befcdc0e5dce67252aa6322d82424be928214fa2", + "reference": "befcdc0e5dce67252aa6322d82424be928214fa2", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", + "php": "^7.1 || ^8.0", "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "require-dev": { - "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^4.0 || ^5.0" }, "suggest": { "symfony/var-dumper": "Pretty print complex values better with var-dumper available", @@ -2509,7 +2807,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.4" + "source": "https://github.com/filp/whoops/tree/2.16.0" }, "funding": [ { @@ -2517,20 +2815,20 @@ "type": "github" } ], - "time": "2023-11-03T12:00:00+00:00" + "time": "2024-09-25T12:00:00+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.59.3", + "version": "v3.64.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29" + "reference": "58dd9c931c785a79739310aef5178928305ffa67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/30ba9ecc2b0e5205e578fe29973c15653d9bfd29", - "reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/58dd9c931c785a79739310aef5178928305ffa67", + "reference": "58dd9c931c785a79739310aef5178928305ffa67", "shasum": "" }, "require": { @@ -2612,7 +2910,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.59.3" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.64.0" }, "funding": [ { @@ -2620,70 +2918,65 @@ "type": "github" } ], - "time": "2024-06-16T14:17:03+00:00" + "time": "2024-08-30T23:09:38+00:00" }, { "name": "humbug/box", - "version": "4.5.1", + "version": "4.6.2", "source": { "type": "git", "url": "https://github.com/box-project/box.git", - "reference": "1e10a1e974a831b64dab801d09dffa6acd43bd7f" + "reference": "29c3585c64a16d17df97699dd9e0291591a266a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/box-project/box/zipball/1e10a1e974a831b64dab801d09dffa6acd43bd7f", - "reference": "1e10a1e974a831b64dab801d09dffa6acd43bd7f", + "url": "https://api.github.com/repos/box-project/box/zipball/29c3585c64a16d17df97699dd9e0291591a266a3", + "reference": "29c3585c64a16d17df97699dd9e0291591a266a3", "shasum": "" }, "require": { - "amphp/parallel-functions": "^1.1", + "amphp/parallel": "^2.0", "composer-plugin-api": "^2.2", "composer/semver": "^3.3.2", "composer/xdebug-handler": "^3.0.3", "ext-iconv": "*", "ext-mbstring": "*", "ext-phar": "*", - "ext-sodium": "*", - "fidry/console": "^0.5.3 || ^0.6.0", - "fidry/filesystem": "^1.1", + "fidry/console": "^0.6.0", + "fidry/filesystem": "^1.2.1", "humbug/php-scoper": "^0.18.6", "justinrainbow/json-schema": "^5.2.12", - "laravel/serializable-closure": "^1.2.2", "nikic/iter": "^2.2", - "nikic/php-parser": "^4.15.2", - "paragonie/constant_time_encoding": "^2.6", - "php": "^8.1", - "phpdocumentor/reflection-docblock": "^5.3", + "php": "^8.2", + "phpdocumentor/reflection-docblock": "^5.4", "phpdocumentor/type-resolver": "^1.7", "psr/log": "^3.0", - "sebastian/diff": "^4.0", - "seld/jsonlint": "^1.9", - "symfony/console": "^6.1.7", - "symfony/filesystem": "^6.1.5", - "symfony/finder": "^6.1.3", + "sebastian/diff": "^5.0", + "seld/jsonlint": "^1.10.2", + "seld/phar-utils": "^1.2", + "symfony/finder": "^6.4.0 || ^7.0.0", "symfony/polyfill-iconv": "^1.28", "symfony/polyfill-mbstring": "^1.28", - "symfony/process": "^6.1.3", - "symfony/var-dumper": "^6.1.6", + "symfony/process": "^6.4.0 || ^7.0.0", + "symfony/var-dumper": "^6.4.0 || ^7.0.0", + "thecodingmachine/safe": "^2.5", "webmozart/assert": "^1.11" }, "replace": { - "paragonie/sodium_compat": "*", "symfony/polyfill-php80": "*", - "symfony/polyfill-php81": "*" + "symfony/polyfill-php81": "*", + "symfony/polyfill-php82": "*" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ergebnis/composer-normalize": "^2.29", + "ext-xml": "*", "fidry/makefile": "^1.0.1", "mikey179/vfsstream": "^1.6.11", - "phpspec/prophecy": "^1.17", - "phpspec/prophecy-phpunit": "^2.0.2", - "phpunit/phpunit": "^9.5.26", - "symfony/phpunit-bridge": "^6.1.6", - "symfony/yaml": "^6.2", - "webmozarts/strict-phpunit": "^7.6" + "phpspec/prophecy": "^1.18", + "phpspec/prophecy-phpunit": "^2.1.0", + "phpunit/phpunit": "^10.5.2", + "symfony/yaml": "^6.4.0 || ^7.0.0" }, "suggest": { "ext-openssl": "To accelerate private key generation." @@ -2703,7 +2996,6 @@ }, "autoload": { "files": [ - "src/consts.php", "src/functions.php" ], "psr-4": { @@ -2735,43 +3027,44 @@ ], "support": { "issues": "https://github.com/box-project/box/issues", - "source": "https://github.com/box-project/box/tree/4.5.1" + "source": "https://github.com/box-project/box/tree/4.6.2" }, - "time": "2023-11-04T17:51:11+00:00" + "time": "2024-04-23T19:33:48+00:00" }, { "name": "humbug/php-scoper", - "version": "0.18.7", + "version": "0.18.15", "source": { "type": "git", "url": "https://github.com/humbug/php-scoper.git", - "reference": "9386a0af946f175d7a1ebfb68851bc2bb8ad7858" + "reference": "79b2b4e0fbc1d1ef6ae99c4e078137b42bd43d19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/humbug/php-scoper/zipball/9386a0af946f175d7a1ebfb68851bc2bb8ad7858", - "reference": "9386a0af946f175d7a1ebfb68851bc2bb8ad7858", + "url": "https://api.github.com/repos/humbug/php-scoper/zipball/79b2b4e0fbc1d1ef6ae99c4e078137b42bd43d19", + "reference": "79b2b4e0fbc1d1ef6ae99c4e078137b42bd43d19", "shasum": "" }, "require": { - "fidry/console": "^0.5.0", + "fidry/console": "^0.6.10", "fidry/filesystem": "^1.1", - "jetbrains/phpstorm-stubs": "^v2022.2", - "nikic/php-parser": "^4.12", - "php": "^8.1", - "symfony/console": "^5.2 || ^6.0", - "symfony/filesystem": "^5.2 || ^6.0", - "symfony/finder": "^5.2 || ^6.0", + "jetbrains/phpstorm-stubs": "^2024.1", + "nikic/php-parser": "^5.0", + "php": "^8.2", + "symfony/console": "^6.4 || ^7.0", + "symfony/filesystem": "^6.4 || ^7.0", + "symfony/finder": "^6.4 || ^7.0", + "symfony/var-dumper": "^7.1", "thecodingmachine/safe": "^2.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.1", "ergebnis/composer-normalize": "^2.28", "fidry/makefile": "^1.0", - "humbug/box": "^4.5.1", + "humbug/box": "^4.6.2", "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.0", - "symfony/yaml": "^6.1" + "phpunit/phpunit": "^10.0", + "symfony/yaml": "^6.4 || ^7.0" }, "bin": [ "bin/php-scoper" @@ -2818,30 +3111,29 @@ "description": "Prefixes all PHP namespaces in a file or directory.", "support": { "issues": "https://github.com/humbug/php-scoper/issues", - "source": "https://github.com/humbug/php-scoper/tree/0.18.7" + "source": "https://github.com/humbug/php-scoper/tree/0.18.15" }, - "time": "2023-11-04T18:01:12+00:00" + "time": "2024-09-02T13:35:10+00:00" }, { "name": "jetbrains/phpstorm-stubs", - "version": "v2022.3", + "version": "v2024.2", "source": { "type": "git", "url": "https://github.com/JetBrains/phpstorm-stubs.git", - "reference": "6b568c153cea002dc6fad96285c3063d07cab18d" + "reference": "cf7e447ddfa7f0cbab0c1dd38392f0cb05f9881c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/6b568c153cea002dc6fad96285c3063d07cab18d", - "reference": "6b568c153cea002dc6fad96285c3063d07cab18d", + "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/cf7e447ddfa7f0cbab0c1dd38392f0cb05f9881c", + "reference": "cf7e447ddfa7f0cbab0c1dd38392f0cb05f9881c", "shasum": "" }, "require-dev": { - "friendsofphp/php-cs-fixer": "@stable", - "nikic/php-parser": "@stable", - "php": "^8.0", - "phpdocumentor/reflection-docblock": "@stable", - "phpunit/phpunit": "@stable" + "friendsofphp/php-cs-fixer": "v3.46.0", + "nikic/php-parser": "v5.0.0", + "phpdocumentor/reflection-docblock": "5.3.0", + "phpunit/phpunit": "10.5.5" }, "type": "library", "autoload": { @@ -2866,26 +3158,26 @@ "type" ], "support": { - "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2022.3" + "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2024.2" }, - "time": "2022-10-17T09:21:37+00:00" + "time": "2024-06-17T19:18:18+00:00" }, { "name": "justinrainbow/json-schema", - "version": "v5.2.13", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/jsonrainbow/json-schema.git", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" + "reference": "feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8", + "reference": "feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "require-dev": { "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", @@ -2896,11 +3188,6 @@ "bin/validate-json" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, "autoload": { "psr-4": { "JsonSchema\\": "src/JsonSchema/" @@ -2936,32 +3223,31 @@ ], "support": { "issues": "https://github.com/jsonrainbow/json-schema/issues", - "source": "https://github.com/jsonrainbow/json-schema/tree/v5.2.13" + "source": "https://github.com/jsonrainbow/json-schema/tree/5.3.0" }, - "time": "2023-09-26T02:20:38+00:00" + "time": "2024-07-06T21:00:26+00:00" }, { - "name": "laravel/serializable-closure", - "version": "v1.3.3", + "name": "kelunik/certificate", + "version": "v1.1.3", "source": { "type": "git", - "url": "https://github.com/laravel/serializable-closure.git", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754" + "url": "https://github.com/kelunik/certificate.git", + "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754", + "url": "https://api.github.com/repos/kelunik/certificate/zipball/7e00d498c264d5eb4f78c69f41c8bd6719c0199e", + "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e", "shasum": "" }, "require": { - "php": "^7.3|^8.0" + "ext-openssl": "*", + "php": ">=7.0" }, "require-dev": { - "nesbot/carbon": "^2.61", - "pestphp/pest": "^1.21.3", - "phpstan/phpstan": "^1.8.2", - "symfony/var-dumper": "^5.4.11" + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^6 | 7 | ^8 | ^9" }, "type": "library", "extra": { @@ -2971,7 +3257,7 @@ }, "autoload": { "psr-4": { - "Laravel\\SerializableClosure\\": "src/" + "Kelunik\\Certificate\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2980,25 +3266,198 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - }, - { - "name": "Nuno Maduro", - "email": "nuno@laravel.com" + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "description": "Access certificate details and transform between different formats.", "keywords": [ - "closure", - "laravel", - "serializable" + "DER", + "certificate", + "certificates", + "openssl", + "pem", + "x509" ], "support": { - "issues": "https://github.com/laravel/serializable-closure/issues", - "source": "https://github.com/laravel/serializable-closure" + "issues": "https://github.com/kelunik/certificate/issues", + "source": "https://github.com/kelunik/certificate/tree/v1.1.3" }, - "time": "2023-11-08T14:08:06+00:00" + "time": "2023-02-03T21:26:53+00:00" + }, + { + "name": "league/uri", + "version": "7.4.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/bedb6e55eff0c933668addaa7efa1e1f2c417cc4", + "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4", + "shasum": "" + }, + "require": { + "league/uri-interfaces": "^7.3", + "php": "^8.1" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-components": "Needed to easily manipulate URI objects components", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.4.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-03-23T07:42:40+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "7.4.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "8d43ef5c841032c87e2de015972c06f3865ef718" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/8d43ef5c841032c87e2de015972c06f3865ef718", + "reference": "8d43ef5c841032c87e2de015972c06f3865ef718", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interfaces and classes for URI representation and interaction", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-03-23T07:42:40+00:00" }, { "name": "myclabs/deep-copy", @@ -3114,25 +3573,27 @@ }, { "name": "nikic/php-parser", - "version": "v4.19.1", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b" + "reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4e1b88d21c69391150ace211e9eaf05810858d0b", - "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3abf7425cd284141dc5d8d14a9ee444de3345d1a", + "reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.1" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -3140,7 +3601,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3164,9 +3625,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.0" }, - "time": "2024-03-17T08:10:35+00:00" + "time": "2024-09-29T13:56:26+00:00" }, { "name": "nunomaduro/collision", @@ -3350,73 +3811,6 @@ ], "time": "2023-02-08T01:06:31+00:00" }, - { - "name": "paragonie/constant_time_encoding", - "version": "v2.7.0", - "source": { - "type": "git", - "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105", - "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105", - "shasum": "" - }, - "require": { - "php": "^7|^8" - }, - "require-dev": { - "phpunit/phpunit": "^6|^7|^8|^9", - "vimeo/psalm": "^1|^2|^3|^4" - }, - "type": "library", - "autoload": { - "psr-4": { - "ParagonIE\\ConstantTime\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com", - "role": "Maintainer" - }, - { - "name": "Steve 'Sc00bz' Thomas", - "email": "steve@tobtu.com", - "homepage": "https://www.tobtu.com", - "role": "Original Developer" - } - ], - "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", - "keywords": [ - "base16", - "base32", - "base32_decode", - "base32_encode", - "base64", - "base64_decode", - "base64_encode", - "bin2hex", - "encoding", - "hex", - "hex2bin", - "rfc4648" - ], - "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/constant_time_encoding/issues", - "source": "https://github.com/paragonie/constant_time_encoding" - }, - "time": "2024-05-08T12:18:48+00:00" - }, { "name": "phar-io/composer-distributor", "version": "1.0.2", @@ -3585,16 +3979,16 @@ }, { "name": "phar-io/gnupg", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/gnupg.git", - "reference": "3c106d39f62ba3941f830ca24e125cb1b9290a87" + "reference": "ed8ab1740ac4e9db99500e7252911f2821357093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/gnupg/zipball/3c106d39f62ba3941f830ca24e125cb1b9290a87", - "reference": "3c106d39f62ba3941f830ca24e125cb1b9290a87", + "url": "https://api.github.com/repos/phar-io/gnupg/zipball/ed8ab1740ac4e9db99500e7252911f2821357093", + "reference": "ed8ab1740ac4e9db99500e7252911f2821357093", "shasum": "" }, "require": { @@ -3627,9 +4021,9 @@ "description": "Thin GnuPG wrapper class around the gnupg binary, mimicking the pecl/gnupg api", "support": { "issues": "https://github.com/phar-io/gnupg/issues", - "source": "https://github.com/phar-io/gnupg/tree/1.0.2" + "source": "https://github.com/phar-io/gnupg/tree/1.0.3" }, - "time": "2020-11-30T10:21:26+00:00" + "time": "2024-08-22T20:45:57+00:00" }, { "name": "phar-io/manifest", @@ -3926,16 +4320,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.29.1", + "version": "1.32.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4" + "reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6ca22b154efdd9e3c68c56f5d94670920a1c19a4", + "reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4", "shasum": "" }, "require": { @@ -3967,22 +4361,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.32.0" }, - "time": "2024-05-31T08:52:43+00:00" + "time": "2024-09-26T07:23:32+00:00" }, { "name": "phpstan/phpstan", - "version": "1.11.5", + "version": "1.12.5", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "490f0ae1c92b082f154681d7849aee776a7c1443" + "reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/490f0ae1c92b082f154681d7849aee776a7c1443", - "reference": "490f0ae1c92b082f154681d7849aee776a7c1443", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17", + "reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17", "shasum": "" }, "require": { @@ -4027,39 +4421,39 @@ "type": "github" } ], - "time": "2024-06-17T15:10:54+00:00" + "time": "2024-09-26T12:45:22+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.31", + "version": "10.1.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" + "reference": "7e308268858ed6baedc8704a304727d20bc07c77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77", + "reference": "7e308268858ed6baedc8704a304727d20bc07c77", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-text-template": "^3.0.1", + "sebastian/code-unit-reverse-lookup": "^3.0.0", + "sebastian/complexity": "^3.2.0", + "sebastian/environment": "^6.1.0", + "sebastian/lines-of-code": "^2.0.2", + "sebastian/version": "^4.0.1", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -4068,7 +4462,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1.x-dev" } }, "autoload": { @@ -4097,7 +4491,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16" }, "funding": [ { @@ -4105,32 +4499,32 @@ "type": "github" } ], - "time": "2024-03-02T06:37:42+00:00" + "time": "2024-08-22T04:31:57+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -4157,7 +4551,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -4165,28 +4560,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -4194,7 +4589,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -4220,7 +4615,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -4228,32 +4623,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -4279,7 +4674,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -4287,32 +4683,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -4338,7 +4734,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -4346,54 +4742,52 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.19", + "version": "10.5.35", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" + "reference": "7ac8b4e63f456046dcb4c9787da9382831a1874b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7ac8b4e63f456046dcb4c9787da9382831a1874b", + "reference": "7ac8b4e63f456046dcb4c9787da9382831a1874b", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.16", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-invoker": "^4.0.0", + "phpunit/php-text-template": "^3.0.1", + "phpunit/php-timer": "^6.0.0", + "sebastian/cli-parser": "^2.0.1", + "sebastian/code-unit": "^2.0.0", + "sebastian/comparator": "^5.0.2", + "sebastian/diff": "^5.1.1", + "sebastian/environment": "^6.1.0", + "sebastian/exporter": "^5.1.2", + "sebastian/global-state": "^6.0.2", + "sebastian/object-enumerator": "^5.0.0", + "sebastian/recursion-context": "^5.0.0", + "sebastian/type": "^4.0.0", + "sebastian/version": "^4.0.1" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -4401,7 +4795,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -4433,7 +4827,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.35" }, "funding": [ { @@ -4449,7 +4843,7 @@ "type": "tidelift" } ], - "time": "2024-04-05T04:35:58+00:00" + "time": "2024-09-19T10:52:21+00:00" }, { "name": "psr/event-dispatcher", @@ -4501,6 +4895,114 @@ }, "time": "2019-01-08T18:20:26+00:00" }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, { "name": "react/cache", "version": "v1.2.0", @@ -4875,31 +5377,31 @@ }, { "name": "react/socket", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/reactphp/socket.git", - "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038" + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/216d3aec0b87f04a40ca04f481e6af01bdd1d038", - "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038", + "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.0", - "react/dns": "^1.11", + "react/dns": "^1.13", "react/event-loop": "^1.2", - "react/promise": "^3 || ^2.6 || ^1.2.1", - "react/stream": "^1.2" + "react/promise": "^3.2 || ^2.6 || ^1.2.1", + "react/stream": "^1.4" }, "require-dev": { "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", - "react/async": "^4 || ^3 || ^2", + "react/async": "^4.3 || ^3.3 || ^2", "react/promise-stream": "^1.4", - "react/promise-timer": "^1.10" + "react/promise-timer": "^1.11" }, "type": "library", "autoload": { @@ -4943,7 +5445,7 @@ ], "support": { "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.15.0" + "source": "https://github.com/reactphp/socket/tree/v1.16.0" }, "funding": [ { @@ -4951,7 +5453,7 @@ "type": "open_collective" } ], - "time": "2023-12-15T11:02:10+00:00" + "time": "2024-07-26T10:38:09+00:00" }, { "name": "react/stream", @@ -5032,29 +5534,101 @@ "time": "2024-06-11T12:45:25+00:00" }, { - "name": "sebastian/cli-parser", - "version": "1.0.2", + "name": "revolt/event-loop", + "version": "v1.0.6", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + "url": "https://github.com/revoltphp/event-loop.git", + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/25de49af7223ba039f64da4ae9a28ec2d10d0254", + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.15" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Revolt\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Rock-solid event loop for concurrent PHP applications.", + "keywords": [ + "async", + "asynchronous", + "concurrency", + "event", + "event-loop", + "non-blocking", + "scheduler" + ], + "support": { + "issues": "https://github.com/revoltphp/event-loop/issues", + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.6" + }, + "time": "2023-11-30T05:34:44+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" } }, "autoload": { @@ -5077,7 +5651,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -5085,32 +5660,32 @@ "type": "github" } ], - "time": "2024-03-02T06:27:43+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -5133,7 +5708,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -5141,32 +5716,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -5188,7 +5763,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -5196,34 +5771,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53", + "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -5262,7 +5839,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.2" }, "funding": [ { @@ -5270,33 +5848,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2024-08-12T06:03:08+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.3", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -5319,7 +5897,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -5327,33 +5906,33 @@ "type": "github" } ], - "time": "2023-12-22T06:19:30+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { "name": "sebastian/diff", - "version": "4.0.6", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^10.0", + "symfony/process": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -5385,7 +5964,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -5393,27 +5973,27 @@ "type": "github" } ], - "time": "2024-03-02T06:30:58+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "6.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -5421,7 +6001,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -5440,7 +6020,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -5448,7 +6028,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" }, "funding": [ { @@ -5456,34 +6037,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2024-03-23T08:47:14+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.6", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -5525,7 +6106,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" }, "funding": [ { @@ -5533,38 +6115,35 @@ "type": "github" } ], - "time": "2024-03-02T06:33:00+00:00" + "time": "2024-03-02T07:17:12+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.7", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -5583,13 +6162,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" }, "funding": [ { @@ -5597,33 +6177,33 @@ "type": "github" } ], - "time": "2024-03-02T06:35:11+00:00" + "time": "2024-03-02T07:19:19+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.4", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -5646,7 +6226,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -5654,34 +6235,34 @@ "type": "github" } ], - "time": "2023-12-22T06:20:34+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -5703,7 +6284,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -5711,32 +6292,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -5758,7 +6339,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -5766,32 +6347,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -5821,7 +6402,7 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -5829,86 +6410,32 @@ "type": "github" } ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-14T16:00:52+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -5931,7 +6458,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -5939,29 +6466,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -5984,7 +6511,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -5992,27 +6519,27 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "seld/jsonlint", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "9bb7db07b5d66d90f6ebf542f09fc67d800e5259" + "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9bb7db07b5d66d90f6ebf542f09fc67d800e5259", - "reference": "9bb7db07b5d66d90f6ebf542f09fc67d800e5259", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/1748aaf847fc731cfad7725aec413ee46f0cc3a2", + "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2", "shasum": "" }, "require": { "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.5", + "phpstan/phpstan": "^1.11", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" }, "bin": [ @@ -6044,7 +6571,7 @@ ], "support": { "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.10.2" + "source": "https://github.com/Seldaek/jsonlint/tree/1.11.0" }, "funding": [ { @@ -6056,28 +6583,76 @@ "type": "tidelift" } ], - "time": "2024-02-07T12:57:50+00:00" + "time": "2024-07-11T14:55:45+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v6.4.8", + "name": "seld/phar-utils", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b" + "url": "https://github.com/Seldaek/phar-utils.git", + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8d7507f02b06e06815e56bb39aa0128e3806208b", - "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\PharUtils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "PHAR file format utilities, for when PHP phars you up", + "keywords": [ + "phar" + ], + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1" + }, + "time": "2022-08-31T10:31:18+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v7.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", + "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", + "shasum": "" + }, + "require": { + "php": ">=8.2", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<5.4", + "symfony/dependency-injection": "<6.4", "symfony/service-contracts": "<2.5" }, "provide": { @@ -6086,13 +6661,13 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^5.4|^6.0|^7.0" + "symfony/stopwatch": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6120,7 +6695,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.8" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.1" }, "funding": [ { @@ -6136,7 +6711,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6216,25 +6791,25 @@ }, { "name": "symfony/filesystem", - "version": "v6.4.8", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "4d37529150e7081c51b3c5d5718c55a04a9503f3" + "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/4d37529150e7081c51b3c5d5718c55a04a9503f3", - "reference": "4d37529150e7081c51b3c5d5718c55a04a9503f3", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/61fe0566189bf32e8cfee78335d8776f64a66f5a", + "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^5.4|^6.4|^7.0" + "symfony/process": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6262,7 +6837,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.8" + "source": "https://github.com/symfony/filesystem/tree/v7.1.5" }, "funding": [ { @@ -6278,27 +6853,27 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-09-17T09:16:35+00:00" }, { "name": "symfony/finder", - "version": "v6.4.8", + "version": "v7.1.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "3ef977a43883215d560a2cecb82ec8e62131471c" + "reference": "d95bbf319f7d052082fb7af147e0f835a695e823" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/3ef977a43883215d560a2cecb82ec8e62131471c", - "reference": "3ef977a43883215d560a2cecb82ec8e62131471c", + "url": "https://api.github.com/repos/symfony/finder/zipball/d95bbf319f7d052082fb7af147e0f835a695e823", + "reference": "d95bbf319f7d052082fb7af147e0f835a695e823", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0|^7.0" + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6326,7 +6901,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.8" + "source": "https://github.com/symfony/finder/tree/v7.1.4" }, "funding": [ { @@ -6342,24 +6917,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-08-13T14:28:19+00:00" }, { "name": "symfony/options-resolver", - "version": "v6.4.8", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "22ab9e9101ab18de37839074f8a1197f55590c1b" + "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/22ab9e9101ab18de37839074f8a1197f55590c1b", - "reference": "22ab9e9101ab18de37839074f8a1197f55590c1b", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/47aa818121ed3950acd2b58d1d37d08a94f9bf55", + "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", @@ -6393,7 +6968,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.4.8" + "source": "https://github.com/symfony/options-resolver/tree/v7.1.1" }, "funding": [ { @@ -6409,24 +6984,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "c027e6a3c6aee334663ec21f5852e89738abc805" + "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c027e6a3c6aee334663ec21f5852e89738abc805", - "reference": "c027e6a3c6aee334663ec21f5852e89738abc805", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/48becf00c920479ca2e910c22a5a39e5d47ca956", + "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-iconv": "*" @@ -6473,7 +7048,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.31.0" }, "funding": [ { @@ -6489,24 +7064,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/process", - "version": "v6.4.8", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5" + "reference": "5c03ee6369281177f07f7c68252a280beccba847" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/8d92dd79149f29e89ee0f480254db595f6a6a2c5", - "reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5", + "url": "https://api.github.com/repos/symfony/process/zipball/5c03ee6369281177f07f7c68252a280beccba847", + "reference": "5c03ee6369281177f07f7c68252a280beccba847", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -6534,7 +7109,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.8" + "source": "https://github.com/symfony/process/tree/v7.1.5" }, "funding": [ { @@ -6550,24 +7125,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-09-19T21:48:23+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.4.8", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "63e069eb616049632cde9674c46957819454b8aa" + "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/63e069eb616049632cde9674c46957819454b8aa", - "reference": "63e069eb616049632cde9674c46957819454b8aa", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", + "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/service-contracts": "^2.5|^3" }, "type": "library", @@ -6596,7 +7171,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.4.8" + "source": "https://github.com/symfony/stopwatch/tree/v7.1.1" }, "funding": [ { @@ -6612,38 +7187,36 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.8", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "ad23ca4312395f0a8a8633c831ef4c4ee542ed25" + "reference": "e20e03889539fd4e4211e14d2179226c513c010d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ad23ca4312395f0a8a8633c831ef4c4ee542ed25", - "reference": "ad23ca4312395f0a8a8633c831ef4c4ee542ed25", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e20e03889539fd4e4211e14d2179226c513c010d", + "reference": "e20e03889539fd4e4211e14d2179226c513c010d", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/console": "<5.4" + "symfony/console": "<6.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/error-handler": "^6.3|^7.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/uid": "^5.4|^6.0|^7.0", - "twig/twig": "^2.13|^3.0.4" + "symfony/console": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", + "twig/twig": "^3.0.4" }, "bin": [ "Resources/bin/var-dump-server" @@ -6681,7 +7254,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.8" + "source": "https://github.com/symfony/var-dumper/tree/v7.1.5" }, "funding": [ { @@ -6697,7 +7270,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-09-16T10:07:02+00:00" }, { "name": "thecodingmachine/safe", @@ -6957,5 +7530,5 @@ "ext-mbstring": "*" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.2.0" } diff --git a/src/SPC/builder/BuilderBase.php b/src/SPC/builder/BuilderBase.php index ce92d1dd..5d5f2993 100644 --- a/src/SPC/builder/BuilderBase.php +++ b/src/SPC/builder/BuilderBase.php @@ -418,30 +418,6 @@ abstract class BuilderBase } } - /** - * Check if all libs are downloaded. - * If not, throw exception. - * - * @throws RuntimeException - */ - protected function checkLibsSource(): void - { - $not_downloaded = []; - foreach ($this->libs as $lib) { - if (!file_exists($lib->getSourceDir())) { - $not_downloaded[] = $lib::NAME; - } - } - if ($not_downloaded !== []) { - throw new RuntimeException( - '"' . implode(', ', $not_downloaded) . - '" totally ' . count($not_downloaded) . - ' source' . (count($not_downloaded) === 1 ? '' : 's') . - ' not downloaded, maybe you need to "fetch" ' . (count($not_downloaded) === 1 ? 'it' : 'them') . ' first?' - ); - } - } - /** * Generate micro extension test php code. */ diff --git a/src/SPC/builder/linux/SystemUtil.php b/src/SPC/builder/linux/SystemUtil.php index 7cd3f098..730fb3d2 100644 --- a/src/SPC/builder/linux/SystemUtil.php +++ b/src/SPC/builder/linux/SystemUtil.php @@ -6,7 +6,6 @@ namespace SPC\builder\linux; use SPC\builder\traits\UnixSystemUtilTrait; use SPC\exception\RuntimeException; -use SPC\exception\WrongUsageException; class SystemUtil { @@ -83,52 +82,6 @@ class SystemUtil }; } - /** - * @throws RuntimeException - * @throws WrongUsageException - * @throws WrongUsageException - */ - public static function getArchCFlags(string $cc, string $arch): string - { - if (php_uname('m') === $arch) { - return ''; - } - return match (static::getCCType($cc)) { - 'clang' => match ($arch) { - 'x86_64' => '--target=x86_64-unknown-linux', - 'arm64', 'aarch64' => '--target=arm64-unknown-linux', - default => throw new WrongUsageException('unsupported arch: ' . $arch), - }, - 'gcc' => '', - default => throw new WrongUsageException('cc compiler ' . $cc . ' is not supported'), - }; - } - - /** - * @throws RuntimeException - */ - public static function getTuneCFlags(string $arch): array - { - return match ($arch) { - 'x86_64', 'arm64', 'aarch64' => [], - default => throw new RuntimeException('unsupported arch: ' . $arch), - }; - } - - public static function checkCCFlags(array $flags, string $cc): array - { - return array_filter($flags, fn ($flag) => static::checkCCFlag($flag, $cc)); - } - - public static function checkCCFlag(string $flag, string $cc): string - { - [$ret] = shell()->execWithResult("echo | {$cc} -E -x c - {$flag} 2>/dev/null"); - if ($ret != 0) { - return ''; - } - return $flag; - } - /** * @throws RuntimeException * @noinspection PhpUnused diff --git a/tests/SPC/builder/BuilderProviderTest.php b/tests/SPC/builder/BuilderProviderTest.php deleted file mode 100644 index 52a0d35d..00000000 --- a/tests/SPC/builder/BuilderProviderTest.php +++ /dev/null @@ -1,28 +0,0 @@ -assertInstanceOf(BuilderBase::class, BuilderProvider::makeBuilderByInput(new ArgvInput())); - $this->assertInstanceOf(BuilderBase::class, BuilderProvider::getBuilder()); - } -} diff --git a/tests/SPC/builder/BuilderTest.php b/tests/SPC/builder/BuilderTest.php new file mode 100644 index 00000000..f61eba0e --- /dev/null +++ b/tests/SPC/builder/BuilderTest.php @@ -0,0 +1,248 @@ +builder = BuilderProvider::makeBuilderByInput(new ArgvInput()); + [$extensions, $libs] = DependencyUtil::getExtsAndLibs(['mbregex']); + $this->builder->proveLibs($libs); + CustomExt::loadCustomExt(); + foreach ($extensions as $extension) { + $class = CustomExt::getExtClass($extension); + $ext = new $class($extension, $this->builder); + $this->builder->addExt($ext); + } + foreach ($this->builder->getExts() as $ext) { + $ext->checkDependency(); + } + } + + public function testMakeBuilderByInput(): void + { + $this->assertInstanceOf(BuilderBase::class, BuilderProvider::makeBuilderByInput(new ArgvInput())); + $this->assertInstanceOf(BuilderBase::class, BuilderProvider::getBuilder()); + } + + public function testGetLibAndGetLibs() + { + $this->assertIsArray($this->builder->getLibs()); + $this->assertInstanceOf(LibraryBase::class, $this->builder->getLib('onig')); + } + + public function testGetExtAndGetExts() + { + $this->assertIsArray($this->builder->getExts()); + $this->assertInstanceOf(Extension::class, $this->builder->getExt('mbregex')); + } + + public function testHasCpp() + { + // mbregex doesn't have cpp + $this->assertFalse($this->builder->hasCpp()); + } + + public function testMakeExtensionArgs() + { + $this->assertStringContainsString('--enable-mbstring', $this->builder->makeExtensionArgs()); + } + + public function testIsLibsOnly() + { + // mbregex is not libs only + $this->assertFalse($this->builder->isLibsOnly()); + } + + public function testGetPHPVersionID() + { + if (file_exists(SOURCE_PATH . '/php-src/main/php_version.h')) { + $file = SOURCE_PATH . '/php-src/main/php_version.h'; + $cnt = preg_match('/PHP_VERSION_ID (\d+)/', $file, $match); + if ($cnt !== 0) { + $this->assertEquals(intval($match[1]), $this->builder->getPHPVersionID()); + } else { + $this->expectException(RuntimeException::class); + $this->builder->getPHPVersionID(); + } + } else { + $this->expectException(WrongUsageException::class); + $this->builder->getPHPVersionID(); + } + } + + public function testGetPHPVersion() + { + if (file_exists(SOURCE_PATH . '/php-src/main/php_version.h')) { + $file = SOURCE_PATH . '/php-src/main/php_version.h'; + $cnt = preg_match('/PHP_VERSION "(\d+\.\d+\.\d+)"/', $file, $match); + if ($cnt !== 0) { + $this->assertEquals($match[1], $this->builder->getPHPVersion()); + } else { + $this->expectException(RuntimeException::class); + $this->builder->getPHPVersion(); + } + } else { + $this->expectException(WrongUsageException::class); + $this->builder->getPHPVersion(); + } + } + + public function testGetPHPVersionFromArchive() + { + $lock = file_exists(DOWNLOAD_PATH . '/.lock.json') ? file_get_contents(DOWNLOAD_PATH . '/.lock.json') : false; + if ($lock === false) { + $this->assertFalse($this->builder->getPHPVersionFromArchive()); + } else { + $lock = json_decode($lock, true); + $file = $lock['php-src']['filename'] ?? null; + if ($file === null) { + $this->assertFalse($this->builder->getPHPVersionFromArchive()); + } else { + $cnt = preg_match('/php-(\d+\.\d+\.\d+)/', $file, $match); + if ($cnt !== 0) { + $this->assertEquals($match[1], $this->builder->getPHPVersionFromArchive()); + } else { + $this->assertFalse($this->builder->getPHPVersionFromArchive()); + } + } + } + } + + public function testGetMicroVersion() + { + $file = FileSystem::convertPath(SOURCE_PATH . '/php-src/sapi/micro/php_micro.h'); + if (!file_exists($file)) { + $this->assertFalse($this->builder->getMicroVersion()); + } else { + $content = file_get_contents($file); + $ver = ''; + preg_match('/#define PHP_MICRO_VER_MAJ (\d)/m', $content, $match); + $ver .= $match[1] . '.'; + preg_match('/#define PHP_MICRO_VER_MIN (\d)/m', $content, $match); + $ver .= $match[1] . '.'; + preg_match('/#define PHP_MICRO_VER_PAT (\d)/m', $content, $match); + $ver .= $match[1]; + $this->assertEquals($ver, $this->builder->getMicroVersion()); + } + } + + public static function providerGetBuildTypeName(): array + { + return [ + [BUILD_TARGET_CLI, 'cli'], + [BUILD_TARGET_FPM, 'fpm'], + [BUILD_TARGET_MICRO, 'micro'], + [BUILD_TARGET_EMBED, 'embed'], + [BUILD_TARGET_ALL, 'cli, micro, fpm, embed'], + [BUILD_TARGET_CLI | BUILD_TARGET_EMBED, 'cli, embed'], + ]; + } + + #[DataProvider('providerGetBuildTypeName')] + public function testGetBuildTypeName(int $target, string $name): void + { + $this->assertEquals($name, $this->builder->getBuildTypeName($target)); + } + + public function testGetOption() + { + // we cannot assure the option exists, so just tests default value + $this->assertEquals('foo', $this->builder->getOption('bar', 'foo')); + } + + public function testGetOptions() + { + $this->assertIsArray($this->builder->getOptions()); + } + + public function testSetOptionIfNotExist() + { + $this->assertEquals(null, $this->builder->getOption('bar')); + $this->builder->setOptionIfNotExist('bar', 'foo'); + $this->assertEquals('foo', $this->builder->getOption('bar')); + } + + public function testSetOption() + { + $this->assertEquals(null, $this->builder->getOption('bar')); + $this->builder->setOption('bar', 'foo'); + $this->assertEquals('foo', $this->builder->getOption('bar')); + } + + public function testGetEnvString() + { + $this->assertIsString($this->builder->getEnvString()); + putenv('TEST_SPC_BUILDER=foo'); + $this->assertStringContainsString('TEST_SPC_BUILDER=foo', $this->builder->getEnvString(['TEST_SPC_BUILDER'])); + } + + public function testValidateLibsAndExts() + { + $this->builder->validateLibsAndExts(); + $this->assertTrue(true); + } + + public static function providerEmitPatchPoint(): array + { + return [ + ['before-libs-extract'], + ['after-libs-extract'], + ['before-php-extract'], + ['after-php-extract'], + ['before-micro-extract'], + ['after-micro-extract'], + ['before-exts-extract'], + ['after-exts-extract'], + ['before-php-buildconf'], + ['before-php-configure'], + ['before-php-make'], + ['before-sanity-check'], + ]; + } + + #[DataProvider('providerEmitPatchPoint')] + public function testEmitPatchPoint(string $point) + { + $code = 'builder->setOption('with-added-patch', ['/tmp/patch-point.' . $point . '.php']); + FileSystem::writeFile('/tmp/patch-point.' . $point . '.php', $code); + $this->expectOutputString('GOOD:' . $point); + $this->builder->emitPatchPoint($point); + } + + public function testEmitPatchPointNotExists() + { + $this->expectOutputRegex('/failed to run/'); + $this->builder->setOption('with-added-patch', ['/tmp/patch-point.not_exsssists.php']); + $this->builder->emitPatchPoint('not-exists'); + } +} diff --git a/tests/SPC/builder/linux/SystemUtilTest.php b/tests/SPC/builder/linux/SystemUtilTest.php new file mode 100644 index 00000000..341f2383 --- /dev/null +++ b/tests/SPC/builder/linux/SystemUtilTest.php @@ -0,0 +1,70 @@ +assertArrayHasKey('dist', $release); + $this->assertArrayHasKey('ver', $release); + $this->assertTrue($release['dist'] === 'alpine' && SystemUtil::isMuslDist() || $release['dist'] !== 'alpine' && !SystemUtil::isMuslDist()); + } + + public function testFindStaticLib() + { + $this->assertIsArray(SystemUtil::findStaticLib('ld-linux-x86-64.so.2')); + } + + public function testGetCpuCount() + { + $this->assertIsInt(SystemUtil::getCpuCount()); + } + + public function testFindHeader() + { + $this->assertIsArray(SystemUtil::findHeader('elf.h')); + } + + public function testGetCrossCompilePrefix() + { + $this->assertIsString(SystemUtil::getCrossCompilePrefix('gcc', 'x86_64')); + } + + public function testGetCCType() + { + $this->assertEquals('gcc', SystemUtil::getCCType('xjfoiewjfoewof-gcc')); + } + + public function testGetSupportedDistros() + { + $this->assertIsArray(SystemUtil::getSupportedDistros()); + } + + public function testFindHeaders() + { + $this->assertIsArray(SystemUtil::findHeaders(['elf.h'])); + } + + public function testFindStaticLibs() + { + $this->assertIsArray(SystemUtil::findStaticLibs(['ld-linux-x86-64.so.2'])); + } +} diff --git a/tests/SPC/builder/macos/SystemUtilTest.php b/tests/SPC/builder/macos/SystemUtilTest.php new file mode 100644 index 00000000..75964508 --- /dev/null +++ b/tests/SPC/builder/macos/SystemUtilTest.php @@ -0,0 +1,31 @@ +assertIsInt(SystemUtil::getCpuCount()); + } + + public function testGetArchCFlags() + { + $this->assertEquals('--target=x86_64-apple-darwin', SystemUtil::getArchCFlags('x86_64')); + } +} diff --git a/tests/SPC/builder/unix/UnixSystemUtilTest.php b/tests/SPC/builder/unix/UnixSystemUtilTest.php new file mode 100644 index 00000000..fec21e36 --- /dev/null +++ b/tests/SPC/builder/unix/UnixSystemUtilTest.php @@ -0,0 +1,52 @@ + 'SPC\builder\linux\SystemUtil', + 'Darwin' => 'SPC\builder\macos\SystemUtil', + 'FreeBSD' => 'SPC\builder\freebsd\SystemUtil', + default => null, + }; + if ($util_class === null) { + self::markTestIncomplete('This test is only for Unix'); + } + $this->util = new $util_class(); + } + + /** + * @throws FileSystemException + */ + public function testMakeCmakeToolchainFile() + { + $str = $this->util->makeCmakeToolchainFile(PHP_OS_FAMILY, 'x86_64', ''); + $this->assertIsString($str); + } + + public function testFindCommand() + { + $this->assertIsString($this->util->findCommand('bash')); + } + + public function testMakeEnvVarString() + { + $this->assertEquals("PATH='/usr/bin' PKG_CONFIG='/usr/bin/pkg-config'", $this->util->makeEnvVarString(['PATH' => '/usr/bin', 'PKG_CONFIG' => '/usr/bin/pkg-config'])); + } +} diff --git a/tests/SPC/store/CurlHookTest.php b/tests/SPC/store/CurlHookTest.php new file mode 100644 index 00000000..19876aec --- /dev/null +++ b/tests/SPC/store/CurlHookTest.php @@ -0,0 +1,24 @@ +assertEmpty($header); + putenv('GITHUB_TOKEN=token'); + CurlHook::setupGithubToken('GET', 'https://example.com', $header); + $this->assertEquals(['Authorization: Bearer token'], $header); + } +} diff --git a/tests/SPC/store/DownloaderTest.php b/tests/SPC/store/DownloaderTest.php new file mode 100644 index 00000000..ff6af17e --- /dev/null +++ b/tests/SPC/store/DownloaderTest.php @@ -0,0 +1,46 @@ +assertEquals( + 'https://api.github.com/repos/AOMediaCodec/libavif/tarball/v1.1.1', + Downloader::getLatestGithubTarball('libavif', [ + 'type' => 'ghtar', + 'repo' => 'AOMediaCodec/libavif', + ])[0] + ); + } + + public function testDownloadGit() {} + + public function testDownloadFile() {} + + public function testLockSource() {} + + public function testGetLatestBitbucketTag() {} + + public function testGetLatestGithubRelease() {} + + public function testCurlExec() {} + + public function testCurlDown() {} + + public function testDownloadSource() {} + + public function testGetFromFileList() {} + + public function testDownloadPackage() {} +} diff --git a/tests/assets/github_api_AOMediaCodec_libavif_releases.json.gz b/tests/assets/github_api_AOMediaCodec_libavif_releases.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..31e0b126109c6389ce4b775bbb78ccd060fec0bc GIT binary patch literal 15506 zcmZ{~b8sg?+wUFQw#{E`+s-E0*tTukwry=}+cq|~H)r>L@2Adt>eTt?Q&Uql)6?He zJ>3^!6cm&m(;rhHP%{f>a~DHB1A7ZSAq6=TV+#WjJ7W_gJ!=a?16K=EJx3F369Xp` zCk9I=J6oVD9}A~V$;9WEFLWpc>$Php>Mh=#tL=R1iD}&gWtC(v-a}{{Fd-P5M19bF zGE2ihA6c4^41r-}fzMjU8Li~`G*yZcCn}l>CSQjFWUmj5_Z)vbS{}>lelJvI0kpxM zl2EPoQz>oToA6R?>|76cU>P|rw4JjPtk}8}jPhi+3tTQ@_m`I%KqxttrljSVnj`Oj z>(H&hfKb9gKqmVNi&4O8GL+`BO<)M;LCn&h>3y@bna=#GU~?}0mQVFWohe;sMm4cv zByXmmY?H?RlZJL4E2yCwV9dfWh&vmW<`9=~s$zFA(*WYO!s~2%iEG6#1tklUqSmck zWwJ9};0l_!r*`_t@o>1?sqzt*y1`{LxgAy~uAb~-6_VP!l66FFcV@Ep+6vi{5mtzf6rY`OGk?e-6SM>PnL+zw^->; z=i@P;-p38ObLaC;P2qSZ^7%7@&5f|SEFyHv3MJy+y_qbLmUf~eWc|)vlXbIK9;3(0 zYQ3uEfRyEfd*>wY4+=wfoymIF9^Lu8!^1 z)6H{U^?QZ8?)Uemy_Hl!ouCkc;+^4wix_l~)j=@mYjg%~XFq&trlz8MV|7f2L=PK+ z2OsJzX3rp+^Nh@L zmCUzfi8tmUI?3z^-5?aTk;!({__~k8g50>FetAIAlra_$1?WQ)h9n~FISbX$HESc_# z^6qL^?SrD4ml4M{jr;QU(VvfU!^avg<;h<)pA_dF7y>BYP?KF!e-O~(UlT`*0;YGH z;ju-<9D{FnU^x&nrv(GP-`rw5&9of)WPpyDU2K>!b=8YQYMd?Q~s#aNI5Y2J`2p=_4Wz^%ZaYdNWyG&TuG8)_Pk43&XOl<^mtGr zqg_kp>9O&*&O*dYwu<_mfmF9!vU`^0=}C!9{-FsWP(bZYbWfeFQ>+fQ7`g5?RuD2C z&y`;BCUdFfXD6@j;2~#`aP;1N03FYf(H|?`gXl3Q>!*BA?M)1oapO+x;!1hp!N)Pt zI%h%B;U+inJ!`9d7tr(R{N2WVQ|z-j3m-@hC#c3&37v55eHl+JUuk88knZ}>z*C@b z<88;EQA?I?MLG^syiemSy|R=uRj^~Uni2atIw#HZ0z2wvmd{yT!5RwP`G~)vTw{Cq zQ^0~JwWlJ#A%PoXmZ( zvmPkT%{;!z?+D>SgA^>e%O^G^iv=)sqlGCgNfyfHy@(Lf1znJ?^f2X*-@?l1-KME% z5p*LOx?T`2buySvXNP?a-XEdfwuhB0X9IdDsh!RGk$r33b(x?lX&8!}#Tn#Tdkx95FSuMOIebD7^3Z)XHpmEbY$^$Lkiqx6BioC zjW1eiYiB?5tKWlMPw%@z9%@`*)`O5J8#(03t=t6IXEw{?o9_zPUgxaxQdOedIO@}c zfbw26nlMj?;+9&9Rp+RzBN|VP_=<1187MA(-U*5gBauEl*TL{kRS)Q;+!{bc_GNl- zb&PxX9(weIj4(7+is`eB%uG#!vLIO%8RvfFel3rC?N{Sj3vju9#phw=^4yvR5m!-Y z#09eBravBV;4XlpcdZkhTC>-~@R~O5ue61(Fh`YD^hMJBkafzlf%vF(vaH%3pVdqo zM{UD49|yN#wthXr-)0^V9V=kRSU5mvtLQr>uonr4qO)WnPV`%g0b_Xf$b!#MdQQNFtk{Cw;#5rTFc6|22$a>!Sk z>VmNifRt{j&5T>)40lqC?QkISW5k7|u6JFF2}(XQKlH!G9aGrgh(GiJxf?y$dUHi{ZYTSfX7ekeSKuOsa|h zB}(pW)SE;{bpmU8qY=fpR1sUd$*A%5JeA3*x5IQwLGkHiA-8S+L@eNA70d7aEu;0j zVS8`696NuKs-{T4< z+#w^-C(i&~+_pYli}pNiG55&uqQO~Z_CtDDju+8QlT0z4gACjC5dCwq@t*%;w_T_? z3|L^NJt^y)hK*z*evEj~5Q0&pCl73w!#O{bL)lge((WZ&6qJhK>a37zqt2MEGriXM_^f1o+-G{Usy094 zK*+&OV^eQMf8GkUn#E9otRfM6Kb>eToylqo2QD?{L3{aG@1{Qav$G;Jf}RR)1P9eA zA{4r3Bq!kx_-bGwtiAj2y$IO+*xqFzx2Ip7$ByIYcGb$J=wy9r86gtgs1c?c4}Wi^ ziqq#Cx&^`K*F#m~BkolriiTX{kI_ebn*291PaHd!)W8seENrlk`qm&PZ*c6W+u@S)B!*?ELTuzlPO@}aOCVTO*v?=Zo{QT#1Giig&d6c`` z8bVzPqK@D<`HR{gp=UbTntDQ*Z}n57xxm%@q@GYLPCr3yM4b}ViGRb1XDe_NVDxYV zVB_c)O;x|)N&Lz7VahhYbdlxHV&IE+0;WM@qm zOXg+D)UaZwL`nLk3Zq|a_+wTv;C=-buO8(wL{wMMbTqJ)Xqe1}20^Nmt8~tA|JUoQ zILpD?PU4#X9P}Q`?tHg2qz%Sr*mM6~1t%7N08epfoJ?kbTB8qbd%=SlNDN1s^;~+n z!`buQLfHd)W_WbN&>2bVC5$R*xYIkotcdAy(aq3^)S4bO)K|&0Sha$wX>17(9$kJ( zVVwlm5VfgH%*)l3G2YtC%Q0>z+wSLuUIt1rx3@VsXG*$0GkVgZQBQUNup9D>vd&T$ zXYUz2gAgK{=he#cUggXF*RRhXHy@QGlQ$?Qv{?tu>jc`CbY8uyXSz8po8kDpIr`0AZFqib3!?Pg#FmHNrV`T-;of1+ zh%JdKFi}Qo;t0DKktWs?zLh#RA$M5riL+R}Md?y15pL-9J~D8_=U(0)RBqepIX4vi z?2fBZvBitXtgoeO7EY6eOxmHQ1aKEU7oQ>K3r;*+tESnuIM!4b?`}7`aT>)RDR$QM zX%Xd^8*kH)X3A1un9x6=ynBM&XhO%gjI4_~fPnESp&z*bhnuW?${uuZEX^(sG3-vP%T9H|bARi=(>jUT$TuX?S zb_pr|$88_oMYRUADM)E7Na>+CC-&L^Y$#8(-$WZQn}^Z%Lc_-!de>9D#&J>smJ&xf ziP*h(cr$ii-OiQ}1{4rNVIFTYsw|J6i~5i^xfIn8!Vhw930a=A*||FdlS}(SGbJ&E z760h3pXss$thfg*w6a+$uU&7E3k(}&07^i&EZj5RZ$u}*=%<(KiVdSZJmo%C70yX2 z<23>{@(*EQZ>dB;xp8MY&RwEGPhe!OGIb9qkzekD6z1yfF1CN`jM$Beawgj&)q7|s z5Z)8#6*#6Gd)5HZg8dirCYUwNB_xE{Z)@9x+5^k0l}rYFTWskPfiB`|E(}$oDfL%V zgy?*yG8I9?jCIJxjTa2QQG_h#n7LqtTn<5*eUy`KH^k>~Y`|`ZOTzhq3VDa$| zbRQRo1zR?9wIq{{;z}1abxX>a^>VuX*-8=}CH8dHfCj4pR!O)O*0PZf$e$RUhj;#3 z^}uw6NK|yZSe$S+8cqjn6vZ6cq7?47Myp}K8@5JiZrsY|a<4FT;DJUkD+5{us}#9# zYoM<+=2+o5CsA9pVRfIM3x12lLZSx0US-07GU~1alZD(xiZ|D^5_m-~a?=r40hdLQpA5QJWjp67nUPJOgl3b-tYc4Gy7k2(YNqk-PTiop{J`L%>d7YQb@1H3D&lV; zra!4;c_&|h?PB#2*7u!L(xJ9IzvTh&D`=y9%?xOnKr9gnqLTUf;ustljo&An&ZyEM z`I_wM4mIFs$m$j<5i3eK9tiVYkCS`QR7T~=9A&R)_W({22z&0Eto;ax2dzal6`!nf zr5##C^x*;Fy}8N4yG6Cpn8!;%3FMGWL33BxEa4D_9*7rU#T?8P#n_7M zRb+WT?s$WT#VoqK-8q@y7sD;Dx56l)v4kP^3?ov5`RD^$@ja!I`gMnzZdNB(!t%!Z zib9Iuf|Fda;(98%W}x&ykA51Uy~ScUu4L7$?ecI%LJbHl zOz*6`L~q`I?^*mNbNgeCPh}3u_=|}DICOSro(g8Ch|{guDtB zRatt4`&*EnT1zkGLcFH-2$Fuxh>pUs;{FaRO8-ipz~D1h)@Vwu>_p{*x&50nKYLv)oDYD@$yrX)|-I_l*#PsPA)~tqsy=-vn zSF!5L;PY+3p7|h|7|8AP9|2(1UZ`#~_lM{F7Jm>(a|IHI9zR0UA!XN`FbUNwt2i$% z!N3HJmtZ0UvVfz*1v*`C9-t!;Y53~{2ZBTSA``t14t1}=1m-#IrfLuQ{M3@FOa&pcc2~)RBTU z$HrOD^_1q@EjbEuMi{Dj41{tG{}ISA@`}c?%9vD-QSx2dtMS4RsKv}38_G^9dxzKT zft6;ZKH)THn(Az?+N@c#%qq7GBb+7cd1ua|qu6iGLb=CX=P#HAVgu7mJ$Di%m}QoN zxM}N_l80Wb!$2a*6QZCN$R2Y^To7ZPRQ!Y1rN-5{SySUu#Y5y$C6fJ^Y-5RQ<1+`` z-B?QFS8tI4>Ta6_P+|e;G_PQ6z8oMIkE<^Bbf()wvy%)v{!&IbJ6_+ANdc=n|9WdU z-Z#4->wW^IkRFlgnE^XAT69!0n9mzCB@ae8injR zSV}U3@=Pe5wn+UvEFWSk5R6KHNd%Nak6$q8mF zV`|`clfo%GcaF(=itrif4XovuJTINqO54sFjDXd*nDg|e1$qtjXr%fAR2H7biTNoxa<@g&pJt9_0QV^Z zvapaqIE#yM0Np}5t7a;MyQ|kWs{r|TK*{>lMJmx>(Vc~ zMD9=7OAmb8jwm~Oh@J59szd{fEZXA7jGPjOtSF8E1d-iX)EEpC41a}d$2IJQP41c- z5%zfG;?tzAiAe#^Hvmp?Kp&%j+Q(_kCaeA)@pPPEm@X9EqE2J1rM#LZ?F>kjtj9)? zW~PBQ!CyVpKf=LdX}gT?H~iS z-zjb5XJm}9S$SXHhPU1go-krwnZoYg^%?T2)2=H>7;SdlX?qzV%_&SvEz&*}O50S( z7T$IN^71kXGciF4U|NLGsG~deBXLygCS9n zVl##Z2gZhD;-szYmwzMH{%P}x=$HFQ>yA3vtM-X4F#AQQAuCN_=6zL6fcPaVzY-O{%X)|QV1BDKCW}#+ zz8pG)KZFgLPtI-vxYw6eDg|SGBKJlw?GHELb+>-hv}Wdc!Rn0)HwZvtYGo-G$_rIt zg%?rJFbuSaE>xyT${wBkEsYVIxfK?flL>dP0BR8er3WC`8ylv|Q_^OPe!P|~OX&Ye z7f7YZ-?<{P0iYWqM7)SlQeZ>B3ug-szz&$BlBI~dfjcl_cEh8m)7l2xx1Tr&Z8Upi z(6pPvgaQstMi>P8MzFqr0sUj+b!4V{CyC77Jq*LTw-rRqIjUX)ym*VSP43Tqp7}T@ z5r}^3AE>z}75H9o?jGLe5h1UQvx4{j2Q|)9PC2oK@E6nbeb>B=4!k1a!JSIvZP8lE z7aQzYnAJj{tv`_W{9qO-v_IBbNqV&EQQL)h+wLE)Dh|%x_D*g)9UUpVqc$a?1=-A9 zM$aEUpI=?u-(=lPEp3k{5OYCTG3*RLMs5@U!RYfvLjU=^9EWyD5F$wm2qskxh;cGG zKAVt6=i?bc+7CeZD4ilXpTRq2ohZ^OJ+yD52$-z;ZqRk%Mbax5?{BYLl-$9xxYBVp zz(_Cz0AmMC`6;LPwth2GT2z$S2R&)mNJx=k%GWUts~h+uSp2wnB5OD!R(cN=g-rua z&r-!x3Zq|7s_UhsJ}k5l9H8^?N5p`J65q5jWWt3h;giQXjsu|);z0Z zfwltuE|~0#O#rvmwAR4^P4fVe8bRzM(5k}P?L!h@Qwy-> zCKGy76>tTWmFUD#ifB;;A}T7LEQ^=$MZoIZToYH1SnWW(pkMtAX+une7I_ku92-|E zB73;MKYBR{WdYvI)<-ezAzTh*!(S`YwL%n0uFG{|Xw>dTWM~8Nw%9ji?c5AFV3!*b z`o{&m&WdXTM&e79;z3^9;m=|v+9iycEu3*~$Uf3^!=MnM94U8G0BUu}aNY9lTFSM3 zu`&ZLENQT{b7#5llAbXxIG)g+IDMuF9{Ie#Bj^(hH7i!rFT#fw%?DpJ9Uu@;0gupAi_)%`XFToR z-88tCC8gydioor+g&9B@jxb~(VVFT!QwMJ3h)a0aZx(Z z#X6!0xS~v?wz3JYT*;V=ky(0xv1d&!jzkGaHOIhyJJ3aA(rMkV1CBAi&J1kAHd_LrmA3m1ym=GgqPe8`%y; z6w6zZ!CAjnwke5QT3;cMkJ=q~PAPv0hw&XemoGX{2hH&DwY*~);;$%p|HrIeD(PWw zFIH9DfHXd#n%pppCdA$^i%L5z<$M||HI-TnRM0$FMuNrC32MB>RBs-{)dguNZCd-9 zz7~+x9w_Z!TK*|pu~tnJ_t0zXw1$k{Q7zdfEP7`ThPm>3d?0f`BnRUvB5Z5uD^I1Wa|O}@q{`f&JXh^U6Sv4V{%ERGgGcCu=GYf9#o7zjl% z)uD0}PBI^3jopM(*tdm>Z2{rw5feGWUQjfO%mYgO3z!UQYkX@!QehrCl$k(Sa5guH z&Rcl%WsDqjOva@+rHyR4-*HkIG(y7l8aUqn!GKUD&n67obVXYW$(C4PJNQvVzR|xw zk8I`7}ZQe+HRv&F?(HOB)utmF)8xIWZ%9l9~=qT$ub9+6b ztQq)QMBGxlBKhwO9{)Tf4n~a4Cw;63>K5nZAwud)Lg+7{>zCi&f+vSzZuXIgnxNbz zT*-}-if0FGxzC2fhZ?5P=gW;X1mnaYbDt2Gm zG87|?aPdvX`p?FZG|pLQB6-MU#{&!NZ@T$9)|(IVXelpK9~TH9>g{z$c6|w>43pIf zh}K?p_2#F{6K%MnAL!HJv*2Lv+%uUd#?u~kG|&0_x*{= zEHvSAoNw-23MlDz^t&bRgU>a4p>Vjqd*KdSd0Pu9mL{a*t83CrY|M1Kc!jnI$nGG_ zB*@ZiDj;^$-U78T5~=5^#T>}{y_FYs4;jzYFi$wG>%;HGav7z*;+Q@XqWyxAMtydt zfu_(q8vJKhL^u@f9k43*6dtTWee_$p$7bT|MnmD`hp;e z=S#BwneatLgHmM5b*K6mr7?ZAFAUr<{pZ6s+g0MH_ju7Cdp@+LzgZkI9uA&7LEgn1 z-@7l=5%|*6{JO)X%P4osXgww8h|5S0ZcK6KoWk;OHAlEIh{>9?>Z;sV#wi69vjRsQ zPxV0r;Wyk@Qp(ZJkW}@o$CMI&Tq;`r!PIQMdMj@!qg7{fbfnbN7!YqeP+FF;V~^5GK&&>C zCsw^bzd)jDY)?x-J0<7&qS;xI2v{V$I9ZbWN+?jNp6ACA+n@zB8Ow7j*%)Z;GZZFn z=p43ijT_j~oRJ`uwX)ey>XZ*Q-Qed;JR2?0*dPAawSXbU)<fe>V62&1Ito(`L8cf2pv%kB-i zuEdrdVmT0sA4^8iU18!pATe*&gX9wX%WUc4T5@iR!>$N^{?V*JB3muUFD|sVS;TB5 zH?Dhy_wmQibt>x6@nN=4H}~4>!!h`@fqN#+o!myIk&6Zyga>vDpdT@IbQ@s z(!fn>tMzzRc(&xjBV?sqG6^V)^E3hpXsQ(kpg(TIf=s{zi5ir zQ!%awGCG|o<@+at_CanMd@KwtqczZN+PX63-joMBM(F_<72rj@Hrfr^?+jK5bLA|* z{Y`#x1HLGn7@>5sjC`b{GdsvG0rxfH>XNN|b}6Mphe`BXUTIfP!BsI?V_K$B9O%^2 zy1U;o9N`A8KiF>sC#^OYt#IcYJ5tyEb>q;)+$z*EE#abYltu9=dz^heU3XsXL%tk# ze0QxLH)?1z0SV^jA5~%+;+n(+1tksj2K&c9gM(2S%hkDKj-3WbXh(?eyO=aH#3ozA z6O(6h!YROd6Zmkl4UMZ*Y9}2wjL#$+hZnQ8ut1~4hm@Urj!}jQ??VGPT89(pTUmqI!r{S|Vc?l7cCt3#?~4#$Cn*YqNd4H%e-8)T8ss+b7fCd@sn5?Zop zNr^nW3+2+ofa33W?9q|3i@2b;njN)|LfS9PuJYon*VU>hTMKhyrznCFU!#PtK6K(5 zhEsh%sD98OaDzU8m^Zo|ol-W6n?`#EE?$jWliz zPQC&;Z1W;>CWRZS!e1Kh^Gb=YL+meI!;$IOcH+@2+i`}(wF{&{v<%FLV>>*|n(4rn z2l5P4@pnJ;OaAiAJ8)p3UPcgUhiIz$#gUpNd*vetV5#E>)u6}dt) zgLb86PfBAyTB2>F>JxSw^TgPQQn~PHH2VePLCP!#WJH$NaNYzCXj7Pqi;^}$EqW6; zLv2Q!=+&Qlu7p4c%`6TWrb7Kg2579g^vKA$SY1scZ)#RG7VS?VPYgEs{N9^dqz1Fx z08IKLd-^>}%9bl^CN;m_0eJUHT@73fev_w0&g6uJ$Y(L=*ghXaOu!UxN0{{{)<}~0 zN*771G|38|9S^sVGkh0KiH7|eJJ$PczsFtUTXHE&fP9X=Eqy+81Pz2gm-$zXK)dzh zJ1CH!cVTH}0@xWudO*Zx4q{M~yx-hcc{wtVi|Bz1>394TG_}8D{BU>!CX`_~5lR*V zVRk*NIuV=R*ij%m1x0w3JWh^coJz8<8CgQo*(gdTq&eDAt@GAf*lx*%XR0%a) zg7u4{6pZM_{#t|I>^E6E&vo`)v%JlN=QGpm$Bh}H-;JMVJEzT9j)2y?dVK*us&zTIKm0mf zg_d5$%HP&0>Nrr`-wkbsEOPc5^##75^~AWQ4*H@*j~Tq`^61pzqI(3dO7P0)Lc~9 zk_`vs9rwk8Vr03%gJN7lxfs8h^o@Sge`|LxR$Lq#!po^gUrq~j2o^c5p6gkK0b>`> z1tN`{+-%R&X0h-i=nXj{fHSU;5g_Q0i4r1dlNDox&?k!FVQ7(&2_R~cf$?E#kcpxP z&?>WinbsE;xhV+LbbhV0viP@bdpr7EMvvUvQ~gkDQD>qpirk0GnUG8kvlMedlWU-x zELY_Ki5oR?2C54NO(Sm9n&a+z7F^LrMmQvN;LJfS#z4nKQL5E7_xBBDTlD5-uB zlD}^x6$BGYt$ODN5@JfcylpS!0TS-1*ab&=JOl~$p*O?xaI9Ift(3@ z>m}-B1y#)9>heFz4T7XQNnM=9W7l|fu)mm=HCXg9nP z$~Ip!d3SG6h9E7q12Sx02>D)c)ov7BG^S0(0Lf318h&^T~#E@IX|Da0|F{Juj zOK!4>?jj2-h4SgSkVjsMZ3Z+&FBllbZsA~7Oz!4&Ixc@)^Bc{N{nSi3|dhqGl9ge52TDfXQBQ1>dm*s|*81~P> z$dZla1eN9N1Z~_3^iAykSzHUau-+wUhVkV@>&FzW?edjlK65zMZkj_Kw8*<@3%JaR ztVZo=5tAk61~3Ijoxi^QDtDF5exJJjcf>8!0Y2h?xD(z+jjXmPwY+peQ5lCf>zc=@ zlGaJR$n2<#B1xgm`&5jN5`N=1hZ`EB{W%s**YBh#XhoT!G=~KSgG42m?~m6H0{%B3 zjq?4w?b4Oi-k_=U?U;>dR+Yx1Ctie%^2Pbx8gfN}J(PN0B!KVP(c+u*26OoTegaaU zAQT8ORPgNplJN2v2N#!oAfE>uwMZ|=q(hu`NPm#el_3uIzc@CMyeh{_9gRov0V5Du z2AIgnjTG||#r=!r(Z8{*PayL91QDYlDwWY4E^w6SA8v#0upVu{7j;exayqz3294qu z?N&YD8V@)-Z8SsKSeFX8*+(;t#_rvVHSgO=cp9~<;7#aFfH>0ZsR%^CEi%W91cRF( z;{u9*9CI5hE!oW&DORaz&O7G7{zuPyooWVoN_`z}x4#2^q7Dco(Efa-4E8$^d#8*a z)mMG&)<$db;X~VMuUziz>3<3s)L?q}B z1gucVv~*7u$0OJW;nV{QcC;(0Mg{eHLI+`a*al{#51k7RLVz0`@XH%4N(cxH7zs=e z31~kAIJi=m?IC;C>Wt{cvQpCxbv|of;JDP1u^6 zNyK8dWQrS7Oc?DftW+OXlG9Pj&MZ)mj!6273wr7Y7;% zrfL<(1a;n?fb+3-nv>FpWDkN!<62UJrt1 ze@qAvn#_tzw<1v!JCs3NryfwSGYK*#d!*ZGDLC^(IS<%~0CIN-sMn%94HQtfx4%;b zf&w9e@+SfsfCYs@ADnv_d$`~SA-&-oLU6C|pYt=j)z|x#9*Qt;C)R+){6QUN%w#M| z7%;4_Dp#W{rz7FZi2;hL%Na$iBi~OKx>Q1lM%;K09wk(d_18}ISiS&^AV-Jy^MVh+ zxHe9L0aN*T+XWrOV6*D-N=~H`Fs!XA`ZSK^%2<3&fsUHVpsKNE8_i)1U8pK_m?6^{ zc}gFyPF+&65rkM$oMS)OYYd z3{BoE@CFX+A6@0ywGOv%@2nMHUFA!jEX1AXEB2zIfHK{6&;^k}0CGcs9YOj2s?Y}n z0ty931n7eu211wn@fQ!YT)l})dLH9q$j3E1@Zcf2f=!mLQjmX8F;D>2h~sO|TK$fvHbPCM&b(EmtrZMWena68{PotS1e*h%=^aS}$rO7|m>|PvwVGNB7tP(M zfqd2XzuPX+H$+H5%2g|sl|641vVTi)ZB(j*!@Jte=iTN?763ftfBWBoNe88+X^GbI z1IcGK57m9Fp>_T6P-`W3`k@3T)q%D|34m%BJR~6FbsFtoNx%|R!~%mr!V=U63IGO! zkW|J}RbfB?#ZnjmlGrX*?16;=Wx2}&WxfZS9RT_X%6xLUY#$c)cZS|Xw*h^SAcS22 zZ=hSjbwvD21%ow{|Ce4O28u0OB>)&u7y*b7VkP;0v{1Bd(n5g#Ti^f@72JOyKonxI z?D3k}K~ExL@Gsp_!;z{~Q7>!B&0CtP;b%C)!*#G%uEY=N$FNOSTl#w>PMj{EpdiQ? zDE{pu`my{)1s8k|q`9!_;!6u7BBsOkmCww;9;?HeGESkvD>pmc@9j3KzCP6cDD!6~X6;J!~pGdkC z5as5Xje2CI+7R0eaP@xWXU4VO_eKR+dtUhf|A<|@m;_393<&p2Ih3t^(!b9V{#PtU zI6_rc#c!{IAPGe**Z;HD!iZS19M_|TCZ824Vxe_d78?rSB@PG%69x>#)0HX01Zm1& zH8{Y4QtSP-SBTI*?2i@!ny(q;>ym6Q=|YH$FdnGjGL5J*ZLL}gN;6^&5#fK%@7t9z zC!4riuV)sdYyFllnkL7KAJBg^DXATE8C;7S5L~bl-!AutM1xqbR&VQMkPIyAWWf17 zd@ia@_Mh_lKe&4iF~I6fa2tN|L^}Wb`QbLpPo1CTS5Z`Hp1hFYdkHro1O5~}jekQe zeON-@Upt)m|5J?!;NJ(thz_bMSJH?HG569dOVfH1w^1DKh<}$&J_@u890Dx&xk3d; z*53r^Gb#f7U+$$iugVt3^<9l6$8-6~;H=2Sz`eFgSDNr|Nrx6XWjaAj4Tn8HnhzMO zw4|!=DFRi-D!)DW8<37LrGR1tQWh9c`v0G55=8)K`OPZZ-joiSzm7IGWUf&L7|YaL z&ep0ijJ71zkl!q|JhaI~FJmXT_Cf(8UIh8qk>q=8i>!b#Dpm4hX!4WjRWrC z3kgVnwUNL!4>U9I9~C#)Lm(6~_?N;!|K&1wgV+4ROzGTl%`(8z-Gy5|sL?lP%r7VO kP=x3IDXJmFEg6m)Fe1{H-W&i*H literal 0 HcmV?d00001 diff --git a/tests/bootstrap.php b/tests/bootstrap.php index bca0084d..d573204b 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -3,3 +3,4 @@ declare(strict_types=1); require_once __DIR__ . '/../src/globals/internal-env.php'; +require_once __DIR__ . '/mock/SPC_store.php'; diff --git a/tests/mock/SPC_store.php b/tests/mock/SPC_store.php new file mode 100644 index 00000000..18d495c3 --- /dev/null +++ b/tests/mock/SPC_store.php @@ -0,0 +1,24 @@ + Date: Thu, 3 Oct 2024 14:53:25 +0800 Subject: [PATCH 018/101] Update env-vars docs --- config/env.ini | 6 +- docs/en/guide/env-vars.md | 108 +++++++----------------------------- docs/zh/guide/env-vars.md | 112 +++++++------------------------------- 3 files changed, 43 insertions(+), 183 deletions(-) diff --git a/config/env.ini b/config/env.ini index d84d0acb..e6ee7180 100644 --- a/config/env.ini +++ b/config/env.ini @@ -39,12 +39,12 @@ [global] -; Build concurrency for make -jN +; Build concurrency for make -jN, default is CPU_COUNT, this value are used in every lib and php builds. SPC_CONCURRENCY=${CPU_COUNT} ; Ignore PHP version check before building some extensions SPC_SKIP_PHP_VERSION_CHECK="no" -; Ignore some check item for bin/spc doctor command, comma separated -SPC_SKIP_DOCTOR_CHECK_ITEMS="if homebrew has installed" +; Ignore some check item for bin/spc doctor command, comma separated (e.g. SPC_SKIP_DOCTOR_CHECK_ITEMS="if homebrew has installed") +SPC_SKIP_DOCTOR_CHECK_ITEMS="" [windows] ; php-sdk-binary-tools path diff --git a/docs/en/guide/env-vars.md b/docs/en/guide/env-vars.md index f60b1d2d..10581733 100644 --- a/docs/en/guide/env-vars.md +++ b/docs/en/guide/env-vars.md @@ -1,12 +1,23 @@ ---- -aside: false ---- - # Environment variables All environment variables mentioned in the list on this page have default values unless otherwise noted. You can override the default values by setting these environment variables. +## Environment variables list + +Starting from version 2.3.5, we have centralized the environment variables in the `config/env.ini` file. +You can set environment variables by modifying this file. + +We divide the environment variables supported by static-php-cli into three types: + +- Global internal environment variables: declared after static-php-cli starts, you can use `getenv()` to get them internally in static-php-cli, and you can override them before starting static-php-cli. +- Fixed environment variables: declared after static-php-cli starts, you can only use `getenv()` to get them, but you cannot override them through shell scripts. +- Config file environment variables: declared before static-php-cli build, you can set these environment variables by modifying the `config/env.ini` file or through shell scripts. + +You can read the comments for each parameter in [config/env.ini](https://github.com/crazywhalecc/static-php-cli/blob/main/config/env.ini) to understand its purpose. + +## Custom environment variables + Generally, you don't need to modify any of the following environment variables as they are already set to optimal values. However, if you have special needs, you can set these environment variables to meet your needs (for example, you need to debug PHP performance under different compilation parameters). @@ -22,94 +33,13 @@ bin/spc build mbstring,pcntl --build-cli SPC_CONCURRENCY=4 bin/spc build mbstring,pcntl --build-cli ``` -## General environment variables +Or, if you need to modify an environment variable for a long time, you can modify the `config/env.ini` file. -General environment variables can be used by all build targets. +`config/env.ini` is divided into three sections, `[global]` is globally effective, `[windows]`, `[macos]`, `[linux]` are only effective for the corresponding operating system. -| var name | default value | comment | -|------------------------------|---------------------------|-------------------------------------------------| -| `BUILD_ROOT_PATH` | `{pwd}/buildroot` | The root directory of the build target | -| `BUILD_LIB_PATH` | `{pwd}/buildroot/lib` | The root directory of compilation libraries | -| `BUILD_INCLUDE_PATH` | `{pwd}/buildroot/include` | Header file directory for compiling libraries | -| `BUILD_BIN_PATH` | `{pwd}/buildroot/bin` | Compiled binary file directory | -| `PKG_ROOT_PATH` | `{pwd}/pkgroot` | Directory where precompiled tools are installed | -| `SOURCE_PATH` | `{pwd}/source` | The source code extract directory | -| `DOWNLOAD_PATH` | `{pwd}/downloads` | Downloaded file directory | -| `SPC_CONCURRENCY` | Depends on CPU cores | Number of parallel compilations | -| `SPC_SKIP_PHP_VERSION_CHECK` | empty | Skip PHP version check when set to `yes` | +For example, if you need to modify the `./configure` command for compiling PHP, you can find the `SPC_CMD_PREFIX_PHP_CONFIGURE` environment variable in the `config/env.ini` file, and then modify its value. -## OS specific variables - -These environment variables are system-specific and will only take effect on a specific OS. - -### Windows - -| var name | default value | comment | -|---------------------|-----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------| -| `PHP_SDK_PATH` | `{pwd}\php-sdk-binary-tools` | PHP SDK tools path | -| `UPX_EXEC` | `$PKG_ROOT_PATH\bin\upx.exe` | UPX compression tool path | -| `SPC_MICRO_PATCHES` | `static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream,cli_static` | Used phpmicro [patches](https://github.com/easysoft/phpmicro/blob/master/patches/Readme.md) | - -### macOS - -| var name | default value | comment | -|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------| -| `CC` | `clang` | C Compiler | -| `CXX` | `clang++` | C++ Compiler | -| `SPC_DEFAULT_C_FLAGS` | `--target=arm64-apple-darwin` or `--target=x86_64-apple-darwin` | Default C flags (not the same as `CFLAGS`) | -| `SPC_DEFAULT_CXX_FLAGS` | `--target=arm64-apple-darwin` or `--target=x86_64-apple-darwin` | Default C flags (not the same as `CPPFLAGS`) | -| `SPC_CMD_PREFIX_PHP_BUILDCONF` | `./buildconf --force` | PHP `buildconf` command prefix | -| `SPC_CMD_PREFIX_PHP_CONFIGURE` | `./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg` | PHP `configure` command prefix | -| `SPC_CMD_PREFIX_PHP_MAKE` | `make -j$SPC_CONCURRENCY` | PHP `make` command prefix | -| `SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS` | `$SPC_DEFAULT_C_FLAGS -Werror=unknown-warning-option` | `CFLAGS` variable of PHP `configure` command | -| `SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS` | `-I$BUILD_INCLUDE_PATH` | `CPPFLAGS` variable of PHP `configure` command | -| `SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS` | `-L$BUILD_LIB_PATH` | `LDFLAGS` variable of PHP `configure` command | -| `SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS` | `-g0 -Os` or `-g -O0` (the latter when using `--no-strip`) | `EXTRA_CFLAGS` variable of PHP `make` command | -| `SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS` | `-lresolv` | Extra `EXTRA_LIBS` variables for PHP `make` command | -| `SPC_MICRO_PATCHES` | `static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream,macos_iconv` | Used phpmicro [patches](https://github.com/easysoft/phpmicro/blob/master/patches/Readme.md) | - -### Linux - -| var name | default value | comment | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------| -| `UPX_EXEC` | `$PKG_ROOT_PATH/bin/upx` | UPX compression tool path | -| `GNU_ARCH` | `x86_64` or `aarch64` | CPU architecture | -| `CC` | Alpine: `gcc`, Other: `$GNU_ARCH-linux-musl-gcc` | C Compiler | -| `CXX` | Alpine: `g++`, Other: `$GNU_ARCH-linux-musl-g++` | C++ Compiler | -| `AR` | Alpine: `ar`, Other: `$GNU_ARCH-linux-musl-ar` | Static library tools | -| `LD` | `ld.gold` | Linker | -| `PATH` | `/usr/local/musl/bin:/usr/local/musl/$GNU_ARCH-linux-musl/bin:$PATH` | System PATH | -| `SPC_DEFAULT_C_FLAGS` | empty | Default C flags | -| `SPC_DEFAULT_CXX_FLAGS` | empty | Default C++ flags | -| `SPC_CMD_PREFIX_PHP_BUILDCONF` | `./buildconf --force` | PHP `buildconf` command prefix | -| `SPC_CMD_PREFIX_PHP_CONFIGURE` | `LD_LIBRARY_PATH={ld_lib_path} ./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg` | PHP `configure` command prefix | -| `SPC_CMD_PREFIX_PHP_MAKE` | `make -j$SPC_CONCURRENCY` | PHP `make` command prefix | -| `SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS` | `$SPC_DEFAULT_C_FLAGS` | `CFLAGS` variable of PHP `configure` command | -| `SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS` | `-I$BUILD_INCLUDE_PATH` | `CPPFLAGS` variable of PHP `configure` command | -| `SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS` | `-L$BUILD_LIB_PATH` | `LDFLAGS` variable of PHP `configure` command | -| `SPC_CMD_VAR_PHP_CONFIGURE_LIBS` | `-ldl -lpthread` | `LIBS` variable of PHP `configure` command | -| `SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS` | `-g0 -Os -fno-ident -fPIE` or `-g -O0 -fno-ident -fPIE` (the latter when using `--no-strip`) | `EXTRA_CFLAGS` variable of PHP `make` command | -| `SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS` | empty | Extra `EXTRA_LIBS` variables for PHP `make` command | -| `SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM` | `-all-static` (when using `clang`: `-Xcompiler -fuse-ld=lld -all-static`) | Additional `LDFLAGS` variable for `make` command | -| `SPC_NO_MUSL_PATH` | empty | Whether to not insert the PATH of the musl toolchain (not inserted when the value is `yes`) | -| `SPC_MICRO_PATCHES` | `static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream` | Used phpmicro [patches](https://github.com/easysoft/phpmicro/blob/master/patches/Readme.md) | -> `{ld_lib_path}` value is `/usr/local/musl/$GNU_ARCH-linux-musl/lib`。 - -### FreeBSD - -Due to the small number of users of the FreeBSD system, we do not provide environment variables for the FreeBSD system for the time being. - -### Unix - -For Unix systems such as macOS, Linux, FreeBSD, etc., the following environment variables are common. - -| var name | default value | comment | -|-------------------|------------------------------|----------------------------| -| `PATH` | `$BUILD_BIN_PATH:$PATH` | System PATH | -| `PKG_CONFIG_PATH` | `$BUILD_LIB_PATH/pkgconfig` | pkg-config search path | -| `PKG_CONFIG` | `$BUILD_BIN_PATH/pkg-config` | pkg-config executable path | - -## Library Environment variables (Unix only) +## Library environment variables (Unix only) Starting from 2.2.0, static-php-cli supports custom environment variables for all compilation dependent library commands of macOS, Linux, FreeBSD and other Unix systems. diff --git a/docs/zh/guide/env-vars.md b/docs/zh/guide/env-vars.md index 6c467542..7a42d32c 100644 --- a/docs/zh/guide/env-vars.md +++ b/docs/zh/guide/env-vars.md @@ -1,11 +1,21 @@ ---- -aside: false ---- - -# 环境变量列表 +# 环境变量 本页面的环境变量列表中所提到的所有环境变量都具有默认值,除非另有说明。你可以通过设置这些环境变量来覆盖默认值。 +## 环境变量列表 + +在 2.3.5 版本之后,我们将环境变量集中到了 `config/env.ini` 文件中,你可以通过修改这个文件来设置环境变量。 + +我们将 static-php-cli 支持的环境变量分为三种: + +- 全局内部环境变量:在 static-php-cli 启动后即声明,你可以在 static-php-cli 的内部使用 `getenv()` 来获取他们,也可以在启动 static-php-cli 前覆盖。 +- 固定环境变量:在 static-php-cli 启动后声明,你仅可使用 `getenv()` 获取,但无法通过 shell 脚本对其覆盖。 +- 配置文件环境变量:在 static-php-cli 构建前声明,你可以通过修改 `config/env.ini` 文件或通过 shell 脚本来设置这些环境变量。 + +你可以阅读 [config/env.ini](https://github.com/crazywhalecc/static-php-cli/blob/main/config/env.ini) 中每项参数的注释来了解其作用(仅限英文版)。 + +## 自定义环境变量 + 一般情况下,你不需要修改任何以下环境变量,因为它们已经被设置为最佳值。 但是,如果你有特殊需求,你可以通过设置这些环境变量来满足你的需求(比如你需要调试不同编译参数下的 PHP 性能表现)。 @@ -20,93 +30,11 @@ bin/spc build mbstring,pcntl --build-cli SPC_CONCURRENCY=4 bin/spc build mbstring,pcntl --build-cli ``` -## 通用环境变量 +或者,如果你需要长期修改某个环境变量,你可以通过修改 `config/env.ini` 文件来实现。 -通用环境变量是所有构建目标都可以使用的环境变量。 +`config/env.ini` 分为三段,其中 `[global]` 全局有效,`[windows]`、`[macos]`、`[linux]` 仅对应的操作系统有效。 -| var name | default value | comment | -|------------------------------|---------------------------|-----------------------------| -| `BUILD_ROOT_PATH` | `{pwd}/buildroot` | 编译目标的根目录 | -| `BUILD_LIB_PATH` | `{pwd}/buildroot/lib` | 编译依赖库的根目录 | -| `BUILD_INCLUDE_PATH` | `{pwd}/buildroot/include` | 编译依赖库的头文件目录 | -| `BUILD_BIN_PATH` | `{pwd}/buildroot/bin` | 编译依赖库的二进制文件目录 | -| `PKG_ROOT_PATH` | `{pwd}/pkgroot` | 闭源或预编译工具下载后安装的目录 | -| `SOURCE_PATH` | `{pwd}/source` | 编译项目的源码解压缩目录 | -| `DOWNLOAD_PATH` | `{pwd}/downloads` | 下载的文件存放目录 | -| `SPC_CONCURRENCY` | 取决于当前 CPU 核心数量 | 并行编译的数量 | -| `SPC_SKIP_PHP_VERSION_CHECK` | 空 | 设置为 `yes` 时,跳过扩展对 PHP 版本的检查 | - -## 系统特定变量 - -这些环境变量是特定于系统的,它们只在特定的系统上才会生效。 - -### Windows - -| var name | default value | comment | -|---------------------|-----------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| -| `PHP_SDK_PATH` | `{pwd}\php-sdk-binary-tools` | PHP SDK 工具的安装目录 | -| `UPX_EXEC` | `$PKG_ROOT_PATH\bin\upx.exe` | UPX 压缩工具的路径 | -| `SPC_MICRO_PATCHES` | `static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream,cli_static` | 使用的 phpmicro [patches](https://github.com/easysoft/phpmicro/blob/master/patches/Readme.md) | - -### macOS - -| var name | default value | comment | -|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| -| `CC` | `clang` | C 编译器 | -| `CXX` | `clang++` | C++ 编译器 | -| `SPC_DEFAULT_C_FLAGS` | `--target=arm64-apple-darwin` 或 `--target=x86_64-apple-darwin` | 默认 C 编译标志(与 `CFLAGS` 不同) | -| `SPC_DEFAULT_CXX_FLAGS` | `--target=arm64-apple-darwin` 或 `--target=x86_64-apple-darwin` | 默认 C++ 编译标志(与 `CXXFLAGS` 不同) | -| `SPC_CMD_PREFIX_PHP_BUILDCONF` | `./buildconf --force` | 编译 PHP `buildconf` 命令前缀 | -| `SPC_CMD_PREFIX_PHP_CONFIGURE` | `./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg` | 编译 PHP `configure` 命令前缀 | -| `SPC_CMD_PREFIX_PHP_MAKE` | `make -j$SPC_CONCURRENCY` | 编译 PHP `make` 命令前缀 | -| `SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS` | `$SPC_DEFAULT_C_FLAGS -Werror=unknown-warning-option` | PHP `configure` 命令的 `CFLAGS` 变量 | -| `SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS` | `-I$BUILD_INCLUDE_PATH` | PHP `configure` 命令的 `CPPFLAGS` 变量 | -| `SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS` | `-L$BUILD_LIB_PATH` | PHP `configure` 命令的 `LDFLAGS` 变量 | -| `SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS` | `-g0 -Os` 或 `-g -O0`(当使用 `--no-strip` 时为后者) | PHP `make` 命令的 `EXTRA_CFLAGS` 变量 | -| `SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS` | `-lresolv` | PHP `make` 命令的额外 `EXTRA_LIBS` 变量 | -| `SPC_MICRO_PATCHES` | `static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream,macos_iconv` | 使用的 phpmicro [patches](https://github.com/easysoft/phpmicro/blob/master/patches/Readme.md) | - -### Linux - -| var name | default value | comment | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| -| `UPX_EXEC` | `$PKG_ROOT_PATH/bin/upx` | UPX 压缩工具的路径 | -| `GNU_ARCH` | `x86_64` 或 `aarch64` | 当前环境的 CPU 架构 | -| `CC` | Alpine: `gcc`, Other: `$GNU_ARCH-linux-musl-gcc` | C 编译器 | -| `CXX` | Alpine: `g++`, Other: `$GNU_ARCH-linux-musl-g++` | C++ 编译器 | -| `AR` | Alpine: `ar`, Other: `$GNU_ARCH-linux-musl-ar` | 静态库工具 | -| `LD` | `ld.gold` | 链接器 | -| `PATH` | `/usr/local/musl/bin:/usr/local/musl/$GNU_ARCH-linux-musl/bin:$PATH` | 系统 PATH | -| `SPC_DEFAULT_C_FLAGS` | empty | 默认 C 编译标志 | -| `SPC_DEFAULT_CXX_FLAGS` | empty | 默认 C++ 编译标志 | -| `SPC_CMD_PREFIX_PHP_BUILDCONF` | `./buildconf --force` | 编译 PHP `buildconf` 命令前缀 | -| `SPC_CMD_PREFIX_PHP_CONFIGURE` | `LD_LIBRARY_PATH={ld_lib_path} ./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg` | 编译 PHP `configure` 命令前缀 | -| `SPC_CMD_PREFIX_PHP_MAKE` | `make -j$SPC_CONCURRENCY` | 编译 PHP `make` 命令前缀 | -| `SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS` | `$SPC_DEFAULT_C_FLAGS` | PHP `configure` 命令的 `CFLAGS` 变量 | -| `SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS` | `-I$BUILD_INCLUDE_PATH` | PHP `configure` 命令的 `CPPFLAGS` 变量 | -| `SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS` | `-L$BUILD_LIB_PATH` | PHP `configure` 命令的 `LDFLAGS` 变量 | -| `SPC_CMD_VAR_PHP_CONFIGURE_LIBS` | `-ldl -lpthread` | PHP `configure` 命令的 `LIBS` 变量 | -| `SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS` | `-g0 -Os -fno-ident -fPIE` 或 `-g -O0 -fno-ident -fPIE`(当使用 `--no-strip` 时为后者) | PHP `make` 命令的 `EXTRA_CFLAGS` 变量 | -| `SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS` | empty | PHP `make` 命令的额外 `EXTRA_LIBS` 变量 | -| `SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM` | `-all-static`(当使用 `clang` 时:`-Xcompiler -fuse-ld=lld -all-static`) | `make` 命令的额外 `LDFLAGS` 变量(用于编译程序) | -| `SPC_NO_MUSL_PATH` | empty | 是否不插入 musl 工具链的 PATH(值为 `yes` 时不插入) | -| `SPC_MICRO_PATCHES` | `static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream` | 使用的 phpmicro [patches](https://github.com/easysoft/phpmicro/blob/master/patches/Readme.md) | - -> `{ld_lib_path}` 值为 `/usr/local/musl/$GNU_ARCH-linux-musl/lib`。 - -### FreeBSD - -因 FreeBSD 系统的用户较少,我们暂时不提供 FreeBSD 系统的环境变量。 - -### Unix - -对于 macOS、Linux、FreeBSD 等 Unix 系统,以下环境变量是通用的。 - -| var name | default value | comment | -|-------------------|------------------------------|------------------| -| `PATH` | `$BUILD_BIN_PATH:$PATH` | 系统 PATH | -| `PKG_CONFIG_PATH` | `$BUILD_LIB_PATH/pkgconfig` | pkg-config 的搜索路径 | -| `PKG_CONFIG` | `$BUILD_BIN_PATH/pkg-config` | pkg-config 命令路径 | +例如,你需要修改编译 PHP 的 `./configure` 命令,你可以在 `config/env.ini` 文件中找到 `SPC_CMD_PREFIX_PHP_CONFIGURE` 环境变量,然后修改其值即可。 ## 编译依赖库的环境变量(仅限 Unix 系统) @@ -142,6 +70,7 @@ openssl_CFLAGS="-O0" | `ldap_LDFLAGS` | `-L$BUILD_LIB_PATH` | | `openssl_CFLAGS` | Linux: `$SPC_DEFAULT_C_FLAGS`, Other: empty | | others... | empty | + ::: 下表是支持自定义以上三种变量的依赖库名称列表: @@ -165,5 +94,6 @@ openssl_CFLAGS="-O0" ::: tip 因为给每个库适配自定义环境变量是一项特别繁琐的工作,且大部分情况下你都不需要这些库的自定义环境变量,所以我们目前只支持了部分库的自定义环境变量。 -如果你需要自定义环境变量的库不在上方列表,可以通过 [GitHub Issue](https://github.com/crazywhalecc/static-php-cli/issues) 来提出需求。 +如果你需要自定义环境变量的库不在上方列表,可以通过 [GitHub Issue](https://github.com/crazywhalecc/static-php-cli/issues) +来提出需求。 ::: From 3f55d0cec3f942058283cb69968a34de8f844f9c Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 3 Oct 2024 14:55:56 +0800 Subject: [PATCH 019/101] Update composer.lock --- composer.lock | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.lock b/composer.lock index 3f5302da..3e1c43c5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "75f83f478863481b58c20716481f30a6", + "content-hash": "d487e13b2f355b899b9a6865f8b8366d", "packages": [ { "name": "illuminate/collections", @@ -7527,7 +7527,8 @@ "prefer-lowest": false, "platform": { "php": ">= 8.1", - "ext-mbstring": "*" + "ext-mbstring": "*", + "ext-zlib": "*" }, "platform-dev": [], "plugin-api-version": "2.2.0" From 3bdeafa6b663f91027e678b24e30ba6293c2ae99 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 3 Oct 2024 14:58:06 +0800 Subject: [PATCH 020/101] Fix curl hook test --- tests/SPC/store/CurlHookTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/SPC/store/CurlHookTest.php b/tests/SPC/store/CurlHookTest.php index 19876aec..2a3e7b25 100644 --- a/tests/SPC/store/CurlHookTest.php +++ b/tests/SPC/store/CurlHookTest.php @@ -16,7 +16,11 @@ class CurlHookTest extends TestCase { $header = []; CurlHook::setupGithubToken('GET', 'https://example.com', $header); - $this->assertEmpty($header); + if (getenv('GITHUB_TOKEN') === false) { + $this->assertEmpty($header); + } else { + $this->assertEquals(['Authorization: Bearer ' . getenv('GITHUB_TOKEN')], $header); + } putenv('GITHUB_TOKEN=token'); CurlHook::setupGithubToken('GET', 'https://example.com', $header); $this->assertEquals(['Authorization: Bearer token'], $header); From 54cf6fe692445312ef5f964c1bd90b0c3df33243 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 3 Oct 2024 15:01:14 +0800 Subject: [PATCH 021/101] Fix curl hook test --- tests/SPC/store/CurlHookTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/SPC/store/CurlHookTest.php b/tests/SPC/store/CurlHookTest.php index 2a3e7b25..8b950da6 100644 --- a/tests/SPC/store/CurlHookTest.php +++ b/tests/SPC/store/CurlHookTest.php @@ -21,6 +21,7 @@ class CurlHookTest extends TestCase } else { $this->assertEquals(['Authorization: Bearer ' . getenv('GITHUB_TOKEN')], $header); } + $header = []; putenv('GITHUB_TOKEN=token'); CurlHook::setupGithubToken('GET', 'https://example.com', $header); $this->assertEquals(['Authorization: Bearer token'], $header); From f067a510b73cc556f518fea81ac64f46309bfea9 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 3 Oct 2024 15:16:38 +0800 Subject: [PATCH 022/101] Fix composer phpunit version problem --- composer.json | 4 +- composer.lock | 2165 +++++++++++------------------ tests/SPC/builder/BuilderTest.php | 8 +- 3 files changed, 806 insertions(+), 1371 deletions(-) diff --git a/composer.json b/composer.json index ef41d17c..d362aa81 100644 --- a/composer.json +++ b/composer.json @@ -20,10 +20,10 @@ "captainhook/captainhook-phar": "^5.23", "captainhook/hook-installer": "^1.0", "friendsofphp/php-cs-fixer": "^3.25", - "humbug/box": "^4.5", + "humbug/box": "^4.5.0 || ^4.6.0", "nunomaduro/collision": "^7.8", "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.3" + "phpunit/phpunit": "^10.3 || ^9.5" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 3e1c43c5..3a7b9356 100644 --- a/composer.lock +++ b/composer.lock @@ -4,35 +4,35 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d487e13b2f355b899b9a6865f8b8366d", + "content-hash": "c76ada2dbca6ca234d4e03e07d947736", "packages": [ { "name": "illuminate/collections", - "version": "v11.26.0", + "version": "v10.48.22", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", - "reference": "4d333ea19a27230b424b9af56f34cd658b5bbce2" + "reference": "37c863cffb345869dd134eff8e646bc82a19cc96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/4d333ea19a27230b424b9af56f34cd658b5bbce2", - "reference": "4d333ea19a27230b424b9af56f34cd658b5bbce2", + "url": "https://api.github.com/repos/illuminate/collections/zipball/37c863cffb345869dd134eff8e646bc82a19cc96", + "reference": "37c863cffb345869dd134eff8e646bc82a19cc96", "shasum": "" }, "require": { - "illuminate/conditionable": "^11.0", - "illuminate/contracts": "^11.0", - "illuminate/macroable": "^11.0", - "php": "^8.2" + "illuminate/conditionable": "^10.0", + "illuminate/contracts": "^10.0", + "illuminate/macroable": "^10.0", + "php": "^8.1" }, "suggest": { - "symfony/var-dumper": "Required to use the dump method (^7.0)." + "symfony/var-dumper": "Required to use the dump method (^6.2)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "11.x-dev" + "dev-master": "10.x-dev" } }, "autoload": { @@ -59,20 +59,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-09-27T14:54:48+00:00" + "time": "2024-06-19T14:25:05+00:00" }, { "name": "illuminate/conditionable", - "version": "v11.26.0", + "version": "v10.48.22", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", - "reference": "362dd761b9920367bca1427a902158225e9e3a23" + "reference": "d0958e4741fc9d6f516a552060fd1b829a85e009" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/conditionable/zipball/362dd761b9920367bca1427a902158225e9e3a23", - "reference": "362dd761b9920367bca1427a902158225e9e3a23", + "url": "https://api.github.com/repos/illuminate/conditionable/zipball/d0958e4741fc9d6f516a552060fd1b829a85e009", + "reference": "d0958e4741fc9d6f516a552060fd1b829a85e009", "shasum": "" }, "require": { @@ -81,7 +81,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "11.x-dev" + "dev-master": "10.x-dev" } }, "autoload": { @@ -105,31 +105,31 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-06-28T20:10:30+00:00" + "time": "2023-02-03T08:06:17+00:00" }, { "name": "illuminate/contracts", - "version": "v11.26.0", + "version": "v10.48.22", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "56312862af937bd6da8e6dc8bbd88188dfb478f8" + "reference": "8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/56312862af937bd6da8e6dc8bbd88188dfb478f8", - "reference": "56312862af937bd6da8e6dc8bbd88188dfb478f8", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac", + "reference": "8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac", "shasum": "" }, "require": { - "php": "^8.2", + "php": "^8.1", "psr/container": "^1.1.1|^2.0.1", "psr/simple-cache": "^1.0|^2.0|^3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "11.x-dev" + "dev-master": "10.x-dev" } }, "autoload": { @@ -153,29 +153,29 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-09-22T15:08:08+00:00" + "time": "2024-01-15T18:52:32+00:00" }, { "name": "illuminate/macroable", - "version": "v11.26.0", + "version": "v10.48.22", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", - "reference": "e1cb9e51b9ed5d3c9bc1ab431d0a52fe42a990ed" + "reference": "dff667a46ac37b634dcf68909d9d41e94dc97c27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/macroable/zipball/e1cb9e51b9ed5d3c9bc1ab431d0a52fe42a990ed", - "reference": "e1cb9e51b9ed5d3c9bc1ab431d0a52fe42a990ed", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/dff667a46ac37b634dcf68909d9d41e94dc97c27", + "reference": "dff667a46ac37b634dcf68909d9d41e94dc97c27", "shasum": "" }, "require": { - "php": "^8.2" + "php": "^8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "11.x-dev" + "dev-master": "10.x-dev" } }, "autoload": { @@ -199,7 +199,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-06-28T20:10:30+00:00" + "time": "2023-06-05T12:46:42+00:00" }, { "name": "laravel/prompts", @@ -977,20 +977,20 @@ }, { "name": "symfony/string", - "version": "v7.1.5", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306" + "reference": "f8a1ccebd0997e16112dfecfd74220b78e5b284b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d66f9c343fa894ec2037cc928381df90a7ad4306", - "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306", + "url": "https://api.github.com/repos/symfony/string/zipball/f8a1ccebd0997e16112dfecfd74220b78e5b284b", + "reference": "f8a1ccebd0997e16112dfecfd74220b78e5b284b", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -1000,12 +1000,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/emoji": "^7.1", - "symfony/error-handler": "^6.4|^7.0", - "symfony/http-client": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0" + "symfony/var-exporter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1044,7 +1043,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.5" + "source": "https://github.com/symfony/string/tree/v6.4.12" }, "funding": [ { @@ -1060,7 +1059,7 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:28:38+00:00" + "time": "2024-09-20T08:15:52+00:00" }, { "name": "zhamao/logger", @@ -1135,36 +1134,43 @@ "packages-dev": [ { "name": "amphp/amp", - "version": "v3.0.2", + "version": "v2.6.4", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "138801fb68cfc9c329da8a7b39d01ce7291ee4b0" + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/138801fb68cfc9c329da8a7b39d01ce7291ee4b0", - "reference": "138801fb68cfc9c329da8a7b39d01ce7291ee4b0", + "url": "https://api.github.com/repos/amphp/amp/zipball/ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", "shasum": "" }, "require": { - "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2" + "php": ">=7.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "phpunit/phpunit": "^9", - "psalm/phar": "5.23.1" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^7 | ^8 | ^9", + "react/promise": "^2", + "vimeo/psalm": "^3.12" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, "autoload": { "files": [ - "src/functions.php", - "src/Future/functions.php", - "src/Internal/functions.php" + "lib/functions.php", + "lib/Internal/functions.php" ], "psr-4": { - "Amp\\": "src" + "Amp\\": "lib" } }, "notification-url": "https://packagist.org/downloads/", @@ -1172,6 +1178,10 @@ "MIT" ], "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, { "name": "Aaron Piotrowski", "email": "aaron@trowski.com" @@ -1183,10 +1193,6 @@ { "name": "Niklas Keller", "email": "me@kelunik.com" - }, - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" } ], "description": "A non-blocking concurrency framework for PHP applications.", @@ -1203,8 +1209,9 @@ "promise" ], "support": { + "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v3.0.2" + "source": "https://github.com/amphp/amp/tree/v2.6.4" }, "funding": [ { @@ -1212,45 +1219,41 @@ "type": "github" } ], - "time": "2024-05-10T21:37:46+00:00" + "time": "2024-03-21T18:52:26+00:00" }, { "name": "amphp/byte-stream", - "version": "v2.1.1", + "version": "v1.8.2", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93" + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/daa00f2efdbd71565bf64ffefa89e37542addf93", - "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/4f0e968ba3798a423730f567b1b50d3441c16ddc", + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc", "shasum": "" }, "require": { - "amphp/amp": "^3", - "amphp/parser": "^1.1", - "amphp/pipeline": "^1", - "amphp/serialization": "^1", - "amphp/sync": "^2", - "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2.3" + "amphp/amp": "^2", + "php": ">=7.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "amphp/phpunit-util": "^3", - "phpunit/phpunit": "^9", - "psalm/phar": "5.22.1" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.4", + "friendsofphp/php-cs-fixer": "^2.3", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6 || ^7 || ^8", + "psalm/phar": "^3.11.4" }, "type": "library", "autoload": { "files": [ - "src/functions.php", - "src/Internal/functions.php" + "lib/functions.php" ], "psr-4": { - "Amp\\ByteStream\\": "src" + "Amp\\ByteStream\\": "lib" } }, "notification-url": "https://packagist.org/downloads/", @@ -1279,7 +1282,7 @@ ], "support": { "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v2.1.1" + "source": "https://github.com/amphp/byte-stream/tree/v1.8.2" }, "funding": [ { @@ -1287,204 +1290,45 @@ "type": "github" } ], - "time": "2024-02-17T04:49:38+00:00" - }, - { - "name": "amphp/cache", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/cache.git", - "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/cache/zipball/46912e387e6aa94933b61ea1ead9cf7540b7797c", - "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c", - "shasum": "" - }, - "require": { - "amphp/amp": "^3", - "amphp/serialization": "^1", - "amphp/sync": "^2", - "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "amphp/phpunit-util": "^3", - "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Cache\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - } - ], - "description": "A fiber-aware cache API based on Amp and Revolt.", - "homepage": "https://amphp.org/cache", - "support": { - "issues": "https://github.com/amphp/cache/issues", - "source": "https://github.com/amphp/cache/tree/v2.0.1" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2024-04-19T03:38:06+00:00" - }, - { - "name": "amphp/dns", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/dns.git", - "reference": "758266b0ea7470e2e42cd098493bc6d6c7100cf7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/758266b0ea7470e2e42cd098493bc6d6c7100cf7", - "reference": "758266b0ea7470e2e42cd098493bc6d6c7100cf7", - "shasum": "" - }, - "require": { - "amphp/amp": "^3", - "amphp/byte-stream": "^2", - "amphp/cache": "^2", - "amphp/parser": "^1", - "amphp/windows-registry": "^1.0.1", - "daverandom/libdns": "^2.0.2", - "ext-filter": "*", - "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "amphp/phpunit-util": "^3", - "phpunit/phpunit": "^9", - "psalm/phar": "5.20" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "Amp\\Dns\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Wright", - "email": "addr@daverandom.com" - }, - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - } - ], - "description": "Async DNS resolution for Amp.", - "homepage": "https://github.com/amphp/dns", - "keywords": [ - "amp", - "amphp", - "async", - "client", - "dns", - "resolve" - ], - "support": { - "issues": "https://github.com/amphp/dns/issues", - "source": "https://github.com/amphp/dns/tree/v2.2.0" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2024-06-02T19:54:12+00:00" + "time": "2024-04-13T18:00:56+00:00" }, { "name": "amphp/parallel", - "version": "v2.2.9", + "version": "v1.4.3", "source": { "type": "git", "url": "https://github.com/amphp/parallel.git", - "reference": "73d293f1fc4df1bebc3c4fce1432e82dd7032238" + "reference": "3aac213ba7858566fd83d38ccb85b91b2d652cb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/73d293f1fc4df1bebc3c4fce1432e82dd7032238", - "reference": "73d293f1fc4df1bebc3c4fce1432e82dd7032238", + "url": "https://api.github.com/repos/amphp/parallel/zipball/3aac213ba7858566fd83d38ccb85b91b2d652cb0", + "reference": "3aac213ba7858566fd83d38ccb85b91b2d652cb0", "shasum": "" }, "require": { - "amphp/amp": "^3", - "amphp/byte-stream": "^2", - "amphp/cache": "^2", + "amphp/amp": "^2", + "amphp/byte-stream": "^1.6.1", "amphp/parser": "^1", - "amphp/pipeline": "^1", - "amphp/process": "^2", + "amphp/process": "^1", "amphp/serialization": "^1", - "amphp/socket": "^2", - "amphp/sync": "^2", - "php": ">=8.1", - "revolt/event-loop": "^1" + "amphp/sync": "^1.0.1", + "php": ">=7.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "amphp/phpunit-util": "^3", - "phpunit/phpunit": "^9", - "psalm/phar": "^5.18" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.1", + "phpunit/phpunit": "^8 || ^7" }, "type": "library", "autoload": { "files": [ - "src/Context/functions.php", - "src/Context/Internal/functions.php", - "src/Ipc/functions.php", - "src/Worker/functions.php" + "lib/Context/functions.php", + "lib/Sync/functions.php", + "lib/Worker/functions.php" ], "psr-4": { - "Amp\\Parallel\\": "src" + "Amp\\Parallel\\": "lib" } }, "notification-url": "https://packagist.org/downloads/", @@ -1496,10 +1340,6 @@ "name": "Aaron Piotrowski", "email": "aaron@trowski.com" }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, { "name": "Stephen Coakley", "email": "me@stephencoakley.com" @@ -1516,7 +1356,7 @@ ], "support": { "issues": "https://github.com/amphp/parallel/issues", - "source": "https://github.com/amphp/parallel/tree/v2.2.9" + "source": "https://github.com/amphp/parallel/tree/v1.4.3" }, "funding": [ { @@ -1524,7 +1364,65 @@ "type": "github" } ], - "time": "2024-03-24T18:27:44+00:00" + "time": "2023-03-23T08:04:23+00:00" + }, + { + "name": "amphp/parallel-functions", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/parallel-functions.git", + "reference": "04e92fcacfc921a56dfe12c23b3265e62593a7cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/parallel-functions/zipball/04e92fcacfc921a56dfe12c23b3265e62593a7cb", + "reference": "04e92fcacfc921a56dfe12c23b3265e62593a7cb", + "shasum": "" + }, + "require": { + "amphp/amp": "^2.0.3", + "amphp/parallel": "^1.4", + "amphp/serialization": "^1.0", + "laravel/serializable-closure": "^1.0", + "php": ">=7.4" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "v2.x-dev", + "amphp/phpunit-util": "^2.0", + "phpunit/phpunit": "^9.5.11" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\ParallelFunctions\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Parallel processing made simple.", + "support": { + "issues": "https://github.com/amphp/parallel-functions/issues", + "source": "https://github.com/amphp/parallel-functions/tree/v1.1.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-02-03T19:32:41+00:00" }, { "name": "amphp/parser", @@ -1588,107 +1486,37 @@ ], "time": "2024-03-21T19:16:53+00:00" }, - { - "name": "amphp/pipeline", - "version": "v1.2.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/pipeline.git", - "reference": "66c095673aa5b6e689e63b52d19e577459129ab3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/pipeline/zipball/66c095673aa5b6e689e63b52d19e577459129ab3", - "reference": "66c095673aa5b6e689e63b52d19e577459129ab3", - "shasum": "" - }, - "require": { - "amphp/amp": "^3", - "php": ">=8.1", - "revolt/event-loop": "^1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "amphp/phpunit-util": "^3", - "phpunit/phpunit": "^9", - "psalm/phar": "^5.18" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Pipeline\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Asynchronous iterators and operators.", - "homepage": "https://amphp.org/pipeline", - "keywords": [ - "amp", - "amphp", - "async", - "io", - "iterator", - "non-blocking" - ], - "support": { - "issues": "https://github.com/amphp/pipeline/issues", - "source": "https://github.com/amphp/pipeline/tree/v1.2.1" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2024-07-04T00:56:47+00:00" - }, { "name": "amphp/process", - "version": "v2.0.3", + "version": "v1.1.7", "source": { "type": "git", "url": "https://github.com/amphp/process.git", - "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d" + "reference": "1949d85b6d71af2818ff68144304a98495628f19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", - "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", + "url": "https://api.github.com/repos/amphp/process/zipball/1949d85b6d71af2818ff68144304a98495628f19", + "reference": "1949d85b6d71af2818ff68144304a98495628f19", "shasum": "" }, "require": { - "amphp/amp": "^3", - "amphp/byte-stream": "^2", - "amphp/sync": "^2", - "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2" + "amphp/amp": "^2", + "amphp/byte-stream": "^1.4", + "php": ">=7.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "amphp/phpunit-util": "^3", - "phpunit/phpunit": "^9", - "psalm/phar": "^5.4" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "phpunit/phpunit": "^6" }, "type": "library", "autoload": { "files": [ - "src/functions.php" + "lib/functions.php" ], "psr-4": { - "Amp\\Process\\": "src" + "Amp\\Process\\": "lib" } }, "notification-url": "https://packagist.org/downloads/", @@ -1709,11 +1537,11 @@ "email": "me@kelunik.com" } ], - "description": "A fiber-aware process manager based on Amp and Revolt.", - "homepage": "https://amphp.org/process", + "description": "Asynchronous process manager.", + "homepage": "https://github.com/amphp/process", "support": { "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v2.0.3" + "source": "https://github.com/amphp/process/tree/v1.1.7" }, "funding": [ { @@ -1721,7 +1549,7 @@ "type": "github" } ], - "time": "2024-04-19T03:13:44+00:00" + "time": "2024-04-19T03:00:28+00:00" }, { "name": "amphp/serialization", @@ -1782,120 +1610,33 @@ "time": "2020-03-25T21:39:07+00:00" }, { - "name": "amphp/socket", - "version": "v2.3.1", + "name": "amphp/sync", + "version": "v1.4.2", "source": { "type": "git", - "url": "https://github.com/amphp/socket.git", - "reference": "58e0422221825b79681b72c50c47a930be7bf1e1" + "url": "https://github.com/amphp/sync.git", + "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/58e0422221825b79681b72c50c47a930be7bf1e1", - "reference": "58e0422221825b79681b72c50c47a930be7bf1e1", + "url": "https://api.github.com/repos/amphp/sync/zipball/85ab06764f4f36d63b1356b466df6111cf4b89cf", + "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf", "shasum": "" }, "require": { - "amphp/amp": "^3", - "amphp/byte-stream": "^2", - "amphp/dns": "^2", - "ext-openssl": "*", - "kelunik/certificate": "^1.1", - "league/uri": "^6.5 | ^7", - "league/uri-interfaces": "^2.3 | ^7", - "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2" + "amphp/amp": "^2.2", + "php": ">=7.1" }, "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "amphp/phpunit-util": "^3", - "amphp/process": "^2", - "phpunit/phpunit": "^9", - "psalm/phar": "5.20" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.1", + "phpunit/phpunit": "^9 || ^8 || ^7" }, "type": "library", "autoload": { "files": [ "src/functions.php", - "src/Internal/functions.php", - "src/SocketAddress/functions.php" - ], - "psr-4": { - "Amp\\Socket\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@gmail.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Non-blocking socket connection / server implementations based on Amp and Revolt.", - "homepage": "https://github.com/amphp/socket", - "keywords": [ - "amp", - "async", - "encryption", - "non-blocking", - "sockets", - "tcp", - "tls" - ], - "support": { - "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v2.3.1" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2024-04-21T14:33:03+00:00" - }, - { - "name": "amphp/sync", - "version": "v2.3.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/sync.git", - "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/sync/zipball/217097b785130d77cfcc58ff583cf26cd1770bf1", - "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1", - "shasum": "" - }, - "require": { - "amphp/amp": "^3", - "amphp/pipeline": "^1", - "amphp/serialization": "^1", - "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "amphp/phpunit-util": "^3", - "phpunit/phpunit": "^9", - "psalm/phar": "5.23" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions.php" + "src/ConcurrentIterator/functions.php" ], "psr-4": { "Amp\\Sync\\": "src" @@ -1910,16 +1651,12 @@ "name": "Aaron Piotrowski", "email": "aaron@trowski.com" }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, { "name": "Stephen Coakley", "email": "me@stephencoakley.com" } ], - "description": "Non-blocking synchronization primitives for PHP based on Amp and Revolt.", + "description": "Mutex, Semaphore, and other synchronization tools for Amp.", "homepage": "https://github.com/amphp/sync", "keywords": [ "async", @@ -1930,7 +1667,7 @@ ], "support": { "issues": "https://github.com/amphp/sync/issues", - "source": "https://github.com/amphp/sync/tree/v2.3.0" + "source": "https://github.com/amphp/sync/tree/v1.4.2" }, "funding": [ { @@ -1938,59 +1675,7 @@ "type": "github" } ], - "time": "2024-08-03T19:31:26+00:00" - }, - { - "name": "amphp/windows-registry", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/windows-registry.git", - "reference": "0d569e8f256cca974e3842b6e78b4e434bf98306" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/windows-registry/zipball/0d569e8f256cca974e3842b6e78b4e434bf98306", - "reference": "0d569e8f256cca974e3842b6e78b4e434bf98306", - "shasum": "" - }, - "require": { - "amphp/byte-stream": "^2", - "amphp/process": "^2", - "php": ">=8.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "psalm/phar": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\WindowsRegistry\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Windows Registry Reader.", - "support": { - "issues": "https://github.com/amphp/windows-registry/issues", - "source": "https://github.com/amphp/windows-registry/tree/v1.0.1" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2024-01-30T23:01:51+00:00" + "time": "2021-10-25T18:29:10+00:00" }, { "name": "captainhook/captainhook-phar", @@ -2395,50 +2080,6 @@ ], "time": "2024-05-06T16:37:16+00:00" }, - { - "name": "daverandom/libdns", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/DaveRandom/LibDNS.git", - "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", - "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "Required for IDN support" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "LibDNS\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "DNS protocol implementation written in pure PHP", - "keywords": [ - "dns" - ], - "support": { - "issues": "https://github.com/DaveRandom/LibDNS/issues", - "source": "https://github.com/DaveRandom/LibDNS/tree/v2.1.0" - }, - "time": "2024-04-12T12:12:48+00:00" - }, { "name": "doctrine/deprecations", "version": "1.1.3", @@ -2486,6 +2127,76 @@ }, "time": "2024-01-30T19:34:25+00:00" }, + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:23:10+00:00" + }, { "name": "evenement/evenement", "version": "v3.0.2", @@ -2535,45 +2246,44 @@ }, { "name": "fidry/console", - "version": "0.6.10", + "version": "0.5.5", "source": { "type": "git", "url": "https://github.com/theofidry/console.git", - "reference": "a681ea3aa7f5c0c78cd437250f64b13d2818c95d" + "reference": "bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/console/zipball/a681ea3aa7f5c0c78cd437250f64b13d2818c95d", - "reference": "a681ea3aa7f5c0c78cd437250f64b13d2818c95d", + "url": "https://api.github.com/repos/theofidry/console/zipball/bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7", + "reference": "bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7", "shasum": "" }, "require": { - "php": "^8.2", - "psr/log": "^3.0", - "symfony/console": "^6.4 || ^7.0", - "symfony/deprecation-contracts": "^3.4", - "symfony/event-dispatcher-contracts": "^2.5 || ^3.0", - "symfony/service-contracts": "^2.5 || ^3.0", - "thecodingmachine/safe": "^2.0", + "php": "^7.4.0 || ^8.0.0", + "symfony/console": "^4.4 || ^5.4 || ^6.1", + "symfony/event-dispatcher-contracts": "^1.0 || ^2.5 || ^3.0", + "symfony/service-contracts": "^1.0 || ^2.5 || ^3.0", + "thecodingmachine/safe": "^1.3 || ^2.0", "webmozart/assert": "^1.11" }, "conflict": { - "symfony/dependency-injection": "<6.4.0", - "symfony/framework-bundle": "<6.4.0", - "symfony/http-kernel": "<6.4.0" + "symfony/dependency-injection": "<5.3.0", + "symfony/framework-bundle": "<5.3.0", + "symfony/http-kernel": "<5.3.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "composer/semver": "^3.3.2", - "ergebnis/composer-normalize": "^2.33", - "fidry/makefile": "^0.2.1 || ^1.0.0", - "infection/infection": "^0.28", - "phpunit/phpunit": "^10.2", - "symfony/dependency-injection": "^6.4", - "symfony/flex": "^2.4.0", - "symfony/framework-bundle": "^6.4", - "symfony/http-kernel": "^6.4", - "symfony/yaml": "^6.4 || ^7.0" + "bamarni/composer-bin-plugin": "^1.4", + "composer/semver": "^3.3", + "ergebnis/composer-normalize": "^2.28", + "infection/infection": "^0.26", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.4.3", + "symfony/dependency-injection": "^4.4 || ^5.4 || ^6.1", + "symfony/framework-bundle": "^4.4 || ^5.4 || ^6.1", + "symfony/http-kernel": "^4.4 || ^5.4 || ^6.1", + "symfony/phpunit-bridge": "^4.4.47 || ^5.4 || ^6.0", + "symfony/yaml": "^4.4 || ^5.4 || ^6.1", + "webmozarts/strict-phpunit": "^7.3" }, "type": "library", "extra": { @@ -2608,7 +2318,7 @@ ], "support": { "issues": "https://github.com/theofidry/console/issues", - "source": "https://github.com/theofidry/console/tree/0.6.10" + "source": "https://github.com/theofidry/console/tree/0.5.5" }, "funding": [ { @@ -2616,7 +2326,7 @@ "type": "github" } ], - "time": "2024-04-23T08:36:33+00:00" + "time": "2022-12-18T10:49:34+00:00" }, { "name": "fidry/cpu-core-counter", @@ -2922,61 +2632,66 @@ }, { "name": "humbug/box", - "version": "4.6.2", + "version": "4.5.1", "source": { "type": "git", "url": "https://github.com/box-project/box.git", - "reference": "29c3585c64a16d17df97699dd9e0291591a266a3" + "reference": "1e10a1e974a831b64dab801d09dffa6acd43bd7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/box-project/box/zipball/29c3585c64a16d17df97699dd9e0291591a266a3", - "reference": "29c3585c64a16d17df97699dd9e0291591a266a3", + "url": "https://api.github.com/repos/box-project/box/zipball/1e10a1e974a831b64dab801d09dffa6acd43bd7f", + "reference": "1e10a1e974a831b64dab801d09dffa6acd43bd7f", "shasum": "" }, "require": { - "amphp/parallel": "^2.0", + "amphp/parallel-functions": "^1.1", "composer-plugin-api": "^2.2", "composer/semver": "^3.3.2", "composer/xdebug-handler": "^3.0.3", "ext-iconv": "*", "ext-mbstring": "*", "ext-phar": "*", - "fidry/console": "^0.6.0", - "fidry/filesystem": "^1.2.1", + "ext-sodium": "*", + "fidry/console": "^0.5.3 || ^0.6.0", + "fidry/filesystem": "^1.1", "humbug/php-scoper": "^0.18.6", "justinrainbow/json-schema": "^5.2.12", + "laravel/serializable-closure": "^1.2.2", "nikic/iter": "^2.2", - "php": "^8.2", - "phpdocumentor/reflection-docblock": "^5.4", + "nikic/php-parser": "^4.15.2", + "paragonie/constant_time_encoding": "^2.6", + "php": "^8.1", + "phpdocumentor/reflection-docblock": "^5.3", "phpdocumentor/type-resolver": "^1.7", "psr/log": "^3.0", - "sebastian/diff": "^5.0", - "seld/jsonlint": "^1.10.2", - "seld/phar-utils": "^1.2", - "symfony/finder": "^6.4.0 || ^7.0.0", + "sebastian/diff": "^4.0", + "seld/jsonlint": "^1.9", + "symfony/console": "^6.1.7", + "symfony/filesystem": "^6.1.5", + "symfony/finder": "^6.1.3", "symfony/polyfill-iconv": "^1.28", "symfony/polyfill-mbstring": "^1.28", - "symfony/process": "^6.4.0 || ^7.0.0", - "symfony/var-dumper": "^6.4.0 || ^7.0.0", - "thecodingmachine/safe": "^2.5", + "symfony/process": "^6.1.3", + "symfony/var-dumper": "^6.1.6", "webmozart/assert": "^1.11" }, "replace": { + "paragonie/sodium_compat": "*", "symfony/polyfill-php80": "*", - "symfony/polyfill-php81": "*", - "symfony/polyfill-php82": "*" + "symfony/polyfill-php81": "*" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ergebnis/composer-normalize": "^2.29", - "ext-xml": "*", "fidry/makefile": "^1.0.1", "mikey179/vfsstream": "^1.6.11", - "phpspec/prophecy": "^1.18", - "phpspec/prophecy-phpunit": "^2.1.0", - "phpunit/phpunit": "^10.5.2", - "symfony/yaml": "^6.4.0 || ^7.0.0" + "phpspec/prophecy": "^1.17", + "phpspec/prophecy-phpunit": "^2.0.2", + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^6.1.6", + "symfony/yaml": "^6.2", + "webmozarts/strict-phpunit": "^7.6" }, "suggest": { "ext-openssl": "To accelerate private key generation." @@ -2996,6 +2711,7 @@ }, "autoload": { "files": [ + "src/consts.php", "src/functions.php" ], "psr-4": { @@ -3027,44 +2743,43 @@ ], "support": { "issues": "https://github.com/box-project/box/issues", - "source": "https://github.com/box-project/box/tree/4.6.2" + "source": "https://github.com/box-project/box/tree/4.5.1" }, - "time": "2024-04-23T19:33:48+00:00" + "time": "2023-11-04T17:51:11+00:00" }, { "name": "humbug/php-scoper", - "version": "0.18.15", + "version": "0.18.7", "source": { "type": "git", "url": "https://github.com/humbug/php-scoper.git", - "reference": "79b2b4e0fbc1d1ef6ae99c4e078137b42bd43d19" + "reference": "9386a0af946f175d7a1ebfb68851bc2bb8ad7858" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/humbug/php-scoper/zipball/79b2b4e0fbc1d1ef6ae99c4e078137b42bd43d19", - "reference": "79b2b4e0fbc1d1ef6ae99c4e078137b42bd43d19", + "url": "https://api.github.com/repos/humbug/php-scoper/zipball/9386a0af946f175d7a1ebfb68851bc2bb8ad7858", + "reference": "9386a0af946f175d7a1ebfb68851bc2bb8ad7858", "shasum": "" }, "require": { - "fidry/console": "^0.6.10", + "fidry/console": "^0.5.0", "fidry/filesystem": "^1.1", - "jetbrains/phpstorm-stubs": "^2024.1", - "nikic/php-parser": "^5.0", - "php": "^8.2", - "symfony/console": "^6.4 || ^7.0", - "symfony/filesystem": "^6.4 || ^7.0", - "symfony/finder": "^6.4 || ^7.0", - "symfony/var-dumper": "^7.1", + "jetbrains/phpstorm-stubs": "^v2022.2", + "nikic/php-parser": "^4.12", + "php": "^8.1", + "symfony/console": "^5.2 || ^6.0", + "symfony/filesystem": "^5.2 || ^6.0", + "symfony/finder": "^5.2 || ^6.0", "thecodingmachine/safe": "^2.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.1", "ergebnis/composer-normalize": "^2.28", "fidry/makefile": "^1.0", - "humbug/box": "^4.6.2", + "humbug/box": "^4.5.1", "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^10.0", - "symfony/yaml": "^6.4 || ^7.0" + "phpunit/phpunit": "^9.0", + "symfony/yaml": "^6.1" }, "bin": [ "bin/php-scoper" @@ -3111,29 +2826,30 @@ "description": "Prefixes all PHP namespaces in a file or directory.", "support": { "issues": "https://github.com/humbug/php-scoper/issues", - "source": "https://github.com/humbug/php-scoper/tree/0.18.15" + "source": "https://github.com/humbug/php-scoper/tree/0.18.7" }, - "time": "2024-09-02T13:35:10+00:00" + "time": "2023-11-04T18:01:12+00:00" }, { "name": "jetbrains/phpstorm-stubs", - "version": "v2024.2", + "version": "v2022.3", "source": { "type": "git", "url": "https://github.com/JetBrains/phpstorm-stubs.git", - "reference": "cf7e447ddfa7f0cbab0c1dd38392f0cb05f9881c" + "reference": "6b568c153cea002dc6fad96285c3063d07cab18d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/cf7e447ddfa7f0cbab0c1dd38392f0cb05f9881c", - "reference": "cf7e447ddfa7f0cbab0c1dd38392f0cb05f9881c", + "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/6b568c153cea002dc6fad96285c3063d07cab18d", + "reference": "6b568c153cea002dc6fad96285c3063d07cab18d", "shasum": "" }, "require-dev": { - "friendsofphp/php-cs-fixer": "v3.46.0", - "nikic/php-parser": "v5.0.0", - "phpdocumentor/reflection-docblock": "5.3.0", - "phpunit/phpunit": "10.5.5" + "friendsofphp/php-cs-fixer": "@stable", + "nikic/php-parser": "@stable", + "php": "^8.0", + "phpdocumentor/reflection-docblock": "@stable", + "phpunit/phpunit": "@stable" }, "type": "library", "autoload": { @@ -3158,9 +2874,9 @@ "type" ], "support": { - "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2024.2" + "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2022.3" }, - "time": "2024-06-17T19:18:18+00:00" + "time": "2022-10-17T09:21:37+00:00" }, { "name": "justinrainbow/json-schema", @@ -3228,26 +2944,28 @@ "time": "2024-07-06T21:00:26+00:00" }, { - "name": "kelunik/certificate", - "version": "v1.1.3", + "name": "laravel/serializable-closure", + "version": "v1.3.5", "source": { "type": "git", - "url": "https://github.com/kelunik/certificate.git", - "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e" + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kelunik/certificate/zipball/7e00d498c264d5eb4f78c69f41c8bd6719c0199e", - "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c", + "reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c", "shasum": "" }, "require": { - "ext-openssl": "*", - "php": ">=7.0" + "php": "^7.3|^8.0" }, "require-dev": { - "amphp/php-cs-fixer-config": "^2", - "phpunit/phpunit": "^6 | 7 | ^8 | ^9" + "illuminate/support": "^8.0|^9.0|^10.0|^11.0", + "nesbot/carbon": "^2.61|^3.0", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11|^6.2.0|^7.0.0" }, "type": "library", "extra": { @@ -3257,7 +2975,7 @@ }, "autoload": { "psr-4": { - "Kelunik\\Certificate\\": "src" + "Laravel\\SerializableClosure\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3266,198 +2984,25 @@ ], "authors": [ { - "name": "Niklas Keller", - "email": "me@kelunik.com" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" } ], - "description": "Access certificate details and transform between different formats.", + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", "keywords": [ - "DER", - "certificate", - "certificates", - "openssl", - "pem", - "x509" + "closure", + "laravel", + "serializable" ], "support": { - "issues": "https://github.com/kelunik/certificate/issues", - "source": "https://github.com/kelunik/certificate/tree/v1.1.3" + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" }, - "time": "2023-02-03T21:26:53+00:00" - }, - { - "name": "league/uri", - "version": "7.4.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/uri.git", - "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/bedb6e55eff0c933668addaa7efa1e1f2c417cc4", - "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4", - "shasum": "" - }, - "require": { - "league/uri-interfaces": "^7.3", - "php": "^8.1" - }, - "conflict": { - "league/uri-schemes": "^1.0" - }, - "suggest": { - "ext-bcmath": "to improve IPV4 host parsing", - "ext-fileinfo": "to create Data URI from file contennts", - "ext-gmp": "to improve IPV4 host parsing", - "ext-intl": "to handle IDN host with the best performance", - "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", - "league/uri-components": "Needed to easily manipulate URI objects components", - "php-64bit": "to improve IPV4 host parsing", - "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Uri\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ignace Nyamagana Butera", - "email": "nyamsprod@gmail.com", - "homepage": "https://nyamsprod.com" - } - ], - "description": "URI manipulation library", - "homepage": "https://uri.thephpleague.com", - "keywords": [ - "data-uri", - "file-uri", - "ftp", - "hostname", - "http", - "https", - "middleware", - "parse_str", - "parse_url", - "psr-7", - "query-string", - "querystring", - "rfc3986", - "rfc3987", - "rfc6570", - "uri", - "uri-template", - "url", - "ws" - ], - "support": { - "docs": "https://uri.thephpleague.com", - "forum": "https://thephpleague.slack.com", - "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.4.1" - }, - "funding": [ - { - "url": "https://github.com/sponsors/nyamsprod", - "type": "github" - } - ], - "time": "2024-03-23T07:42:40+00:00" - }, - { - "name": "league/uri-interfaces", - "version": "7.4.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "8d43ef5c841032c87e2de015972c06f3865ef718" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/8d43ef5c841032c87e2de015972c06f3865ef718", - "reference": "8d43ef5c841032c87e2de015972c06f3865ef718", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^8.1", - "psr/http-factory": "^1", - "psr/http-message": "^1.1 || ^2.0" - }, - "suggest": { - "ext-bcmath": "to improve IPV4 host parsing", - "ext-gmp": "to improve IPV4 host parsing", - "ext-intl": "to handle IDN host with the best performance", - "php-64bit": "to improve IPV4 host parsing", - "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Uri\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ignace Nyamagana Butera", - "email": "nyamsprod@gmail.com", - "homepage": "https://nyamsprod.com" - } - ], - "description": "Common interfaces and classes for URI representation and interaction", - "homepage": "https://uri.thephpleague.com", - "keywords": [ - "data-uri", - "file-uri", - "ftp", - "hostname", - "http", - "https", - "parse_str", - "parse_url", - "psr-7", - "query-string", - "querystring", - "rfc3986", - "rfc3987", - "rfc6570", - "uri", - "url", - "ws" - ], - "support": { - "docs": "https://uri.thephpleague.com", - "forum": "https://thephpleague.slack.com", - "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.1" - }, - "funding": [ - { - "url": "https://github.com/sponsors/nyamsprod", - "type": "github" - } - ], - "time": "2024-03-23T07:42:40+00:00" + "time": "2024-09-23T13:33:08+00:00" }, { "name": "myclabs/deep-copy", @@ -3573,27 +3118,25 @@ }, { "name": "nikic/php-parser", - "version": "v5.3.0", + "version": "v4.19.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a" + "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3abf7425cd284141dc5d8d14a9ee444de3345d1a", - "reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/715f4d25e225bc47b293a8b997fe6ce99bf987d2", + "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2", "shasum": "" }, "require": { - "ext-ctype": "*", - "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.4" + "php": ">=7.1" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -3601,7 +3144,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "4.9-dev" } }, "autoload": { @@ -3625,9 +3168,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.4" }, - "time": "2024-09-29T13:56:26+00:00" + "time": "2024-09-29T15:01:53+00:00" }, { "name": "nunomaduro/collision", @@ -3811,6 +3354,73 @@ ], "time": "2023-02-08T01:06:31+00:00" }, + { + "name": "paragonie/constant_time_encoding", + "version": "v2.7.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105", + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105", + "shasum": "" + }, + "require": { + "php": "^7|^8" + }, + "require-dev": { + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "time": "2024-05-08T12:18:48+00:00" + }, { "name": "phar-io/composer-distributor", "version": "1.0.2", @@ -4425,16 +4035,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.16", + "version": "9.2.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "7e308268858ed6baedc8704a304727d20bc07c77" + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77", - "reference": "7e308268858ed6baedc8704a304727d20bc07c77", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { @@ -4442,18 +4052,18 @@ "ext-libxml": "*", "ext-xmlwriter": "*", "nikic/php-parser": "^4.19.1 || ^5.1.0", - "php": ">=8.1", - "phpunit/php-file-iterator": "^4.1.0", - "phpunit/php-text-template": "^3.0.1", - "sebastian/code-unit-reverse-lookup": "^3.0.0", - "sebastian/complexity": "^3.2.0", - "sebastian/environment": "^6.1.0", - "sebastian/lines-of-code": "^2.0.2", - "sebastian/version": "^4.0.1", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^10.1" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -4462,7 +4072,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.1.x-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -4491,7 +4101,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, "funding": [ { @@ -4499,32 +4109,32 @@ "type": "github" } ], - "time": "2024-08-22T04:31:57+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "4.1.0", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", - "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4551,8 +4161,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { @@ -4560,28 +4169,28 @@ "type": "github" } ], - "time": "2023-08-31T06:24:48+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { "name": "phpunit/php-invoker", - "version": "4.0.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", - "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-pcntl": "*" @@ -4589,7 +4198,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -4615,7 +4224,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" }, "funding": [ { @@ -4623,32 +4232,32 @@ "type": "github" } ], - "time": "2023-02-03T06:56:09+00:00" + "time": "2020-09-28T05:58:55+00:00" }, { "name": "phpunit/php-text-template", - "version": "3.0.1", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", - "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -4674,8 +4283,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, "funding": [ { @@ -4683,32 +4291,32 @@ "type": "github" } ], - "time": "2023-08-31T14:07:24+00:00" + "time": "2020-10-26T05:33:50+00:00" }, { "name": "phpunit/php-timer", - "version": "6.0.0", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", - "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -4734,7 +4342,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, "funding": [ { @@ -4742,23 +4350,24 @@ "type": "github" } ], - "time": "2023-02-03T06:57:52+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "10.5.35", + "version": "9.6.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7ac8b4e63f456046dcb4c9787da9382831a1874b" + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7ac8b4e63f456046dcb4c9787da9382831a1874b", - "reference": "7ac8b4e63f456046dcb4c9787da9382831a1874b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -4768,26 +4377,27 @@ "myclabs/deep-copy": "^1.12.0", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.16", - "phpunit/php-file-iterator": "^4.1.0", - "phpunit/php-invoker": "^4.0.0", - "phpunit/php-text-template": "^3.0.1", - "phpunit/php-timer": "^6.0.0", - "sebastian/cli-parser": "^2.0.1", - "sebastian/code-unit": "^2.0.0", - "sebastian/comparator": "^5.0.2", - "sebastian/diff": "^5.1.1", - "sebastian/environment": "^6.1.0", - "sebastian/exporter": "^5.1.2", - "sebastian/global-state": "^6.0.2", - "sebastian/object-enumerator": "^5.0.0", - "sebastian/recursion-context": "^5.0.0", - "sebastian/type": "^4.0.0", - "sebastian/version": "^4.0.1" + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", + "sebastian/version": "^3.0.2" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files" + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "bin": [ "phpunit" @@ -4795,7 +4405,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.5-dev" + "dev-master": "9.6-dev" } }, "autoload": { @@ -4827,7 +4437,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.35" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.21" }, "funding": [ { @@ -4843,7 +4453,7 @@ "type": "tidelift" } ], - "time": "2024-09-19T10:52:21+00:00" + "time": "2024-09-19T10:50:18+00:00" }, { "name": "psr/event-dispatcher", @@ -4895,114 +4505,6 @@ }, "time": "2019-01-08T18:20:26+00:00" }, - { - "name": "psr/http-factory", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory" - }, - "time": "2024-04-15T12:06:14+00:00" - }, - { - "name": "psr/http-message", - "version": "2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" - }, - "time": "2023-04-04T09:54:51+00:00" - }, { "name": "react/cache", "version": "v1.2.0", @@ -5533,102 +5035,30 @@ ], "time": "2024-06-11T12:45:25+00:00" }, - { - "name": "revolt/event-loop", - "version": "v1.0.6", - "source": { - "type": "git", - "url": "https://github.com/revoltphp/event-loop.git", - "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/25de49af7223ba039f64da4ae9a28ec2d10d0254", - "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "require-dev": { - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^9", - "psalm/phar": "^5.15" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Revolt\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "ceesjank@gmail.com" - }, - { - "name": "Christian Lück", - "email": "christian@clue.engineering" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Rock-solid event loop for concurrent PHP applications.", - "keywords": [ - "async", - "asynchronous", - "concurrency", - "event", - "event-loop", - "non-blocking", - "scheduler" - ], - "support": { - "issues": "https://github.com/revoltphp/event-loop/issues", - "source": "https://github.com/revoltphp/event-loop/tree/v1.0.6" - }, - "time": "2023-11-30T05:34:44+00:00" - }, { "name": "sebastian/cli-parser", - "version": "2.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", - "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -5651,8 +5081,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -5660,32 +5089,32 @@ "type": "github" } ], - "time": "2024-03-02T07:12:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", - "version": "2.0.0", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -5708,7 +5137,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" }, "funding": [ { @@ -5716,32 +5145,32 @@ "type": "github" } ], - "time": "2023-02-03T06:58:43+00:00" + "time": "2020-10-26T13:08:54+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "3.0.0", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -5763,7 +5192,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, "funding": [ { @@ -5771,36 +5200,34 @@ "type": "github" } ], - "time": "2023-02-03T06:59:15+00:00" + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "5.0.2", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53", - "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-mbstring": "*", - "php": ">=8.1", - "sebastian/diff": "^5.0", - "sebastian/exporter": "^5.0" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^10.4" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -5839,8 +5266,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.2" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -5848,33 +5274,33 @@ "type": "github" } ], - "time": "2024-08-12T06:03:08+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", - "version": "3.2.0", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "68ff824baeae169ec9f2137158ee529584553799" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", - "reference": "68ff824baeae169ec9f2137158ee529584553799", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.2-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -5897,8 +5323,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -5906,33 +5331,33 @@ "type": "github" } ], - "time": "2023-12-21T08:37:17+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", - "version": "5.1.1", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", - "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0", - "symfony/process": "^6.4" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -5964,8 +5389,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -5973,27 +5397,27 @@ "type": "github" } ], - "time": "2024-03-02T07:15:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", - "version": "6.1.0", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", - "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-posix": "*" @@ -6001,7 +5425,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.1-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -6020,7 +5444,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "https://github.com/sebastianbergmann/environment", + "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -6028,8 +5452,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -6037,34 +5460,34 @@ "type": "github" } ], - "time": "2024-03-23T08:47:14+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", - "version": "5.1.2", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "955288482d97c19a372d3f31006ab3f37da47adf" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", - "reference": "955288482d97c19a372d3f31006ab3f37da47adf", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { - "ext-mbstring": "*", - "php": ">=8.1", - "sebastian/recursion-context": "^5.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -6106,8 +5529,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -6115,35 +5537,38 @@ "type": "github" } ], - "time": "2024-03-02T07:17:12+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "6.0.2", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", - "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -6162,14 +5587,13 @@ } ], "description": "Snapshotting of global state", - "homepage": "https://www.github.com/sebastianbergmann/global-state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -6177,33 +5601,33 @@ "type": "github" } ], - "time": "2024-03-02T07:19:19+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", - "version": "2.0.2", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", - "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -6226,8 +5650,7 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -6235,34 +5658,34 @@ "type": "github" } ], - "time": "2023-12-21T08:38:20+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", - "version": "5.0.0", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -6284,7 +5707,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { @@ -6292,32 +5715,32 @@ "type": "github" } ], - "time": "2023-02-03T07:08:32+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { "name": "sebastian/object-reflector", - "version": "3.0.0", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -6339,7 +5762,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { @@ -6347,32 +5770,32 @@ "type": "github" } ], - "time": "2023-02-03T07:06:18+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { "name": "sebastian/recursion-context", - "version": "5.0.0", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -6402,7 +5825,7 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -6410,32 +5833,86 @@ "type": "github" } ], - "time": "2023-02-03T07:05:40+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { - "name": "sebastian/type", - "version": "4.0.0", + "name": "sebastian/resource-operations", + "version": "3.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-14T16:00:52+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" } }, "autoload": { @@ -6458,7 +5935,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -6466,29 +5943,29 @@ "type": "github" } ], - "time": "2023-02-03T07:10:45+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", - "version": "4.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -6511,7 +5988,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, "funding": [ { @@ -6519,7 +5996,7 @@ "type": "github" } ], - "time": "2023-02-07T11:34:05+00:00" + "time": "2020-09-28T06:39:44+00:00" }, { "name": "seld/jsonlint", @@ -6585,74 +6062,26 @@ ], "time": "2024-07-11T14:55:45+00:00" }, - { - "name": "seld/phar-utils", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", - "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\PharUtils\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "PHAR file format utilities, for when PHP phars you up", - "keywords": [ - "phar" - ], - "support": { - "issues": "https://github.com/Seldaek/phar-utils/issues", - "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1" - }, - "time": "2022-08-31T10:31:18+00:00" - }, { "name": "symfony/event-dispatcher", - "version": "v7.1.1", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7" + "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", - "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8d7507f02b06e06815e56bb39aa0128e3806208b", + "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<6.4", + "symfony/dependency-injection": "<5.4", "symfony/service-contracts": "<2.5" }, "provide": { @@ -6661,13 +6090,13 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/error-handler": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^5.4|^6.0|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0" + "symfony/stopwatch": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -6695,7 +6124,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.1" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.8" }, "funding": [ { @@ -6711,7 +6140,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6791,25 +6220,25 @@ }, { "name": "symfony/filesystem", - "version": "v7.1.5", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a" + "reference": "f810e3cbdf7fdc35983968523d09f349fa9ada12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/61fe0566189bf32e8cfee78335d8776f64a66f5a", - "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/f810e3cbdf7fdc35983968523d09f349fa9ada12", + "reference": "f810e3cbdf7fdc35983968523d09f349fa9ada12", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^6.4|^7.0" + "symfony/process": "^5.4|^6.4|^7.0" }, "type": "library", "autoload": { @@ -6837,7 +6266,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.1.5" + "source": "https://github.com/symfony/filesystem/tree/v6.4.12" }, "funding": [ { @@ -6853,27 +6282,27 @@ "type": "tidelift" } ], - "time": "2024-09-17T09:16:35+00:00" + "time": "2024-09-16T16:01:33+00:00" }, { "name": "symfony/finder", - "version": "v7.1.4", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "d95bbf319f7d052082fb7af147e0f835a695e823" + "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/d95bbf319f7d052082fb7af147e0f835a695e823", - "reference": "d95bbf319f7d052082fb7af147e0f835a695e823", + "url": "https://api.github.com/repos/symfony/finder/zipball/d7eb6daf8cd7e9ac4976e9576b32042ef7253453", + "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "symfony/filesystem": "^6.4|^7.0" + "symfony/filesystem": "^6.0|^7.0" }, "type": "library", "autoload": { @@ -6901,7 +6330,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.1.4" + "source": "https://github.com/symfony/finder/tree/v6.4.11" }, "funding": [ { @@ -6917,24 +6346,24 @@ "type": "tidelift" } ], - "time": "2024-08-13T14:28:19+00:00" + "time": "2024-08-13T14:27:37+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.1.1", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55" + "reference": "22ab9e9101ab18de37839074f8a1197f55590c1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/47aa818121ed3950acd2b58d1d37d08a94f9bf55", - "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/22ab9e9101ab18de37839074f8a1197f55590c1b", + "reference": "22ab9e9101ab18de37839074f8a1197f55590c1b", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", @@ -6968,7 +6397,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.1.1" + "source": "https://github.com/symfony/options-resolver/tree/v6.4.8" }, "funding": [ { @@ -6984,7 +6413,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/polyfill-iconv", @@ -7068,20 +6497,20 @@ }, { "name": "symfony/process", - "version": "v7.1.5", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "5c03ee6369281177f07f7c68252a280beccba847" + "reference": "3f94e5f13ff58df371a7ead461b6e8068900fbb3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5c03ee6369281177f07f7c68252a280beccba847", - "reference": "5c03ee6369281177f07f7c68252a280beccba847", + "url": "https://api.github.com/repos/symfony/process/zipball/3f94e5f13ff58df371a7ead461b6e8068900fbb3", + "reference": "3f94e5f13ff58df371a7ead461b6e8068900fbb3", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -7109,7 +6538,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.5" + "source": "https://github.com/symfony/process/tree/v6.4.12" }, "funding": [ { @@ -7125,24 +6554,24 @@ "type": "tidelift" } ], - "time": "2024-09-19T21:48:23+00:00" + "time": "2024-09-17T12:47:12+00:00" }, { "name": "symfony/stopwatch", - "version": "v7.1.1", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d" + "reference": "63e069eb616049632cde9674c46957819454b8aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", - "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/63e069eb616049632cde9674c46957819454b8aa", + "reference": "63e069eb616049632cde9674c46957819454b8aa", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "symfony/service-contracts": "^2.5|^3" }, "type": "library", @@ -7171,7 +6600,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.1.1" + "source": "https://github.com/symfony/stopwatch/tree/v6.4.8" }, "funding": [ { @@ -7187,36 +6616,38 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/var-dumper", - "version": "v7.1.5", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "e20e03889539fd4e4211e14d2179226c513c010d" + "reference": "ee14c8254a480913268b1e3b1cba8045ed122694" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e20e03889539fd4e4211e14d2179226c513c010d", - "reference": "e20e03889539fd4e4211e14d2179226c513c010d", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ee14c8254a480913268b1e3b1cba8045ed122694", + "reference": "ee14c8254a480913268b1e3b1cba8045ed122694", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/console": "<6.4" + "symfony/console": "<5.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/uid": "^6.4|^7.0", - "twig/twig": "^3.0.4" + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^6.3|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/uid": "^5.4|^6.0|^7.0", + "twig/twig": "^2.13|^3.0.4" }, "bin": [ "Resources/bin/var-dump-server" @@ -7254,7 +6685,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.1.5" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.11" }, "funding": [ { @@ -7270,7 +6701,7 @@ "type": "tidelift" } ], - "time": "2024-09-16T10:07:02+00:00" + "time": "2024-08-30T16:03:21+00:00" }, { "name": "thecodingmachine/safe", diff --git a/tests/SPC/builder/BuilderTest.php b/tests/SPC/builder/BuilderTest.php index f61eba0e..4c55591c 100644 --- a/tests/SPC/builder/BuilderTest.php +++ b/tests/SPC/builder/BuilderTest.php @@ -166,7 +166,9 @@ class BuilderTest extends TestCase ]; } - #[DataProvider('providerGetBuildTypeName')] + /** + * @dataProvider providerGetBuildTypeName + */ public function testGetBuildTypeName(int $target, string $name): void { $this->assertEquals($name, $this->builder->getBuildTypeName($target)); @@ -228,7 +230,9 @@ class BuilderTest extends TestCase ]; } - #[DataProvider('providerEmitPatchPoint')] + /** + * @dataProvider providerEmitPatchPoint + */ public function testEmitPatchPoint(string $point) { $code = ' Date: Thu, 3 Oct 2024 15:25:44 +0800 Subject: [PATCH 023/101] Fix linux concurrency build --- config/env.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/env.ini b/config/env.ini index e6ee7180..17b44d90 100644 --- a/config/env.ini +++ b/config/env.ini @@ -39,7 +39,7 @@ [global] -; Build concurrency for make -jN, default is CPU_COUNT, this value are used in every lib and php builds. +; Build concurrency for make -jN, default is CPU_COUNT, this value are used in every libs. SPC_CONCURRENCY=${CPU_COUNT} ; Ignore PHP version check before building some extensions SPC_SKIP_PHP_VERSION_CHECK="no" @@ -78,7 +78,7 @@ SPC_CMD_PREFIX_PHP_BUILDCONF="./buildconf --force" ; configure command SPC_CMD_PREFIX_PHP_CONFIGURE="${SPC_PHP_DEFAULT_LD_LIBRARY_PATH_CMD} ./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg" ; make command -SPC_CMD_PREFIX_PHP_MAKE="make -j${SPC_CONCURRENCY}" +SPC_CMD_PREFIX_PHP_MAKE="make -j${CPU_COUNT}" ; *** default build vars for building php *** ; CFLAGS for configuring php From 67a31ef4fa756bdc056786613d171e866fa6f949 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 3 Oct 2024 15:36:59 +0800 Subject: [PATCH 024/101] Add full tests --- src/globals/test-extensions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 7871d623..eb244988 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -11,15 +11,15 @@ declare(strict_types=1); // --------------------------------- edit area --------------------------------- -$test_php_version = ['8.3']; +$test_php_version = ['8.0', '8.1', '8.2', '8.3']; -$test_os = ['macos-14', 'ubuntu-latest']; +$test_os = ['macos-14', 'ubuntu-latest', 'macos-13', 'windows-latest']; -$zts = false; +$zts = true; $no_strip = false; -$upx = true; +$upx = false; $prefer_pre_built = true; From d93c8fcb450bed2314eaaacda3570add020cc8b0 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 3 Oct 2024 15:38:50 +0800 Subject: [PATCH 025/101] Add full tests --- src/globals/test-extensions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index eb244988..fd23a2d5 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -26,7 +26,7 @@ $prefer_pre_built = true; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { 'Linux', 'Darwin' => '', - 'Windows' => '', + 'Windows' => 'bcmath', }; // If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`). From 85df4731d16f848d143e9c0bb040e9eb1f07708a Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 4 Oct 2024 15:48:12 +0800 Subject: [PATCH 026/101] Fix tests CI --- .github/workflows/tests.yml | 16 +++--------- src/globals/test-extensions.php | 43 +++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b8ee2ebc..7b2e65ae 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -193,18 +193,8 @@ jobs: - name: "Run Build Tests (download)" 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 $(php src/globals/test-extensions.php prefer_pre_built) + bin/spc $(php src/globals/test-extensions.php download_cmd ${{ matrix.os }} ${{ matrix.php }}) - - name: "Download pre-built libraries for pkg-config" - if: matrix.os != 'windows-latest' + - name: "Run Build Tests (build)" run: | - bin/spc del-download pkg-config - bin/spc download pkg-config --prefer-pre-built --debug - - - name: "Run Build Tests (build, *nix)" - if: matrix.os != 'windows-latest' - run: bin/spc build "$(php src/globals/test-extensions.php extensions)" $(php src/globals/test-extensions.php zts) $(php src/globals/test-extensions.php no_strip) $UPX_CMD --with-libs="$(php src/globals/test-extensions.php libs)" --build-cli --build-micro --build-fpm --debug - - - name: "Run Build Tests (build, windows)" - if: matrix.os == 'windows-latest' - run: bin/spc build "$(php src/globals/test-extensions.php extensions)" $(php src/globals/test-extensions.php zts) $(php src/globals/test-extensions.php no_strip) $env:UPX_CMD --with-libs="$(php src/globals/test-extensions.php libs)" --build-cli --build-micro --debug \ No newline at end of file + bin/spc $(php src/globals/test-extensions.php build_cmd ${{ matrix.os }} ${{ matrix.php }}) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index fd23a2d5..a80db4c6 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -11,16 +11,31 @@ declare(strict_types=1); // --------------------------------- edit area --------------------------------- -$test_php_version = ['8.0', '8.1', '8.2', '8.3']; +// test php version +$test_php_version = [ + '8.0', + // '8.1', + // '8.2', + '8.3', +]; -$test_os = ['macos-14', 'ubuntu-latest', 'macos-13', 'windows-latest']; +// test os (macos-13, macos-14, ubuntu-latest, windows-latest are available) +$test_os = [ + 'macos-14', + 'ubuntu-latest', + 'macos-13', + 'windows-latest', +]; +// whether enable thread safe $zts = true; $no_strip = false; +// compress with upx $upx = false; +// prefer downloading pre-built packages to speed up the build process $prefer_pre_built = true; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). @@ -78,6 +93,28 @@ if (PHP_OS_FAMILY === 'Windows') { $final_extensions_cmd = $final_extensions; } +// generate download command +$down_cmd = 'download '; +$down_cmd .= '--for-extensions="' . $final_extensions . '" '; +$down_cmd .= '--for-libs="' . $final_libs . '" '; +$down_cmd .= '--with-php="' . $argv[3] . '" '; +$down_cmd .= '--ignore-cache-sources=php-src '; +$down_cmd .= '--debug '; +$down_cmd .= '--retry=5 '; +$down_cmd .= '--shallow-clone '; +$down_cmd .= $prefer_pre_built ? '--prefer-pre-built ' : ''; + +// generate build command +$build_cmd = 'build '; +$build_cmd .= '"' . $final_extensions . '" '; +$build_cmd .= $zts ? '--enable-zts ' : ''; +$build_cmd .= $no_strip ? '--no-strip ' : ''; +$build_cmd .= $upx ? '--with-upx-pack ' : ''; +$build_cmd .= $final_libs === '' ? '' : ('--with-libs="' . $final_libs . '" '); +$build_cmd .= '--build-cli --build-micro '; +$build_cmd .= str_starts_with($argv[2], 'windows-') ? '' : '--build-fpm '; +$build_cmd .= '--debug '; + echo match ($argv[1]) { 'os' => json_encode($test_os), 'php' => json_encode($test_php_version), @@ -89,5 +126,7 @@ echo match ($argv[1]) { 'no_strip' => $no_strip ? '--no-strip' : '', 'upx' => $upx ? '--with-upx-pack' : '', 'prefer_pre_built' => $prefer_pre_built ? '--prefer-pre-built' : '', + 'download_cmd' => $down_cmd, + 'build_cmd' => $build_cmd, default => '', }; From 7facbc7a08557d0a8d7b3f82ee3a685426d12aba Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 4 Oct 2024 15:49:57 +0800 Subject: [PATCH 027/101] Fix tests CI --- src/globals/test-extensions.php | 40 ++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index a80db4c6..74bd76cf 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -94,26 +94,30 @@ if (PHP_OS_FAMILY === 'Windows') { } // generate download command -$down_cmd = 'download '; -$down_cmd .= '--for-extensions="' . $final_extensions . '" '; -$down_cmd .= '--for-libs="' . $final_libs . '" '; -$down_cmd .= '--with-php="' . $argv[3] . '" '; -$down_cmd .= '--ignore-cache-sources=php-src '; -$down_cmd .= '--debug '; -$down_cmd .= '--retry=5 '; -$down_cmd .= '--shallow-clone '; -$down_cmd .= $prefer_pre_built ? '--prefer-pre-built ' : ''; +if ($argv[1] === 'download_cmd') { + $down_cmd = 'download '; + $down_cmd .= '--for-extensions="' . $final_extensions . '" '; + $down_cmd .= '--for-libs="' . $final_libs . '" '; + $down_cmd .= '--with-php="' . $argv[3] . '" '; + $down_cmd .= '--ignore-cache-sources=php-src '; + $down_cmd .= '--debug '; + $down_cmd .= '--retry=5 '; + $down_cmd .= '--shallow-clone '; + $down_cmd .= $prefer_pre_built ? '--prefer-pre-built ' : ''; +} // generate build command -$build_cmd = 'build '; -$build_cmd .= '"' . $final_extensions . '" '; -$build_cmd .= $zts ? '--enable-zts ' : ''; -$build_cmd .= $no_strip ? '--no-strip ' : ''; -$build_cmd .= $upx ? '--with-upx-pack ' : ''; -$build_cmd .= $final_libs === '' ? '' : ('--with-libs="' . $final_libs . '" '); -$build_cmd .= '--build-cli --build-micro '; -$build_cmd .= str_starts_with($argv[2], 'windows-') ? '' : '--build-fpm '; -$build_cmd .= '--debug '; +if ($argv[1] === 'build_cmd') { + $build_cmd = 'build '; + $build_cmd .= '"' . $final_extensions . '" '; + $build_cmd .= $zts ? '--enable-zts ' : ''; + $build_cmd .= $no_strip ? '--no-strip ' : ''; + $build_cmd .= $upx ? '--with-upx-pack ' : ''; + $build_cmd .= $final_libs === '' ? '' : ('--with-libs="' . $final_libs . '" '); + $build_cmd .= '--build-cli --build-micro '; + $build_cmd .= str_starts_with($argv[2], 'windows-') ? '' : '--build-fpm '; + $build_cmd .= '--debug '; +} echo match ($argv[1]) { 'os' => json_encode($test_os), From bc2fe576a77eafe9fe0e185528c8765fe519fd12 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 4 Oct 2024 15:54:13 +0800 Subject: [PATCH 028/101] Fix tests CI quotes --- src/globals/test-extensions.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 74bd76cf..fa377325 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -93,12 +93,21 @@ if (PHP_OS_FAMILY === 'Windows') { $final_extensions_cmd = $final_extensions; } +function quote2(string $param): string +{ + global $argv; + if (str_starts_with($argv[2], 'windows-')) { + return '"' . $param . '"'; + } + return $param; +} + // generate download command if ($argv[1] === 'download_cmd') { $down_cmd = 'download '; - $down_cmd .= '--for-extensions="' . $final_extensions . '" '; - $down_cmd .= '--for-libs="' . $final_libs . '" '; - $down_cmd .= '--with-php="' . $argv[3] . '" '; + $down_cmd .= '--for-extensions=' . quote2($final_extensions) . ' '; + $down_cmd .= '--for-libs=' . quote2($final_libs) . ' '; + $down_cmd .= '--with-php=' . quote2($argv[3]) . ' '; $down_cmd .= '--ignore-cache-sources=php-src '; $down_cmd .= '--debug '; $down_cmd .= '--retry=5 '; @@ -109,11 +118,11 @@ if ($argv[1] === 'download_cmd') { // generate build command if ($argv[1] === 'build_cmd') { $build_cmd = 'build '; - $build_cmd .= '"' . $final_extensions . '" '; + $build_cmd .= quote2($final_extensions) . ' '; $build_cmd .= $zts ? '--enable-zts ' : ''; $build_cmd .= $no_strip ? '--no-strip ' : ''; $build_cmd .= $upx ? '--with-upx-pack ' : ''; - $build_cmd .= $final_libs === '' ? '' : ('--with-libs="' . $final_libs . '" '); + $build_cmd .= $final_libs === '' ? '' : ('--with-libs=' . quote2($final_libs) . ' '); $build_cmd .= '--build-cli --build-micro '; $build_cmd .= str_starts_with($argv[2], 'windows-') ? '' : '--build-fpm '; $build_cmd .= '--debug '; From 09c36844e681dabaa232f1959560a8384cfa3a30 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 4 Oct 2024 16:04:13 +0800 Subject: [PATCH 029/101] Eval --- .github/workflows/tests.yml | 6 ++---- src/globals/test-extensions.php | 8 ++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7b2e65ae..3a24ad76 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -192,9 +192,7 @@ jobs: echo "UPX_CMD=$(php src/globals/test-extensions.php upx)" >> $GITHUB_ENV - name: "Run Build Tests (download)" - run: | - bin/spc $(php src/globals/test-extensions.php download_cmd ${{ matrix.os }} ${{ matrix.php }}) + run: php src/globals/test-extensions.php download_cmd ${{ matrix.os }} ${{ matrix.php }} - name: "Run Build Tests (build)" - run: | - bin/spc $(php src/globals/test-extensions.php build_cmd ${{ matrix.os }} ${{ matrix.php }}) + run: php src/globals/test-extensions.php build_cmd ${{ matrix.os }} ${{ matrix.php }} diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index fa377325..4e54a328 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -143,3 +143,11 @@ echo match ($argv[1]) { 'build_cmd' => $build_cmd, default => '', }; + +if ($argv[1] === 'download_cmd' || $argv[1] === 'build_cmd') { + if (str_starts_with($argv[2], 'windows-')) { + passthru('powershell.exe -file .\bin\spc.ps1 ' . $down_cmd); + } else { + passthru('./bin/spc ' . $down_cmd); + } +} \ No newline at end of file From 850e6afbd080082c44f195ed94fc3f292a45c3d3 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 4 Oct 2024 16:06:46 +0800 Subject: [PATCH 030/101] Eval --- src/globals/test-extensions.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 4e54a328..db44860c 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -144,10 +144,16 @@ echo match ($argv[1]) { default => '', }; -if ($argv[1] === 'download_cmd' || $argv[1] === 'build_cmd') { +if ($argv[1] === 'download_cmd') { if (str_starts_with($argv[2], 'windows-')) { passthru('powershell.exe -file .\bin\spc.ps1 ' . $down_cmd); } else { passthru('./bin/spc ' . $down_cmd); } -} \ No newline at end of file +} elseif ($argv[1] === 'build_cmd') { + if (str_starts_with($argv[2], 'windows-')) { + passthru('powershell.exe -file .\bin\spc.ps1 ' . $build_cmd); + } else { + passthru('./bin/spc ' . $build_cmd); + } +} From 7d56822e919d9e42aa203cf83f6b06da9f3eb8c9 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 4 Oct 2024 16:46:32 +0800 Subject: [PATCH 031/101] Final tests --- src/globals/test-extensions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index db44860c..60d16ae0 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -14,8 +14,8 @@ declare(strict_types=1); // test php version $test_php_version = [ '8.0', - // '8.1', - // '8.2', + '8.1', + '8.2', '8.3', ]; @@ -28,7 +28,7 @@ $test_os = [ ]; // whether enable thread safe -$zts = true; +$zts = false; $no_strip = false; @@ -41,7 +41,7 @@ $prefer_pre_built = true; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { 'Linux', 'Darwin' => '', - 'Windows' => 'bcmath', + 'Windows' => 'amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,exif,ffi,fileinfo,filter,ftp,gd,iconv,igbinary,libxml,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_sqlite,pdo_sqlsrv,phar,rar,redis,session,shmop,simdjson,simplexml,soap,sockets,sqlite3,sqlsrv,ssh2,swow,sysvshm,tokenizer,xml,xmlreader,xmlwriter,yac,yaml,zip,zlib', }; // If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`). @@ -54,7 +54,7 @@ $with_libs = match (PHP_OS_FAMILY) { // You can use `common`, `bulk`, `minimal` or `none`. // note: combination is only available for *nix platform. Windows must use `none` combination $base_combination = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'common', + 'Linux', 'Darwin' => 'bulk', 'Windows' => 'none', }; From ecb17cc4c9b067eed43cb3eeb97e2a673e05d476 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 4 Oct 2024 16:53:24 +0800 Subject: [PATCH 032/101] Final tests --- src/globals/test-extensions.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 60d16ae0..4154b93d 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -146,14 +146,16 @@ echo match ($argv[1]) { if ($argv[1] === 'download_cmd') { if (str_starts_with($argv[2], 'windows-')) { - passthru('powershell.exe -file .\bin\spc.ps1 ' . $down_cmd); + passthru('powershell.exe -file .\bin\spc.ps1 ' . $down_cmd, $retcode); } else { - passthru('./bin/spc ' . $down_cmd); + passthru('./bin/spc ' . $down_cmd, $retcode); } } elseif ($argv[1] === 'build_cmd') { if (str_starts_with($argv[2], 'windows-')) { - passthru('powershell.exe -file .\bin\spc.ps1 ' . $build_cmd); + passthru('powershell.exe -file .\bin\spc.ps1 ' . $build_cmd, $retcode); } else { - passthru('./bin/spc ' . $build_cmd); + passthru('./bin/spc ' . $build_cmd, $retcode); } } + +exit($retcode); From c09bf1e8787490baacd4bdb5f78d9cb3b8001b07 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 4 Oct 2024 17:19:38 +0800 Subject: [PATCH 033/101] Adjust caches --- .github/workflows/tests.yml | 2 +- src/SPC/store/CurlHook.php | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3a24ad76..0ed808e0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -171,7 +171,7 @@ jobs: uses: actions/cache@v4 with: path: downloads - key: php-${{ matrix.php }}-dependencies + key: php-dependencies-${{ matrix.os }} - name: "Install Dependencies" run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist diff --git a/src/SPC/store/CurlHook.php b/src/SPC/store/CurlHook.php index ce27cf3d..48e2b0c4 100644 --- a/src/SPC/store/CurlHook.php +++ b/src/SPC/store/CurlHook.php @@ -20,11 +20,17 @@ class CurlHook } if (getenv('GITHUB_USER')) { $auth = base64_encode(getenv('GITHUB_USER') . ':' . getenv('GITHUB_TOKEN')); - $headers[] = "Authorization: Basic {$auth}"; + $he = "Authorization: Basic {$auth}"; + if (!in_array($he, $headers)) { + $headers[] = $he; + } logger()->info("using basic github token for {$method} {$url}"); } else { $auth = getenv('GITHUB_TOKEN'); - $headers[] = "Authorization: Bearer {$auth}"; + $he = "Authorization: Bearer {$auth}"; + if (!in_array($he, $headers)) { + $headers[] = $he; + } logger()->info("using bearer github token for {$method} {$url}"); } } From 83ab430b9a077d9bd974e37a60e3fc356c7633b5 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 4 Oct 2024 18:20:25 +0800 Subject: [PATCH 034/101] Adjust windows build CI --- .github/workflows/tests.yml | 2 ++ bin/setup-runtime.ps1 | 4 ++-- config/env.ini | 4 ++-- src/globals/defines.php | 2 ++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0ed808e0..bfec641b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -156,6 +156,8 @@ jobs: tools: pecl, composer extensions: curl, openssl, mbstring ini-values: memory_limit=-1 + env: + phpts: nts - name: "Cache composer packages" id: composer-cache diff --git a/bin/setup-runtime.ps1 b/bin/setup-runtime.ps1 index e9c152dd..d2b5c021 100644 --- a/bin/setup-runtime.ps1 +++ b/bin/setup-runtime.ps1 @@ -51,10 +51,10 @@ if ($action -eq 'add-path') { } # get php 8.1 specific version -$API = (Invoke-WebRequest -Uri "https://www.php.net/releases/index.php?json&version=8.1") | ConvertFrom-Json +$API = (Invoke-WebRequest -Uri "https://www.php.net/releases/index.php?json&version=8.3") | ConvertFrom-Json # php windows download -$PHPRuntimeUrl = "https://windows.php.net/downloads/releases/php-" + $API.version + "-Win32-vs16-x64.zip" +$PHPRuntimeUrl = "https://windows.php.net/downloads/releases/php-" + $API.version + "-nts-Win32-vs16-x64.zip" $ComposerUrl = "https://getcomposer.org/download/latest-stable/composer.phar" # create dir diff --git a/config/env.ini b/config/env.ini index 17b44d90..948521dd 100644 --- a/config/env.ini +++ b/config/env.ini @@ -48,9 +48,9 @@ SPC_SKIP_DOCTOR_CHECK_ITEMS="" [windows] ; php-sdk-binary-tools path -PHP_SDK_PATH=${WORKING_DIR}\php-sdk-binary-tools +PHP_SDK_PATH="${WORKING_DIR}\php-sdk-binary-tools" ; upx executable path -UPX_EXEC=${PKG_ROOT_PATH}\bin\upx.exe +UPX_EXEC="${PKG_ROOT_PATH}\bin\upx.exe" ; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime140,win32,zend_stream,cli_static diff --git a/src/globals/defines.php b/src/globals/defines.php index c6b12737..956e5a9b 100644 --- a/src/globals/defines.php +++ b/src/globals/defines.php @@ -6,6 +6,8 @@ use ZM\Logger\ConsoleLogger; define('WORKING_DIR', getcwd()); define('ROOT_DIR', dirname(__DIR__, 2)); +putenv('WORKING_DIR=' . WORKING_DIR); +putenv('ROOT_DIR=' . ROOT_DIR); // CLI start time define('START_TIME', microtime(true)); From d6bea6295eed0e95e16046014372092db0c3a088 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 5 Oct 2024 09:57:39 +0800 Subject: [PATCH 035/101] Add sanity check for pack:libs --- src/SPC/command/dev/PackLibCommand.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/SPC/command/dev/PackLibCommand.php b/src/SPC/command/dev/PackLibCommand.php index f97eaabd..18e02fda 100644 --- a/src/SPC/command/dev/PackLibCommand.php +++ b/src/SPC/command/dev/PackLibCommand.php @@ -5,8 +5,12 @@ declare(strict_types=1); namespace SPC\command\dev; use SPC\builder\BuilderProvider; +use SPC\builder\LibraryBase; use SPC\command\BuildCommand; use SPC\exception\ExceptionHandler; +use SPC\exception\FileSystemException; +use SPC\exception\RuntimeException; +use SPC\exception\WrongUsageException; use SPC\store\Config; use SPC\store\FileSystem; use SPC\util\DependencyUtil; @@ -53,6 +57,8 @@ class PackLibCommand extends BuildCommand $lib->tryBuild(true); // do something like patching pkg-conf files. $lib->beforePack(); + // sanity check for libs (check if the libraries are built correctly) + $this->sanityCheckLib($lib); // After build: load buildroot/ directory, and calculate increase files $after_buildroot = FileSystem::scanDirFiles(BUILD_ROOT_PATH, relative: true); $increase_files = array_diff($after_buildroot, $before_buildroot); @@ -82,4 +88,20 @@ class PackLibCommand extends BuildCommand return static::FAILURE; } } + + /** + * @throws WrongUsageException + * @throws RuntimeException + * @throws FileSystemException + */ + private function sanityCheckLib(LibraryBase $lib): void + { + logger()->info('Sanity check for library ' . $lib->getName()); + // config + foreach ($lib->getStaticLibs() as $static_lib) { + if (!file_exists(FileSystem::convertPath(BUILD_LIB_PATH . '/' . $static_lib))) { + throw new RuntimeException('Static library ' . $static_lib . ' not found in ' . BUILD_LIB_PATH); + } + } + } } From 948b55026c08b53c4e620a031829e20f7f87f111 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 5 Oct 2024 09:57:48 +0800 Subject: [PATCH 036/101] Fix getPHPVersionID test --- tests/SPC/builder/BuilderTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/SPC/builder/BuilderTest.php b/tests/SPC/builder/BuilderTest.php index 4c55591c..3dbdc845 100644 --- a/tests/SPC/builder/BuilderTest.php +++ b/tests/SPC/builder/BuilderTest.php @@ -85,7 +85,7 @@ class BuilderTest extends TestCase { if (file_exists(SOURCE_PATH . '/php-src/main/php_version.h')) { $file = SOURCE_PATH . '/php-src/main/php_version.h'; - $cnt = preg_match('/PHP_VERSION_ID (\d+)/', $file, $match); + $cnt = preg_match('/PHP_VERSION_ID (\d+)/m', file_get_contents($file), $match); if ($cnt !== 0) { $this->assertEquals(intval($match[1]), $this->builder->getPHPVersionID()); } else { From 357dfc53c99be01330a32861f0597865bd7e19e5 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 5 Oct 2024 10:52:53 +0800 Subject: [PATCH 037/101] Add full Downloader tests --- src/SPC/store/Downloader.php | 4 ++ tests/SPC/store/DownloaderTest.php | 90 ++++++++++++++++++++++++++---- tests/mock/SPC_store.php | 47 +++++++++++++++- 3 files changed, 127 insertions(+), 14 deletions(-) diff --git a/src/SPC/store/Downloader.php b/src/SPC/store/Downloader.php index 363fe344..f01519bf 100644 --- a/src/SPC/store/Downloader.php +++ b/src/SPC/store/Downloader.php @@ -182,6 +182,7 @@ class Downloader * * @throws FileSystemException * @throws RuntimeException + * @throws WrongUsageException */ public static function downloadFile(string $name, string $url, string $filename, ?string $move_path = null, int $lock_as = SPC_LOCK_SOURCE): void { @@ -220,6 +221,7 @@ class Downloader * * @throws FileSystemException * @throws RuntimeException + * @throws WrongUsageException */ public static function downloadGit(string $name, string $url, string $branch, ?string $move_path = null, int $retry = 0, int $lock_as = SPC_LOCK_SOURCE): void { @@ -381,6 +383,7 @@ class Downloader * @param int $lock_as Lock source type (default: SPC_LOCK_SOURCE) * @throws DownloaderException * @throws FileSystemException + * @throws WrongUsageException */ public static function downloadSource(string $name, ?array $source = null, bool $force = false, int $lock_as = SPC_LOCK_SOURCE): void { @@ -539,6 +542,7 @@ class Downloader * Use curl to download sources from url * * @throws RuntimeException + * @throws WrongUsageException */ public static function curlDown(string $url, string $path, string $method = 'GET', array $headers = [], array $hooks = [], int $retry = 0): void { diff --git a/tests/SPC/store/DownloaderTest.php b/tests/SPC/store/DownloaderTest.php index ff6af17e..6fc11cf1 100644 --- a/tests/SPC/store/DownloaderTest.php +++ b/tests/SPC/store/DownloaderTest.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace SPC\Tests\store; use PHPUnit\Framework\TestCase; +use SPC\exception\WrongUsageException; use SPC\store\Downloader; /** @@ -24,23 +25,88 @@ class DownloaderTest extends TestCase ); } - public function testDownloadGit() {} + public function testDownloadGit() + { + Downloader::downloadGit('setup-static-php', 'https://github.com/static-php/setup-static-php.git', 'main'); + $this->assertTrue(true); - public function testDownloadFile() {} + // test keyboard interrupt + try { + Downloader::downloadGit('setup-static-php', 'https://github.com/static-php/setup-static-php.git', 'SIGINT'); + } catch (WrongUsageException $e) { + $this->assertStringContainsString('interrupted', $e->getMessage()); + return; + } + $this->fail('Expected exception not thrown'); + } - public function testLockSource() {} + public function testDownloadFile() + { + Downloader::downloadFile('fake-file', 'https://fakecmd.com/curlDown', 'curlDown.exe'); + $this->assertTrue(true); - public function testGetLatestBitbucketTag() {} + // test keyboard interrupt + try { + Downloader::downloadFile('fake-file', 'https://fakecmd.com/curlDown', 'SIGINT'); + } catch (WrongUsageException $e) { + $this->assertStringContainsString('interrupted', $e->getMessage()); + return; + } + $this->fail('Expected exception not thrown'); + } - public function testGetLatestGithubRelease() {} + public function testLockSource() + { + Downloader::lockSource('fake-file', ['source_type' => 'archive', 'filename' => 'fake-file-name', 'move_path' => 'fake-path', 'lock_as' => 'fake-lock-as']); + $this->assertFileExists(DOWNLOAD_PATH . '/.lock.json'); + $json = json_decode(file_get_contents(DOWNLOAD_PATH . '/.lock.json'), true); + $this->assertIsArray($json); + $this->assertArrayHasKey('fake-file', $json); + $this->assertArrayHasKey('source_type', $json['fake-file']); + $this->assertArrayHasKey('filename', $json['fake-file']); + $this->assertArrayHasKey('move_path', $json['fake-file']); + $this->assertArrayHasKey('lock_as', $json['fake-file']); + $this->assertEquals('archive', $json['fake-file']['source_type']); + $this->assertEquals('fake-file-name', $json['fake-file']['filename']); + $this->assertEquals('fake-path', $json['fake-file']['move_path']); + $this->assertEquals('fake-lock-as', $json['fake-file']['lock_as']); + } - public function testCurlExec() {} + public function testGetLatestBitbucketTag() + { + $this->assertEquals( + 'abc.tar.gz', + Downloader::getLatestBitbucketTag('abc', [ + 'repo' => 'MATCHED/def', + ])[1] + ); + $this->assertEquals( + 'abc-1.0.0.tar.gz', + Downloader::getLatestBitbucketTag('abc', [ + 'repo' => 'abc/def', + ])[1] + ); + } - public function testCurlDown() {} + public function testGetLatestGithubRelease() + { + $this->assertEquals( + 'ghreltest.tar.gz', + Downloader::getLatestGithubRelease('ghrel', [ + 'type' => 'ghrel', + 'repo' => 'ghreltest/ghrel', + 'match' => 'ghreltest.tar.gz', + ])[1] + ); + } - public function testDownloadSource() {} - - public function testGetFromFileList() {} - - public function testDownloadPackage() {} + public function testGetFromFileList() + { + $filelist = Downloader::getFromFileList('fake-filelist', [ + 'url' => 'https://fakecmd.com/filelist', + 'regex' => '/href="(?filelist-(?[^"]+)\\.tar\\.xz)"/', + ]); + $this->assertIsArray($filelist); + $this->assertEquals('filelist-4.7.0.tar.xz', $filelist[1]); + } } diff --git a/tests/mock/SPC_store.php b/tests/mock/SPC_store.php index 18d495c3..6969e128 100644 --- a/tests/mock/SPC_store.php +++ b/tests/mock/SPC_store.php @@ -6,19 +6,62 @@ declare(strict_types=1); namespace SPC\store; +use SPC\exception\RuntimeException; + function f_exec(string $command, mixed &$output, mixed &$result_code): bool { + $result_code = 0; if (str_contains($command, 'https://api.github.com/repos/AOMediaCodec/libavif/releases')) { $output = explode("\n", gzdecode(file_get_contents(__DIR__ . '/../assets/github_api_AOMediaCodec_libavif_releases.json.gz'))); - $result_code = 0; return true; } if (str_contains($command, 'https://api.github.com/repos/AOMediaCodec/libavif/tarball/v1.1.1')) { $output = explode("\n", "HTTP/1.1 200 OK\r\nContent-Disposition: attachment; filename=AOMediaCodec-libavif-v1.1.1-0-gbb24db0.tar.gz\r\n\r\n"); - $result_code = 0; + return true; + } + if (str_contains($command, 'https://api.bitbucket.org/2.0/repositories/')) { + $output = explode("\n", json_encode(['values' => [['name' => '1.0.0']], 'tag_name' => '1.0.0'])); + return true; + } + if (str_contains($command, 'https://bitbucket.org/')) { + $output = explode("\n", str_contains($command, 'MATCHED') ? "HTTP/2 200 OK\r\ncontent-disposition: attachment; filename=abc.tar.gz\r\n\r\n" : "HTTP/2 200 OK\r\n\r\n"); + return true; + } + if (str_contains($command, 'ghreltest/ghrel')) { + $output = explode("\n", json_encode([[ + 'prerelease' => false, + 'assets' => [ + [ + 'name' => 'ghreltest.tar.gz', + 'browser_download_url' => 'https://fakecmd.com/ghreltest.tar.gz', + ], + ], + ]])); + return true; + } + if (str_contains($command, 'filelist')) { + $output = explode("\n", gzdecode(file_get_contents(__DIR__ . '/../assets/filelist.gz'))); return true; } $result_code = -2; $output = null; return false; } + +function f_passthru(string $cmd): bool +{ + if (str_starts_with($cmd, 'git')) { + if (str_contains($cmd, '--branch "SIGINT"')) { + throw new RuntimeException('Interrupt', 2); + } + return true; + } + if (str_contains($cmd, 'https://fakecmd.com/curlDown')) { + if (str_contains($cmd, 'SIGINT')) { + throw new RuntimeException('Interrupt', 2); + } + return true; + } + + throw new RuntimeException('Invalid tests'); +} From 648c43cc7f2b98f90d1b5d99d278a1175e93ea1e Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 5 Oct 2024 10:55:53 +0800 Subject: [PATCH 038/101] Add allowed commands --- tests/mock/SPC_store.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/mock/SPC_store.php b/tests/mock/SPC_store.php index 6969e128..9ee59093 100644 --- a/tests/mock/SPC_store.php +++ b/tests/mock/SPC_store.php @@ -63,5 +63,13 @@ function f_passthru(string $cmd): bool return true; } + // allowed commands + $allowed = ['cp', 'copy', 'xcopy']; + foreach ($allowed as $a) { + if (str_starts_with($cmd, $a)) { + \f_passthru($cmd); + return true; + } + } throw new RuntimeException('Invalid tests'); } From 566f6980cae4cbfced5c8cb2c7d447dd69c0e96f Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 5 Oct 2024 10:56:15 +0800 Subject: [PATCH 039/101] cs-fix --- tests/SPC/store/DownloaderTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/SPC/store/DownloaderTest.php b/tests/SPC/store/DownloaderTest.php index 6fc11cf1..a9507e08 100644 --- a/tests/SPC/store/DownloaderTest.php +++ b/tests/SPC/store/DownloaderTest.php @@ -104,7 +104,7 @@ class DownloaderTest extends TestCase { $filelist = Downloader::getFromFileList('fake-filelist', [ 'url' => 'https://fakecmd.com/filelist', - 'regex' => '/href="(?filelist-(?[^"]+)\\.tar\\.xz)"/', + 'regex' => '/href="(?filelist-(?[^"]+)\.tar\.xz)"/', ]); $this->assertIsArray($filelist); $this->assertEquals('filelist-4.7.0.tar.xz', $filelist[1]); From 774919e03cbd7a6f31fb64935c44cda3c4f2cf45 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 5 Oct 2024 11:09:15 +0800 Subject: [PATCH 040/101] Add missing filelist --- tests/assets/filelist.gz | Bin 0 -> 2375 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/assets/filelist.gz diff --git a/tests/assets/filelist.gz b/tests/assets/filelist.gz new file mode 100644 index 0000000000000000000000000000000000000000..fb566ebf7cea669b993f6bccd2e0dd962e150dde GIT binary patch literal 2375 zcmZ9LdpHvcAIBFmbYfeElF8hq9ExP_rm>Jq(vFgMv)l+$@#qu!8xuaaVxBkSl-GL8O>JL`_}GJjRM7Q-8iWBpk) zdWI#$DJS0X@SBgdUAMJ~XEC^Km8u1+MBfSv+Qm9c1OibR#7p>PtFFjxmL_~kx4WOX zakTi<2bMd}ZZV2(08)j>@)a%x|T`a*XlO79hQwAz}(@YjyHUR8w zhdzGZPpcH5U5;hBG{XZT!#_L`wg1%d32!YC1=m{ZVe~`_@>LLRS}itcd%pxa&DRXIbk|k;COH;EjuIeT!nST z*Rfe$kdjL^uxjW!wpuA3cpkWa9H#`R2429$fa0k)oV-74887E*v7_z7#duIi5*PL! zr?jK`=Hco?n$@>&(fe$7j~;p*D6!tl?)KReVq=!lU5%dmDC4H}XkVdL3jW>XfGGj> zRyl$HN;Ie;gT6vvwLPoqCD>K3#|miSGcbIQ4o2T9Z;}0KCyywdq#*mSsctfB zHEZN&)<{2bqtRW86D^Iem+y==eN#B)$yWDZOMs!3;n0#fAP`N^KRQ#K9w#!tW-H~0 zocIXp(6xq35$0|;O&(4@Kc03#dIY@lA7Mn*()1$NMZ(2OxH22(!{eLa-u!m*$V;=Q zlHgiNFnnuFYr8w1XJ3nw<;xejt+-DjsuzPewghP9@7v+oG zySar_tsZQFQ5h6tZ!ji3!^NKX63)EnjE{qYxzW8B#8vJhUoghQnM9ToLSSGm3;Iqi zXr9m)X{`;JY@)~!P~Olykow<+W#5C8n$MKQ`yvN0U`zv?=?Kk}lb=~IxJ53c8r^ae z!`Sn8H=>hstGgeeLhAN~{Pp(IViX{4?uUVjhrgdQaNqWp-)+`*j4QlhgU&2G1@G4I zvbRC+;(0yL$@+`-lgR5tH|@C$&`jmVqJg%^ONt_yStflKx#pdY4DG zOc2WDR9nc$kDT9iNVm7jcDgQJHq-GGr&w7Aub;5BA9MJO*cH7Pc6L(b@0xUMj5}4? z3gg|tfwV>6?efVn<9;f7??%m5dT_2;8~#SN<^YNLD7HX18=QU_iXL!F~UII$=x4$>N^V$hd14rGr)gmF;M9d z+bpp``Zrbwt?WCi78cn2>*(Q}X1)Ihomr<^^i{uWR3ZI<$r$U}3tZ7|6ez;*^hKyt6ov@>YT4N`kuMas87D_l*rxINp}&_Y#5(Z{EjrV7SJ0 zi%A=u?k#ysYqbGiw&k{M*|`*xuf0RyrD(@0WR+szcI$@}MjqQ?9qQVToHWw`i8(33 z)X0@1Cl5G zS}w;sSihh0#`0&llpwDk@A~Z{y73{6`$OH$z8%L;XgpKL@!DPED5ZOz<8IWmF!PHE z1G5Es8VB&k-JD)d7#4{i0>O5AP^}QJVKu_>CB-v9Ic<0misMF29rA=lSz(4vfbpky z1*}_GXLEXcn&Zxjf5f^D_K3nFG2kTqR@@9SwG|5n#9nNcCP`6yithrZGtkuk?`mqCowL@5;xdC+GbrAhP?t?VfV zpa20U>?|^Ms7xi5L@X)s{O?lpB92JwD>vJPFvS?&DnX?y zC2Qw!P0453QS$2&$7*JH`LEZ)0yz>&*)vDs%Wwo_b7Tzj b=|z(0$yUrtpm-&wBMA`tRf9 Date: Sat, 5 Oct 2024 11:34:19 +0800 Subject: [PATCH 041/101] Update redis with latest release --- config/source.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/source.json b/config/source.json index 1e847421..c7ef1e8c 100644 --- a/config/source.json +++ b/config/source.json @@ -674,10 +674,10 @@ } }, "redis": { - "type": "git", + "type": "url", + "url": "https://pecl.php.net/get/redis", "path": "php-src/ext/redis", - "rev": "release/6.0.2", - "url": "https://github.com/phpredis/phpredis", + "filename": "redis.tgz", "license": { "type": "file", "path": [ From 3c802119ede202c4a8512ce90fa248e9b425f0a6 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 5 Oct 2024 12:04:14 +0800 Subject: [PATCH 042/101] cs-fix and fix tests --- src/SPC/util/GlobalEnvManager.php | 3 ++- tests/SPC/builder/BuilderTest.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SPC/util/GlobalEnvManager.php b/src/SPC/util/GlobalEnvManager.php index 70893b94..9a30f8d0 100644 --- a/src/SPC/util/GlobalEnvManager.php +++ b/src/SPC/util/GlobalEnvManager.php @@ -24,8 +24,9 @@ class GlobalEnvManager /** * Initialize the environment variables * - * @param BuilderBase $builder Builder + * @param null|BuilderBase $builder Builder * @throws RuntimeException + * @throws WrongUsageException */ public static function init(?BuilderBase $builder = null): void { diff --git a/tests/SPC/builder/BuilderTest.php b/tests/SPC/builder/BuilderTest.php index 3dbdc845..fe46b785 100644 --- a/tests/SPC/builder/BuilderTest.php +++ b/tests/SPC/builder/BuilderTest.php @@ -102,7 +102,7 @@ class BuilderTest extends TestCase { if (file_exists(SOURCE_PATH . '/php-src/main/php_version.h')) { $file = SOURCE_PATH . '/php-src/main/php_version.h'; - $cnt = preg_match('/PHP_VERSION "(\d+\.\d+\.\d+)"/', $file, $match); + $cnt = preg_match('/PHP_VERSION "(\d+\.\d+\.\d+)"/', file_get_contents($file), $match); if ($cnt !== 0) { $this->assertEquals($match[1], $this->builder->getPHPVersion()); } else { From ca8ec70c407507102b7565df6918791736c0ba07 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 5 Oct 2024 15:33:27 +0800 Subject: [PATCH 043/101] Update docs vue components --- docs/.vitepress/components/CliGenerator.vue | 133 +++++++++++++++++--- docs/.vitepress/components/SearchTable.vue | 79 ++++++++++++ docs/en/guide/cli-generator.md | 4 + docs/en/guide/extensions.md | 6 +- docs/zh/guide/cli-generator.md | 4 + docs/zh/guide/extensions.md | 7 +- 6 files changed, 215 insertions(+), 18 deletions(-) create mode 100644 docs/.vitepress/components/SearchTable.vue diff --git a/docs/.vitepress/components/CliGenerator.vue b/docs/.vitepress/components/CliGenerator.vue index 3a44ecdd..ca44f189 100644 --- a/docs/.vitepress/components/CliGenerator.vue +++ b/docs/.vitepress/components/CliGenerator.vue @@ -2,17 +2,29 @@

{{ I18N[lang].selectedSystem }}

- +
+
+ +

{{ I18N[lang].selectExt }}{{ checkedExts.length > 0 ? (' (' + checkedExts.length + ')') : '' }}

-
- - - + +
+
+ + +
@@ -20,7 +32,7 @@
{{ I18N[lang].selectCommon }}
{{ I18N[lang].selectNone }}
-
+
{{ I18N[lang].buildLibs }}{{ checkedLibs.length > 0 ? (' (' + checkedLibs.length + ')') : '' }}
@@ -135,24 +147,33 @@

WARNING

{{ I18N[lang].windowsDownSPCWarning }}

+ https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe
{{ I18N[lang].downloadExtOnlyCommand }} -
{{ spcCommand }} download --with-php={{ selectedPhpVersion }} --for-extensions "{{ extList }}"{{ preBuilt ? ' --prefer-pre-built' : '' }}{{ debug ? ' --debug' : '' }}
+
+ {{ downloadExtCommand }} +
{{ I18N[lang].downloadAllCommand }} -
{{ spcCommand }} download --all --with-php={{ selectedPhpVersion }}{{ preBuilt ? ' --prefer-pre-built' : '' }}{{ debug ? ' --debug' : '' }}
+
+ {{ downloadAllCommand }} +
{{ I18N[lang].downloadUPXCommand }} -
{{ spcCommand }} install-pkg upx{{ debug ? ' --debug' : '' }}
+
+ {{ downloadPkgCommand }} +
{{ I18N[lang].compileCommand }} -
{{ spcCommand }} build {{ buildCommand }} "{{ extList }}"{{ additionalLibs }}{{ debug ? ' --debug' : '' }}{{ zts ? ' --enable-zts' : '' }}{{ enableUPX ? ' --with-upx-pack' : '' }}{{ displayINI }}
+
+ {{ buildCommandString }} +
@@ -170,6 +191,15 @@ import libData from '../config/lib.json'; import { getAllExtLibsByDeps } from './DependencyUtil.js'; const ext = ref(extData); +const extFilter = computed(() => { + const ls = []; + for (const [name, item] of Object.entries(ext.value)) { + if (isSupported(name, selectedSystem.value)) { + ls.push(name); + } + } + return ls; +}); const lib = ref(libData); const libContain = ref([]); @@ -234,7 +264,7 @@ const I18N = { microUnavailable: 'micro 不支持 PHP 7.4 及更早版本!', windowsSAPIUnavailable: 'Windows 目前不支持 fpm、embed 构建!', useUPX: '是否开启 UPX 压缩(减小二进制体积)', - windowsDownSPCWarning: 'Windows 下请手动下载 spc.exe 二进制文件并解压到当前目录!', + windowsDownSPCWarning: 'Windows 下请手动下载 spc.exe 二进制文件,解压到当前目录并重命名为 spc.exe!', usePreBuilt: '如果可能,下载预编译的依赖库(减少编译时间)', }, en: { @@ -268,7 +298,7 @@ const I18N = { microUnavailable: 'Micro does not support PHP 7.4 and earlier versions!', windowsSAPIUnavailable: 'Windows does not support fpm and embed build!', useUPX: 'Enable UPX compression (reduce binary size)', - windowsDownSPCWarning: 'Please download the spc.exe binary file manually and extract it to the current directory on Windows!', + windowsDownSPCWarning: 'Please download the binary file manually, extract it to the current directory and rename to spc.exe on Windows!', usePreBuilt: 'Download pre-built dependencies if possible (reduce compile time)', } }; @@ -325,7 +355,7 @@ const libDisableList = ref([]); const checkedTargets = ref(['cli']); // chosen env -const selectedEnv = ref('native'); +const selectedEnv = ref('spc'); // chosen php version const selectedPhpVersion = ref('8.2'); @@ -348,6 +378,13 @@ const enableUPX = ref(0); const hardcodedINIData = ref(''); const selectedSystem = ref('linux'); + +watch(selectedSystem, () => { + if (selectedSystem.value === 'windows') { + selectedArch.value = 'x86_64'; + } +}); + const selectedArch = ref('x86_64'); // spc command string, alt: spc-alpine-docker, spc @@ -381,6 +418,25 @@ const displayINI = computed(() => { return ' ' + str.map((x) => '-I "' + x + '"').join(' '); }); +const filterText = ref(''); + +const highlightItem = (item, step) => { + if (item.includes(filterText.value)) { + if (step === 0) { + return item.substring(0, item.indexOf(filterText.value)); + } else if (step === 1) { + return filterText.value; + } else { + return item.substring(item.indexOf(filterText.value) + filterText.value.length); + } + } else { + if (step === 0) { + return item; + } + return ''; + } +}; + const onTargetChange = (event) => { let id; if (checkedTargets.value.indexOf('all') !== -1 && event.target.value === 'all') { @@ -427,6 +483,22 @@ const calculateExtDepends = (input) => { return Array.from(result); }; +const downloadAllCommand = computed(() => { + return `${spcCommand.value} download --all --with-php=${selectedPhpVersion.value}${preBuilt.value ? ' --prefer-pre-built' : ''}${debug.value ? ' --debug' : ''}`; +}); + +const downloadExtCommand = computed(() => { + return `${spcCommand.value} download --with-php=${selectedPhpVersion.value} --for-extensions "${extList.value}"${preBuilt.value ? ' --prefer-pre-built' : ''}${debug.value ? ' --debug' : ''}`; +}); + +const downloadPkgCommand = computed(() => { + return `${spcCommand.value} install-pkg upx${debug.value ? ' --debug' : ''}`; +}); + +const buildCommandString = computed(() => { + return `${spcCommand.value} build ${buildCommand.value} "${extList.value}"${additionalLibs.value}${debug.value ? ' --debug' : ''}${zts.value ? ' --enable-zts' : ''}${enableUPX.value ? ' --with-upx-pack' : ''}${displayINI.value}`; +}); + const calculateExtLibDepends = (input) => { const result = new Set(); @@ -539,9 +611,12 @@ h2 { .command-preview { padding: 1.2rem; background: var(--vp-c-divider); + border-radius: 8px; + word-break: break-all; font-family: monospace; overflow-wrap: break-word; } + .option-line { padding: 4px 8px; } @@ -582,12 +657,38 @@ select { background-color: var(--vp-button-alt-active-bg); } .textarea { - border: 1px solid var(--vp-button-alt-border); - padding: 0 4px; - min-width: 300px; + border: 1px solid var(--vp-c-divider); + border-radius: 4px; + width: calc(100% - 12px); + padding: 4px 8px; +} + +.input { + display: block; + border: 1px solid var(--vp-c-divider); + border-radius: 4px; + width: 100%; + padding: 4px 8px; } .command-container { margin-bottom: 24px; } +.modal-button { + padding: 4px 8px; + border-radius: 4px; + border-color: var(--vp-button-alt-border); + color: var(--vp-button-alt-text); + background-color: var(--vp-button-alt-bg); +} +.modal-button:hover { + border-color: var(--vp-button-alt-hover-border); + color: var(--vp-button-alt-hover-text); + background-color: var(--vp-button-alt-hover-bg) +} +.modal-button:active { + border-color: var(--vp-button-alt-active-border); + color: var(--vp-button-alt-active-text); + background-color: var(--vp-button-alt-active-bg) +} diff --git a/docs/.vitepress/components/SearchTable.vue b/docs/.vitepress/components/SearchTable.vue new file mode 100644 index 00000000..6cfdc680 --- /dev/null +++ b/docs/.vitepress/components/SearchTable.vue @@ -0,0 +1,79 @@ + + + + + + + \ No newline at end of file diff --git a/docs/en/guide/cli-generator.md b/docs/en/guide/cli-generator.md index b11c0002..87163d00 100644 --- a/docs/en/guide/cli-generator.md +++ b/docs/en/guide/cli-generator.md @@ -1,3 +1,7 @@ +--- +aside: false +--- + diff --git a/docs/en/guide/extensions.md b/docs/en/guide/extensions.md index 14ec91d2..9ce53f63 100644 --- a/docs/en/guide/extensions.md +++ b/docs/en/guide/extensions.md @@ -1,3 +1,7 @@ + + # Extensions > - `yes`: supported @@ -5,7 +9,7 @@ > - `no` with issue link: confirmed to be unavailable due to issue > - `partial` with issue link: supported but not perfect due to issue - + ::: tip If an extension you need is missing, you can create a [Feature Request](https://github.com/crazywhalecc/static-php-cli/issues). diff --git a/docs/zh/guide/cli-generator.md b/docs/zh/guide/cli-generator.md index 3b382ed3..c3936dea 100644 --- a/docs/zh/guide/cli-generator.md +++ b/docs/zh/guide/cli-generator.md @@ -1,3 +1,7 @@ +--- +aside: false +--- + diff --git a/docs/zh/guide/extensions.md b/docs/zh/guide/extensions.md index 46a561dd..43095a07 100644 --- a/docs/zh/guide/extensions.md +++ b/docs/zh/guide/extensions.md @@ -1,3 +1,7 @@ + + # 扩展列表 > - `yes`: 已支持 @@ -5,7 +9,8 @@ > - `no` with issue link: 确定不支持或无法支持 > - `partial` with issue link: 已支持,但是无法完美工作 - + + ::: tip 如果缺少您需要的扩展,您可以创建 [功能请求](https://github.com/crazywhalecc/static-php-cli/issues)。 From ec584bf70444e6934f6e18dee7afa5f6719be523 Mon Sep 17 00:00:00 2001 From: Andrea Esu <95694379+mobot95@users.noreply.github.com> Date: Sat, 12 Oct 2024 10:41:45 +0200 Subject: [PATCH 044/101] Add option to manually specify config file path (#511) * Add Config File Path option * Fix Manual * quotation marks changes * php-cs-fixer * Remove windows config file path option * Add macOS config file path option * Add chinese docs --------- Co-authored-by: andrea.esu Co-authored-by: crazywhalecc --- docs/en/guide/build-on-windows.md | 3 ++- docs/en/guide/manual-build.md | 1 + docs/zh/guide/manual-build.md | 1 + src/SPC/builder/linux/LinuxBuilder.php | 4 ++++ src/SPC/builder/macos/MacOSBuilder.php | 4 ++++ src/SPC/command/BuildCliCommand.php | 4 ++++ 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/en/guide/build-on-windows.md b/docs/en/guide/build-on-windows.md index e3cf1c4e..dc20e29d 100644 --- a/docs/en/guide/build-on-windows.md +++ b/docs/en/guide/build-on-windows.md @@ -159,7 +159,8 @@ You can try to use the following commands: - `--with-clean`: clean up old make files before compiling PHP - `--enable-zts`: Make compiled PHP thread-safe version (default is NTS version) -- `--with-libs=XXX,YYY`: Compile the specified dependent library before compiling PHP, and activate some extension optional functions +- `--with-libs=XXX,YYY`: Compile the specified dependent library before compiling PHP, and activate some extension optional functions +- `--with-config-file-path=XXX`: Set the path in which to look for php.ini - `-I xxx=yyy`: Hard compile INI options into PHP before compiling (support multiple options, alias is `--with-hardcoded-ini`) - `--with-micro-fake-cli`: When compiling micro, let micro's `PHP_SAPI` pretend to be `cli` (for compatibility with some programs that check `PHP_SAPI`) - `--disable-opcache-jit`: Disable opcache jit (enabled by default) diff --git a/docs/en/guide/manual-build.md b/docs/en/guide/manual-build.md index 487d3329..8e52cc98 100644 --- a/docs/en/guide/manual-build.md +++ b/docs/en/guide/manual-build.md @@ -304,6 +304,7 @@ You can try to use the following commands: - `--enable-zts`: Make compiled PHP thread-safe version (default is NTS version) - `--no-strip`: Do not run `strip` after compiling the PHP library to trim the binary file to reduce its size (the macOS binary file without trim can use dynamically linked third-party extensions) - `--with-libs=XXX,YYY`: Compile the specified dependent library before compiling PHP, and activate some extended optional functions (such as libavif of the gd library, etc.) +- `--with-config-file-path=XXX`: Set the path in which to look for php.ini - `-I xxx=yyy`: Hard compile INI options into PHP before compiling (support multiple options, alias is `--with-hardcoded-ini`) - `--with-micro-fake-cli`: When compiling micro, let micro's `PHP_SAPI` pretend to be `cli` (for compatibility with some programs that check `PHP_SAPI`) - `--disable-opcache-jit`: Disable opcache jit (enabled by default) diff --git a/docs/zh/guide/manual-build.md b/docs/zh/guide/manual-build.md index 98f939a7..f5f1ac1f 100644 --- a/docs/zh/guide/manual-build.md +++ b/docs/zh/guide/manual-build.md @@ -265,6 +265,7 @@ bin/spc build mysqlnd,pdo_mysql --build-all --debug - `--enable-zts`: 让编译的 PHP 为线程安全版本(默认为 NTS 版本) - `--no-strip`: 编译 PHP 库后不运行 `strip` 裁剪二进制文件缩小体积(不裁剪的 macOS 二进制文件可使用动态链接的第三方扩展) - `--with-libs=XXX,YYY`: 编译 PHP 前先编译指定的依赖库,激活部分扩展的可选功能(例如 gd 库的 libavif 等) +- `--with-config-file-path=XXX`: 指定 PHP 配置文件的路径 - `-I xxx=yyy`: 编译前将 INI 选项硬编译到 PHP 内(支持多个选项,别名是 `--with-hardcoded-ini`) - `--with-micro-fake-cli`: 在编译 micro 时,让 micro 的 SAPI 伪装为 `cli`(用于兼容一些检查 `PHP_SAPI` 的程序) - `--disable-opcache-jit`: 禁用 opcache jit(默认启用) diff --git a/src/SPC/builder/linux/LinuxBuilder.php b/src/SPC/builder/linux/LinuxBuilder.php index 1e07a624..669ec560 100644 --- a/src/SPC/builder/linux/LinuxBuilder.php +++ b/src/SPC/builder/linux/LinuxBuilder.php @@ -134,6 +134,9 @@ class LinuxBuilder extends UnixBuilderBase } $disable_jit = $this->getOption('disable-opcache-jit', false) ? '--disable-opcache-jit ' : ''; + $config_file_path = $this->getOption('with-config-file-path', false) ? + ('--with-config-file-path=' . $this->getOption('with-config-file-path') . ' ') : ''; + $enable_cli = ($build_target & BUILD_TARGET_CLI) === BUILD_TARGET_CLI; $enable_fpm = ($build_target & BUILD_TARGET_FPM) === BUILD_TARGET_FPM; $enable_micro = ($build_target & BUILD_TARGET_MICRO) === BUILD_TARGET_MICRO; @@ -163,6 +166,7 @@ class LinuxBuilder extends UnixBuilderBase ($enable_fpm ? '--enable-fpm ' : '--disable-fpm ') . ($enable_embed ? '--enable-embed=static ' : '--disable-embed ') . ($enable_micro ? '--enable-micro=all-static ' : '--disable-micro ') . + $config_file_path . $disable_jit . $json_74 . $zts . diff --git a/src/SPC/builder/macos/MacOSBuilder.php b/src/SPC/builder/macos/MacOSBuilder.php index a29e9954..a9fa8349 100644 --- a/src/SPC/builder/macos/MacOSBuilder.php +++ b/src/SPC/builder/macos/MacOSBuilder.php @@ -137,6 +137,9 @@ class MacOSBuilder extends UnixBuilderBase $json_74 = $this->getPHPVersionID() < 80000 ? '--enable-json ' : ''; $zts = $this->getOption('enable-zts', false) ? '--enable-zts --disable-zend-signals ' : ''; + $config_file_path = $this->getOption('with-config-file-path', false) ? + ('--with-config-file-path=' . $this->getOption('with-config-file-path') . ' ') : ''; + $enableCli = ($build_target & BUILD_TARGET_CLI) === BUILD_TARGET_CLI; $enableFpm = ($build_target & BUILD_TARGET_FPM) === BUILD_TARGET_FPM; $enableMicro = ($build_target & BUILD_TARGET_MICRO) === BUILD_TARGET_MICRO; @@ -164,6 +167,7 @@ class MacOSBuilder extends UnixBuilderBase ($enableFpm ? '--enable-fpm ' : '--disable-fpm ') . ($enableEmbed ? '--enable-embed=static ' : '--disable-embed ') . ($enableMicro ? '--enable-micro ' : '--disable-micro ') . + $config_file_path . $json_74 . $zts . $this->makeExtensionArgs() . ' ' . diff --git a/src/SPC/command/BuildCliCommand.php b/src/SPC/command/BuildCliCommand.php index 2356e96f..18660603 100644 --- a/src/SPC/command/BuildCliCommand.php +++ b/src/SPC/command/BuildCliCommand.php @@ -32,6 +32,7 @@ class BuildCliCommand extends BuildCommand $this->addOption('no-strip', null, null, 'build without strip, in order to debug and load external extensions'); $this->addOption('enable-zts', null, null, 'enable ZTS support'); $this->addOption('disable-opcache-jit', null, null, 'disable opcache jit'); + $this->addOption('with-config-file-path', null, InputOption::VALUE_REQUIRED, 'Set the path in which to look for php.ini'); $this->addOption('with-hardcoded-ini', 'I', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Patch PHP source code, inject hardcoded INI'); $this->addOption('with-micro-fake-cli', null, null, 'Let phpmicro\'s PHP_SAPI use "cli" instead of "micro"'); $this->addOption('with-suggested-libs', 'L', null, 'Build with suggested libs for selected exts and libs'); @@ -114,6 +115,9 @@ class BuildCliCommand extends BuildCommand 'Strip Binaries' => $builder->getOption('no-strip') ? 'no' : 'yes', 'Enable ZTS' => $builder->getOption('enable-zts') ? 'yes' : 'no', ]; + if (!empty($this->input->getOption('with-config-file-path'))) { + $indent_texts['Config File Path'] = $this->input->getOption('with-config-file-path'); + } if (!empty($this->input->getOption('with-hardcoded-ini'))) { $indent_texts['Hardcoded INI'] = $this->input->getOption('with-hardcoded-ini'); } From e752874f2219d3bf63bb7bb74425457f19c28d4f Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Thu, 17 Oct 2024 21:56:56 +0800 Subject: [PATCH 045/101] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 8f3aa747..1bd44ec3 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,6 +1,6 @@ # These are supported funding model platforms -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +github: crazywhalecc # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: crazywhalecc # Replace with a single Ko-fi username From ef18264de35e50e214a75cbb61e13fea34929113 Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Thu, 17 Oct 2024 22:03:43 +0800 Subject: [PATCH 046/101] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 1bd44ec3..8f3aa747 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,6 +1,6 @@ # These are supported funding model platforms -github: crazywhalecc # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: crazywhalecc # Replace with a single Ko-fi username From 0fb7784a207f0381a9ecbb92f7560167759f19cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 18 Oct 2024 14:46:00 +0200 Subject: [PATCH 047/101] feat: better default for the php.ini path (#553) * update * update * fix * Adjust docs * Adjust docs * Add config-file-scan-dir for WindowsBuilder * Bump version --------- Co-authored-by: crazywhalecc --- docs/en/faq/index.md | 14 +++++++++++++- docs/en/guide/build-on-windows.md | 2 +- docs/en/guide/manual-build.md | 3 ++- docs/zh/faq/index.md | 12 ++++++++++++ docs/zh/guide/build-on-windows.md | 1 + docs/zh/guide/manual-build.md | 3 ++- src/SPC/ConsoleApplication.php | 2 +- src/SPC/builder/freebsd/BSDBuilder.php | 7 +++++++ src/SPC/builder/linux/LinuxBuilder.php | 3 +++ src/SPC/builder/macos/MacOSBuilder.php | 3 +++ src/SPC/builder/windows/WindowsBuilder.php | 4 ++++ src/SPC/command/BuildCliCommand.php | 5 ++++- 12 files changed, 53 insertions(+), 6 deletions(-) diff --git a/docs/en/faq/index.md b/docs/en/faq/index.md index 7c0b381d..05881ca8 100644 --- a/docs/en/faq/index.md +++ b/docs/en/faq/index.md @@ -2,7 +2,19 @@ Here will be some questions that you may encounter easily. There are currently many, but I need to take time to organize them. -## Can statically compiled PHP install extensions? +## What is the path of php.ini ? + +On Linux, macOS and FreeBSD, the path of `php.ini` is `/usr/local/etc/php/php.ini`. +On Windows, the path is `C:\windows\php.ini` or the current directory of `php.exe`. +The directory where to look for `php.ini` can be changed on *nix using the manual build option `--with-config-file-path`. + +In addition, on Linux, macOS and FreeBSD, `.ini` files present in the `/usr/local/etc/php/conf.d` directory will also be loaded. +On Windows, this path is empty by default. +The directory can be changed using the manual build option `--with-config-file-scan-dir`. + +`php.ini` will also be searched for in [the other standard locations](https://www.php.net/manual/configuration.file.php). + +## Can statically-compiled PHP install extensions? Because the principle of installing extensions in PHP under the traditional architecture is to install new extensions using `.so` type dynamic link libraries, and statically linked PHP compiled using this project cannot **directly** install new extensions using dynamic link libraries. diff --git a/docs/en/guide/build-on-windows.md b/docs/en/guide/build-on-windows.md index dc20e29d..b41e4493 100644 --- a/docs/en/guide/build-on-windows.md +++ b/docs/en/guide/build-on-windows.md @@ -160,7 +160,7 @@ You can try to use the following commands: - `--with-clean`: clean up old make files before compiling PHP - `--enable-zts`: Make compiled PHP thread-safe version (default is NTS version) - `--with-libs=XXX,YYY`: Compile the specified dependent library before compiling PHP, and activate some extension optional functions -- `--with-config-file-path=XXX`: Set the path in which to look for php.ini +- `--with-config-file-scan-dir=XXX`: Set the directory to scan for `.ini` files after reading `php.ini` (Check [here](../faq/index.html#what-is-the-path-of-php-ini) for default paths) - `-I xxx=yyy`: Hard compile INI options into PHP before compiling (support multiple options, alias is `--with-hardcoded-ini`) - `--with-micro-fake-cli`: When compiling micro, let micro's `PHP_SAPI` pretend to be `cli` (for compatibility with some programs that check `PHP_SAPI`) - `--disable-opcache-jit`: Disable opcache jit (enabled by default) diff --git a/docs/en/guide/manual-build.md b/docs/en/guide/manual-build.md index 8e52cc98..ba023254 100644 --- a/docs/en/guide/manual-build.md +++ b/docs/en/guide/manual-build.md @@ -304,7 +304,8 @@ You can try to use the following commands: - `--enable-zts`: Make compiled PHP thread-safe version (default is NTS version) - `--no-strip`: Do not run `strip` after compiling the PHP library to trim the binary file to reduce its size (the macOS binary file without trim can use dynamically linked third-party extensions) - `--with-libs=XXX,YYY`: Compile the specified dependent library before compiling PHP, and activate some extended optional functions (such as libavif of the gd library, etc.) -- `--with-config-file-path=XXX`: Set the path in which to look for php.ini +- `--with-config-file-path=XXX`: Set the path in which to look for `php.ini` (Check [here](../faq/index.html#what-is-the-path-of-php-ini) for default paths) +- `--with-config-file-scan-dir=XXX`: Set the directory to scan for `.ini` files after reading `php.ini` (Check [here](../faq/index.html#what-is-the-path-of-php-ini) for default paths) - `-I xxx=yyy`: Hard compile INI options into PHP before compiling (support multiple options, alias is `--with-hardcoded-ini`) - `--with-micro-fake-cli`: When compiling micro, let micro's `PHP_SAPI` pretend to be `cli` (for compatibility with some programs that check `PHP_SAPI`) - `--disable-opcache-jit`: Disable opcache jit (enabled by default) diff --git a/docs/zh/faq/index.md b/docs/zh/faq/index.md index c9c979c4..f36313cd 100644 --- a/docs/zh/faq/index.md +++ b/docs/zh/faq/index.md @@ -2,6 +2,18 @@ 这里将会编写一些你容易遇到的问题。目前有很多,但是我需要花时间来整理一下。 +## php.ini 的路径是什么? + +在 Linux、macOS 和 FreeBSD 上,`php.ini` 的默认路径是 `/usr/local/etc/php/php.ini`。 +在 Windows 中,路径是 `C:\windows\php.ini` 或 `php.exe` 所在的当前目录。 +可以在 *nix 系统中使用手动构建选项 `--with-config-file-path` 来更改查找 `php.ini` 的目录。 + +此外,在 Linux、macOS 和 FreeBSD 上,`/usr/local/etc/php/conf.d` 目录中的 `*.ini` 文件也会被加载。 +在 Windows 中,该路径默认为空。 +可以使用手动构建选项 `--with-config-file-scan-dir` 更改该目录。 + +PHP 默认也会从 [其他标准位置](https://www.php.net/manual/zh/configuration.file.php) 中搜索 `php.ini`。 + ## 静态编译的 PHP 可以安装扩展吗 因为传统架构下的 PHP 安装扩展的原理是使用 `.so` 类型的动态链接的库方式安装新扩展,而使用本项目编译的静态链接的 PHP 无法**直接**使用动态链接库安装新扩展。 diff --git a/docs/zh/guide/build-on-windows.md b/docs/zh/guide/build-on-windows.md index b2933aab..0eb587fc 100644 --- a/docs/zh/guide/build-on-windows.md +++ b/docs/zh/guide/build-on-windows.md @@ -146,6 +146,7 @@ bin/spc build "openssl" --build-cli --debug - `--with-clean`: 编译 PHP 前先清理旧的 make 产生的文件 - `--enable-zts`: 让编译的 PHP 为线程安全版本(默认为 NTS 版本) - `--with-libs=XXX,YYY`: 编译 PHP 前先编译指定的依赖库,激活部分扩展的可选功能 +- `--with-config-file-scan-dir=XXX`: 读取 `php.ini` 后扫描 `.ini` 文件的目录(在 [这里](../faq/index.html#php-ini-的路径是什么) 查看默认路径) - `-I xxx=yyy`: 编译前将 INI 选项硬编译到 PHP 内(支持多个选项,别名是 `--with-hardcoded-ini`) - `--with-micro-fake-cli`: 在编译 micro 时,让 micro 的 SAPI 伪装为 `cli`(用于兼容一些检查 `PHP_SAPI` 的程序) - `--disable-opcache-jit`: 禁用 opcache jit(默认启用) diff --git a/docs/zh/guide/manual-build.md b/docs/zh/guide/manual-build.md index f5f1ac1f..2e7c17f5 100644 --- a/docs/zh/guide/manual-build.md +++ b/docs/zh/guide/manual-build.md @@ -265,7 +265,8 @@ bin/spc build mysqlnd,pdo_mysql --build-all --debug - `--enable-zts`: 让编译的 PHP 为线程安全版本(默认为 NTS 版本) - `--no-strip`: 编译 PHP 库后不运行 `strip` 裁剪二进制文件缩小体积(不裁剪的 macOS 二进制文件可使用动态链接的第三方扩展) - `--with-libs=XXX,YYY`: 编译 PHP 前先编译指定的依赖库,激活部分扩展的可选功能(例如 gd 库的 libavif 等) -- `--with-config-file-path=XXX`: 指定 PHP 配置文件的路径 +- `--with-config-file-path=XXX`: 查找 `php.ini` 的路径(在 [这里](../faq/index.html#php-ini-的路径是什么) 查看默认路径) +- `--with-config-file-scan-dir=XXX`: 读取 `php.ini` 后扫描 `.ini` 文件的目录(在 [这里](../faq/index.html#php-ini-的路径是什么) 查看默认路径) - `-I xxx=yyy`: 编译前将 INI 选项硬编译到 PHP 内(支持多个选项,别名是 `--with-hardcoded-ini`) - `--with-micro-fake-cli`: 在编译 micro 时,让 micro 的 SAPI 伪装为 `cli`(用于兼容一些检查 `PHP_SAPI` 的程序) - `--disable-opcache-jit`: 禁用 opcache jit(默认启用) diff --git a/src/SPC/ConsoleApplication.php b/src/SPC/ConsoleApplication.php index 6532b535..122a2e6e 100644 --- a/src/SPC/ConsoleApplication.php +++ b/src/SPC/ConsoleApplication.php @@ -30,7 +30,7 @@ use Symfony\Component\Console\Application; */ final class ConsoleApplication extends Application { - public const VERSION = '2.3.5'; + public const VERSION = '2.3.6'; public function __construct() { diff --git a/src/SPC/builder/freebsd/BSDBuilder.php b/src/SPC/builder/freebsd/BSDBuilder.php index fad4a830..c1d41118 100644 --- a/src/SPC/builder/freebsd/BSDBuilder.php +++ b/src/SPC/builder/freebsd/BSDBuilder.php @@ -89,6 +89,11 @@ class BSDBuilder extends UnixBuilderBase $zts_enable = $this->getPHPVersionID() < 80000 ? '--enable-maintainer-zts --disable-zend-signals' : '--enable-zts --disable-zend-signals'; $zts = $this->getOption('enable-zts', false) ? $zts_enable : ''; + $config_file_path = $this->getOption('with-config-file-path', false) ? + ('--with-config-file-path=' . $this->getOption('with-config-file-path') . ' ') : ''; + $config_file_scan_dir = $this->getOption('with-config-file-scan-dir', false) ? + ('--with-config-file-scan-dir=' . $this->getOption('with-config-file-scan-dir') . ' ') : ''; + $enableCli = ($build_target & BUILD_TARGET_CLI) === BUILD_TARGET_CLI; $enableFpm = ($build_target & BUILD_TARGET_FPM) === BUILD_TARGET_FPM; $enableMicro = ($build_target & BUILD_TARGET_MICRO) === BUILD_TARGET_MICRO; @@ -109,6 +114,8 @@ class BSDBuilder extends UnixBuilderBase ($enableFpm ? '--enable-fpm ' : '--disable-fpm ') . ($enableEmbed ? '--enable-embed=static ' : '--disable-embed ') . ($enableMicro ? '--enable-micro ' : '--disable-micro ') . + $config_file_path . + $config_file_scan_dir . $json_74 . $zts . $this->makeExtensionArgs() diff --git a/src/SPC/builder/linux/LinuxBuilder.php b/src/SPC/builder/linux/LinuxBuilder.php index 669ec560..6589f32b 100644 --- a/src/SPC/builder/linux/LinuxBuilder.php +++ b/src/SPC/builder/linux/LinuxBuilder.php @@ -136,6 +136,8 @@ class LinuxBuilder extends UnixBuilderBase $config_file_path = $this->getOption('with-config-file-path', false) ? ('--with-config-file-path=' . $this->getOption('with-config-file-path') . ' ') : ''; + $config_file_scan_dir = $this->getOption('with-config-file-scan-dir', false) ? + ('--with-config-file-scan-dir=' . $this->getOption('with-config-file-scan-dir') . ' ') : ''; $enable_cli = ($build_target & BUILD_TARGET_CLI) === BUILD_TARGET_CLI; $enable_fpm = ($build_target & BUILD_TARGET_FPM) === BUILD_TARGET_FPM; @@ -167,6 +169,7 @@ class LinuxBuilder extends UnixBuilderBase ($enable_embed ? '--enable-embed=static ' : '--disable-embed ') . ($enable_micro ? '--enable-micro=all-static ' : '--disable-micro ') . $config_file_path . + $config_file_scan_dir . $disable_jit . $json_74 . $zts . diff --git a/src/SPC/builder/macos/MacOSBuilder.php b/src/SPC/builder/macos/MacOSBuilder.php index a9fa8349..95aa2c5e 100644 --- a/src/SPC/builder/macos/MacOSBuilder.php +++ b/src/SPC/builder/macos/MacOSBuilder.php @@ -139,6 +139,8 @@ class MacOSBuilder extends UnixBuilderBase $config_file_path = $this->getOption('with-config-file-path', false) ? ('--with-config-file-path=' . $this->getOption('with-config-file-path') . ' ') : ''; + $config_file_scan_dir = $this->getOption('with-config-file-scan-dir', false) ? + ('--with-config-file-scan-dir=' . $this->getOption('with-config-file-scan-dir') . ' ') : ''; $enableCli = ($build_target & BUILD_TARGET_CLI) === BUILD_TARGET_CLI; $enableFpm = ($build_target & BUILD_TARGET_FPM) === BUILD_TARGET_FPM; @@ -168,6 +170,7 @@ class MacOSBuilder extends UnixBuilderBase ($enableEmbed ? '--enable-embed=static ' : '--disable-embed ') . ($enableMicro ? '--enable-micro ' : '--disable-micro ') . $config_file_path . + $config_file_scan_dir . $json_74 . $zts . $this->makeExtensionArgs() . ' ' . diff --git a/src/SPC/builder/windows/WindowsBuilder.php b/src/SPC/builder/windows/WindowsBuilder.php index ecccce19..bd391abb 100644 --- a/src/SPC/builder/windows/WindowsBuilder.php +++ b/src/SPC/builder/windows/WindowsBuilder.php @@ -103,6 +103,9 @@ class WindowsBuilder extends BuilderBase $micro_w32 = $this->getOption('enable-micro-win32') ? ' --enable-micro-win32=yes' : ''; + $config_file_scan_dir = $this->getOption('with-config-file-scan-dir', false) ? + ('--with-config-file-scan-dir=' . $this->getOption('with-config-file-scan-dir') . ' ') : ''; + cmd()->cd(SOURCE_PATH . '\php-src') ->exec( "{$this->sdk_prefix} configure.bat --task-args \"" . @@ -114,6 +117,7 @@ class WindowsBuilder extends BuilderBase ($enableCli ? '--enable-cli=yes ' : '--enable-cli=no ') . ($enableMicro ? ('--enable-micro=yes ' . $micro_logo . $micro_w32) : '--enable-micro=no ') . ($enableEmbed ? '--enable-embed=yes ' : '--enable-embed=no ') . + $config_file_scan_dir . "{$this->makeExtensionArgs()} " . $zts . '"' diff --git a/src/SPC/command/BuildCliCommand.php b/src/SPC/command/BuildCliCommand.php index 18660603..d8b7cf76 100644 --- a/src/SPC/command/BuildCliCommand.php +++ b/src/SPC/command/BuildCliCommand.php @@ -22,6 +22,8 @@ class BuildCliCommand extends BuildCommand { public function configure(): void { + $isWindows = PHP_OS_FAMILY === 'Windows'; + $this->addArgument('extensions', InputArgument::REQUIRED, 'The extensions will be compiled, comma separated'); $this->addOption('with-libs', null, InputOption::VALUE_REQUIRED, 'add additional libraries, comma separated', ''); $this->addOption('build-micro', null, null, 'Build micro SAPI'); @@ -32,7 +34,8 @@ class BuildCliCommand extends BuildCommand $this->addOption('no-strip', null, null, 'build without strip, in order to debug and load external extensions'); $this->addOption('enable-zts', null, null, 'enable ZTS support'); $this->addOption('disable-opcache-jit', null, null, 'disable opcache jit'); - $this->addOption('with-config-file-path', null, InputOption::VALUE_REQUIRED, 'Set the path in which to look for php.ini'); + $this->addOption('with-config-file-path', null, InputOption::VALUE_REQUIRED, 'Set the path in which to look for php.ini', $isWindows ? null : '/usr/local/etc/php'); + $this->addOption('with-config-file-scan-dir', null, InputOption::VALUE_REQUIRED, 'Set the directory to scan for .ini files after reading php.ini', $isWindows ? null : '/usr/local/etc/php/conf.d'); $this->addOption('with-hardcoded-ini', 'I', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Patch PHP source code, inject hardcoded INI'); $this->addOption('with-micro-fake-cli', null, null, 'Let phpmicro\'s PHP_SAPI use "cli" instead of "micro"'); $this->addOption('with-suggested-libs', 'L', null, 'Build with suggested libs for selected exts and libs'); From 3c4d47d0729ed767f1be9c647859cb42313926b6 Mon Sep 17 00:00:00 2001 From: yinheli Date: Sat, 9 Nov 2024 10:50:08 +0800 Subject: [PATCH 048/101] feat: improve downloader retry (#558) - Refactored to remove duplicate retry expressions by utilizing the getRetryTime() method. - Fixed a typo in the log message. --- src/SPC/store/Downloader.php | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/SPC/store/Downloader.php b/src/SPC/store/Downloader.php index f01519bf..16edeeae 100644 --- a/src/SPC/store/Downloader.php +++ b/src/SPC/store/Downloader.php @@ -28,7 +28,7 @@ class Downloader logger()->debug("finding {$name} source from bitbucket tag"); $data = json_decode(self::curlExec( url: "https://api.bitbucket.org/2.0/repositories/{$source['repo']}/refs/tags", - retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0) + retry: self::getRetryTime() ), true); $ver = $data['values'][0]['name']; if (!$ver) { @@ -38,7 +38,7 @@ class Downloader $headers = self::curlExec( url: $url, method: 'HEAD', - retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0) + retry: self::getRetryTime() ); preg_match('/^content-disposition:\s+attachment;\s*filename=("?)(?.+\.tar\.gz)\1/im', $headers, $matches); if ($matches) { @@ -66,7 +66,7 @@ class Downloader $data = json_decode(self::curlExec( url: "https://api.github.com/repos/{$source['repo']}/{$type}", hooks: [[CurlHook::class, 'setupGithubToken']], - retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0) + retry: self::getRetryTime() ), true); if (($source['prefer-stable'] ?? false) === false) { @@ -85,7 +85,7 @@ class Downloader url: $url, method: 'HEAD', hooks: [[CurlHook::class, 'setupGithubToken']], - retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0) + retry: self::getRetryTime() ); preg_match('/^content-disposition:\s+attachment;\s*filename=("?)(?.+\.tar\.gz)\1/im', $headers, $matches); if ($matches) { @@ -108,11 +108,11 @@ class Downloader */ public static function getLatestGithubRelease(string $name, array $source, bool $match_result = true): array { - logger()->debug("finding {$name} from github releases assests"); + logger()->debug("finding {$name} from github releases assets"); $data = json_decode(self::curlExec( url: "https://api.github.com/repos/{$source['repo']}/releases", hooks: [[CurlHook::class, 'setupGithubToken']], - retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0) + retry: self::getRetryTime() ), true); $url = null; foreach ($data as $release) { @@ -149,7 +149,7 @@ class Downloader public static function getFromFileList(string $name, array $source): array { logger()->debug("finding {$name} source from file list"); - $page = self::curlExec($source['url'], retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0)); + $page = self::curlExec($source['url'], retry: self::getRetryTime()); preg_match_all($source['regex'], $page, $matches); if (!$matches) { throw new DownloaderException("Failed to get {$name} version"); @@ -194,7 +194,7 @@ class Downloader } }; self::registerCancelEvent($cancel_func); - self::curlDown(url: $url, path: FileSystem::convertPath(DOWNLOAD_PATH . "/{$filename}"), retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0)); + self::curlDown(url: $url, path: FileSystem::convertPath(DOWNLOAD_PATH . "/{$filename}"), retry: self::getRetryTime()); self::unregisterCancelEvent(); logger()->debug("Locking {$filename}"); self::lockSource($name, ['source_type' => 'archive', 'filename' => $filename, 'move_path' => $move_path, 'lock_as' => $lock_as]); @@ -347,7 +347,7 @@ class Downloader $pkg['url'], $pkg['rev'], $pkg['extract'] ?? null, - intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0), + self::getRetryTime(), SPC_LOCK_PRE_BUILT ); break; @@ -451,7 +451,7 @@ class Downloader $source['url'], $source['rev'], $source['path'] ?? null, - intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0), + self::getRetryTime(), $lock_as ); break; @@ -567,7 +567,7 @@ class Downloader } if ($retry > 0) { logger()->notice('Retrying curl download ...'); - self::curlDown($url, $path, $method, $used_headers, retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0)); + self::curlDown($url, $path, $method, $used_headers, retry: $retry - 1); return; } throw $e; @@ -601,4 +601,9 @@ class Downloader pcntl_signal(2, SIG_IGN); } } + + private static function getRetryTime(): int + { + return intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0); + } } From 2bfc5e1d7445e22e70954b39c108f4b7a9fb6d69 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 9 Nov 2024 22:07:52 +0800 Subject: [PATCH 049/101] Add grpc support for macOS and Linux --- config/ext.json | 13 ++++++++ config/lib.json | 14 ++++++++ config/source.json | 10 ++++++ src/SPC/builder/extension/grpc.php | 45 ++++++++++++++++++++++++++ src/SPC/builder/linux/library/grpc.php | 12 +++++++ src/SPC/builder/macos/library/grpc.php | 12 +++++++ src/SPC/builder/unix/library/grpc.php | 24 ++++++++++++++ src/globals/ext-tests/grpc.php | 5 +++ src/globals/test-extensions.php | 6 ++-- 9 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 src/SPC/builder/extension/grpc.php create mode 100644 src/SPC/builder/linux/library/grpc.php create mode 100644 src/SPC/builder/macos/library/grpc.php create mode 100644 src/SPC/builder/unix/library/grpc.php create mode 100644 src/globals/ext-tests/grpc.php diff --git a/config/ext.json b/config/ext.json index efd4aad9..2f076f2b 100644 --- a/config/ext.json +++ b/config/ext.json @@ -199,6 +199,19 @@ "gmssl" ] }, + "grpc": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "grpc", + "arg-type-unix": "custom", + "cpp-extension": true, + "lib-depends": [ + "grpc" + ] + }, "iconv": { "support": { "BSD": "wip" diff --git a/config/lib.json b/config/lib.json index 94061623..565a6112 100644 --- a/config/lib.json +++ b/config/lib.json @@ -139,6 +139,20 @@ "Security" ] }, + "grpc": { + "source": "grpc", + "static-libs-unix": [ + "libgrpc.a", + "libboringssl.a", + "libcares.a" + ], + "lib-depends": [ + "zlib" + ], + "frameworks": [ + "CoreFoundation" + ] + }, "icu": { "source": "icu", "cpp-library": true, diff --git a/config/source.json b/config/source.json index c7ef1e8c..9c24f309 100644 --- a/config/source.json +++ b/config/source.json @@ -211,6 +211,16 @@ "path": "LICENSE" } }, + "grpc": { + "type": "git", + "rev": "v1.68.x", + "url": "https://github.com/grpc/grpc.git", + "provide-pre-built": true, + "license": { + "type": "file", + "path": "LICENSE" + } + }, "icu": { "type": "ghrel", "repo": "unicode-org/icu", diff --git a/src/SPC/builder/extension/grpc.php b/src/SPC/builder/extension/grpc.php new file mode 100644 index 00000000..7b410074 --- /dev/null +++ b/src/SPC/builder/extension/grpc.php @@ -0,0 +1,45 @@ +builder instanceof WindowsBuilder) { + // not support windows yet + throw new \RuntimeException('grpc extension does not support windows yet'); + } + if (!is_link(SOURCE_PATH . '/php-src/ext/grpc')) { + shell()->exec('ln -s ' . $this->builder->getLib('grpc')->getSourceDir() . '/src/php/ext/grpc ' . SOURCE_PATH . '/php-src/ext/grpc'); + $macos = $this->builder instanceof MacOSBuilder ? "\n" . ' LDFLAGS="$LDFLAGS -framework CoreFoundation"' : ''; + FileSystem::replaceFileRegex(SOURCE_PATH . '/php-src/ext/grpc/config.m4', '/GRPC_LIBDIR=.*$/m', 'GRPC_LIBDIR=' . BUILD_LIB_PATH . $macos); + FileSystem::replaceFileRegex(SOURCE_PATH . '/php-src/ext/grpc/config.m4', '/SEARCH_PATH=.*$/m', 'SEARCH_PATH="' . BUILD_ROOT_PATH . '"'); + return true; + } + return false; + } + + public function patchBeforeMake(): bool + { + // add -Wno-strict-prototypes + GlobalEnvManager::putenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS=' . getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS') . ' -Wno-strict-prototypes'); + return true; + } + + public function getUnixConfigureArg(): string + { + return '--enable-grpc=' . BUILD_ROOT_PATH . '/grpc GRPC_LIB_SUBDIR=' . BUILD_LIB_PATH; + } +} diff --git a/src/SPC/builder/linux/library/grpc.php b/src/SPC/builder/linux/library/grpc.php new file mode 100644 index 00000000..ccafc94c --- /dev/null +++ b/src/SPC/builder/linux/library/grpc.php @@ -0,0 +1,12 @@ +cd($this->source_dir) + ->exec('EXTRA_DEFINES=GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK CXXFLAGS="-L' . BUILD_LIB_PATH . ' -I' . BUILD_INCLUDE_PATH . '" make static -j' . $this->builder->concurrency); + copy($this->source_dir . '/libs/opt/libgrpc.a', BUILD_LIB_PATH . '/libgrpc.a'); + copy($this->source_dir . '/libs/opt/libboringssl.a', BUILD_LIB_PATH . '/libboringssl.a'); + if (!file_exists(BUILD_LIB_PATH . '/libcares.a')) { + copy($this->source_dir . '/libs/opt/libcares.a', BUILD_LIB_PATH . '/libcares.a'); + } + FileSystem::copyDir($this->source_dir . '/include/grpc', BUILD_INCLUDE_PATH . '/grpc'); + FileSystem::copyDir($this->source_dir . '/include/grpc++', BUILD_INCLUDE_PATH . '/grpc++'); + FileSystem::copyDir($this->source_dir . '/include/grpcpp', BUILD_INCLUDE_PATH . '/grpcpp'); + } +} diff --git a/src/globals/ext-tests/grpc.php b/src/globals/ext-tests/grpc.php new file mode 100644 index 00000000..cb0bc27c --- /dev/null +++ b/src/globals/ext-tests/grpc.php @@ -0,0 +1,5 @@ + '', + 'Linux', 'Darwin' => 'grpc', 'Windows' => 'amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,exif,ffi,fileinfo,filter,ftp,gd,iconv,igbinary,libxml,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_sqlite,pdo_sqlsrv,phar,rar,redis,session,shmop,simdjson,simplexml,soap,sockets,sqlite3,sqlsrv,ssh2,swow,sysvshm,tokenizer,xml,xmlreader,xmlwriter,yac,yaml,zip,zlib', }; @@ -54,7 +52,7 @@ $with_libs = match (PHP_OS_FAMILY) { // You can use `common`, `bulk`, `minimal` or `none`. // note: combination is only available for *nix platform. Windows must use `none` combination $base_combination = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'bulk', + 'Linux', 'Darwin' => 'minimal', 'Windows' => 'none', }; From ddafdf8987f3747303ef36f940a331baf36b4793 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 25 Oct 2024 16:38:02 +0800 Subject: [PATCH 050/101] Add PHP 8.4 support (testing) --- config/source.json | 2 +- src/SPC/ConsoleApplication.php | 2 +- src/SPC/store/source/PhpSource.php | 2 +- src/globals/test-extensions.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/source.json b/config/source.json index 9c24f309..48880c5d 100644 --- a/config/source.json +++ b/config/source.json @@ -523,7 +523,7 @@ "micro": { "type": "git", "path": "php-src/sapi/micro", - "rev": "master", + "rev": "84beta", "url": "https://github.com/static-php/phpmicro", "license": { "type": "file", diff --git a/src/SPC/ConsoleApplication.php b/src/SPC/ConsoleApplication.php index 122a2e6e..6b44013c 100644 --- a/src/SPC/ConsoleApplication.php +++ b/src/SPC/ConsoleApplication.php @@ -30,7 +30,7 @@ use Symfony\Component\Console\Application; */ final class ConsoleApplication extends Application { - public const VERSION = '2.3.6'; + public const VERSION = '2.3.7'; public function __construct() { diff --git a/src/SPC/store/source/PhpSource.php b/src/SPC/store/source/PhpSource.php index 5c3c5f53..c631fe81 100644 --- a/src/SPC/store/source/PhpSource.php +++ b/src/SPC/store/source/PhpSource.php @@ -21,7 +21,7 @@ class PhpSource extends CustomSourceBase { $major = defined('SPC_BUILD_PHP_VERSION') ? SPC_BUILD_PHP_VERSION : '8.1'; if ($major === '8.4') { - Downloader::downloadSource('php-src', ['type' => 'url', 'url' => 'https://downloads.php.net/~saki/php-8.4.0RC1.tar.xz'], $force); + Downloader::downloadSource('php-src', ['type' => 'url', 'url' => 'https://downloads.php.net/~saki/php-8.4.0RC3.tar.xz'], $force); } else { Downloader::downloadSource('php-src', self::getLatestPHPInfo($major), $force); } diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 8e50e1a9..1064f2d2 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -13,10 +13,10 @@ declare(strict_types=1); // test php version $test_php_version = [ - '8.0', '8.1', '8.2', '8.3', + '8.4', ]; // test os (macos-13, macos-14, ubuntu-latest, windows-latest are available) @@ -34,7 +34,7 @@ $no_strip = false; $upx = false; // prefer downloading pre-built packages to speed up the build process -$prefer_pre_built = true; +$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) { From 73e3480bdfbe879eecf72697b603d736cf24b952 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 2 Nov 2024 21:44:55 +0800 Subject: [PATCH 051/101] Add 8.4 support for switch-php-version command --- src/SPC/command/SwitchPhpVersionCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SPC/command/SwitchPhpVersionCommand.php b/src/SPC/command/SwitchPhpVersionCommand.php index f0f454dd..ab91ed07 100644 --- a/src/SPC/command/SwitchPhpVersionCommand.php +++ b/src/SPC/command/SwitchPhpVersionCommand.php @@ -19,9 +19,9 @@ class SwitchPhpVersionCommand extends BaseCommand $this->addArgument( 'php-major-version', InputArgument::REQUIRED, - 'PHP major version (supported: 7.4, 8.0, 8.1, 8.2, 8.3)', + 'PHP major version (supported: 7.4, 8.0, 8.1, 8.2, 8.3, 8.4)', null, - fn () => ['7.4', '8.0', '8.1', '8.2', '8.3'] + fn () => ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] ); $this->no_motd = true; @@ -31,7 +31,7 @@ class SwitchPhpVersionCommand extends BaseCommand public function handle(): int { $php_ver = $this->input->getArgument('php-major-version'); - if (!in_array($php_ver, ['7.4', '8.0', '8.1', '8.2', '8.3'])) { + if (!in_array($php_ver, ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'])) { // match x.y.z preg_match('/^\d+\.\d+\.\d+$/', $php_ver, $matches); if (!$matches) { From 1fa5514c5736d0885611d32c5dafbef0257e6097 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 2 Nov 2024 21:47:39 +0800 Subject: [PATCH 052/101] 8.4 download imap separately, compatible with 8.1-8.3 --- config/ext.json | 3 +- config/source.json | 12 ++ src/SPC/store/SourcePatcher.php | 13 ++ src/globals/extra/Apache_LICENSE | 201 +++++++++++++++++++++++++++++++ 4 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 src/globals/extra/Apache_LICENSE diff --git a/config/ext.json b/config/ext.json index 2f076f2b..25604c89 100644 --- a/config/ext.json +++ b/config/ext.json @@ -255,7 +255,8 @@ "BSD": "wip" }, "notes": true, - "type": "builtin", + "type": "external", + "source": "ext-imap", "arg-type": "custom", "lib-depends": [ "imap" diff --git a/config/source.json b/config/source.json index 48880c5d..30557c95 100644 --- a/config/source.json +++ b/config/source.json @@ -259,6 +259,18 @@ "path": "LICENSE" } }, + "ext-imap": { + "type": "url", + "url": "https://pecl.php.net/get/imap", + "path": "php-src/ext/imap", + "filename": "imap.tgz", + "license": { + "type": "file", + "path": [ + "LICENSE" + ] + } + }, "inotify": { "type": "url", "url": "https://pecl.php.net/get/inotify", diff --git a/src/SPC/store/SourcePatcher.php b/src/SPC/store/SourcePatcher.php index 86014e7c..f74b1d84 100644 --- a/src/SPC/store/SourcePatcher.php +++ b/src/SPC/store/SourcePatcher.php @@ -25,6 +25,7 @@ class SourcePatcher FileSystem::addSourceExtractHook('pdo_sqlsrv', [SourcePatcher::class, 'patchSQLSRVWin32']); FileSystem::addSourceExtractHook('yaml', [SourcePatcher::class, 'patchYamlWin32']); FileSystem::addSourceExtractHook('libyaml', [SourcePatcher::class, 'patchLibYaml']); + FileSystem::addSourceExtractHook('php-src', [SourcePatcher::class, 'patchImapLicense']); } /** @@ -370,6 +371,18 @@ class SourcePatcher return true; } + /** + * Patch imap license file for PHP < 8.4 + */ + public static function patchImapLicense(): bool + { + if (!file_exists(SOURCE_PATH . '/php-src/ext/imap/LICENSE') && is_dir(SOURCE_PATH . '/php-src/ext/imap')) { + file_put_contents(SOURCE_PATH . '/php-src/ext/imap/LICENSE', file_get_contents(ROOT_DIR . '/src/globals/extra/Apache_LICENSE')); + return true; + } + return false; + } + /** * Patch cli SAPI Makefile for Windows. * diff --git a/src/globals/extra/Apache_LICENSE b/src/globals/extra/Apache_LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/src/globals/extra/Apache_LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 6fa5f75963bbf5eb3aaa7e3bc90035d51295c670 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 3 Nov 2024 01:15:49 +0800 Subject: [PATCH 053/101] Fix imap library build in macOS Sequoia --- src/SPC/builder/macos/library/imap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/builder/macos/library/imap.php b/src/SPC/builder/macos/library/imap.php index 843e0c34..6c2fb359 100644 --- a/src/SPC/builder/macos/library/imap.php +++ b/src/SPC/builder/macos/library/imap.php @@ -56,7 +56,7 @@ class imap extends MacOSLibraryBase ->exec('chmod +x src/osdep/unix/drivers') ->exec('chmod +x src/osdep/unix/mkauths') ->exec( - "yes | make osx {$ssl_options} EXTRACFLAGS='-Wimplicit-function-declaration -Wno-incompatible-function-pointer-types {$out}'" + "echo y | make osx {$ssl_options} EXTRACFLAGS='-Wno-implicit-function-declaration -Wno-incompatible-function-pointer-types {$out}'" ); try { shell() From 12b119e235e5f73e5251367a0edbee18ebccee4b Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 3 Nov 2024 01:17:30 +0800 Subject: [PATCH 054/101] Fix display PHP version when using archive --- src/SPC/builder/BuilderBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/builder/BuilderBase.php b/src/SPC/builder/BuilderBase.php index 5d5f2993..33d187c2 100644 --- a/src/SPC/builder/BuilderBase.php +++ b/src/SPC/builder/BuilderBase.php @@ -276,7 +276,7 @@ abstract class BuilderBase return false; } } - if (preg_match('/php-(\d+\.\d+\.\d+)/', $file, $match)) { + if (preg_match('/php-(\d+\.\d+\.\d+(?:RC\d+)?)\.tar\.(?:gz|bz2|xz)/', $file, $match)) { return $match[1]; } return false; From 2fc61d8e5cd62bb628156a47903c3eb019a41100 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 3 Nov 2024 01:35:29 +0800 Subject: [PATCH 055/101] Remove 8.1-8.3 tests --- src/globals/test-extensions.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 1064f2d2..1ed0d122 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -13,9 +13,6 @@ declare(strict_types=1); // test php version $test_php_version = [ - '8.1', - '8.2', - '8.3', '8.4', ]; From 0d2f6456fbea32954b90732b9072119fc97f6564 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 3 Nov 2024 12:37:00 +0800 Subject: [PATCH 056/101] Change default download php version to 8.3 --- src/SPC/command/DownloadCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/command/DownloadCommand.php b/src/SPC/command/DownloadCommand.php index 7419c60e..80ec6eab 100644 --- a/src/SPC/command/DownloadCommand.php +++ b/src/SPC/command/DownloadCommand.php @@ -30,7 +30,7 @@ class DownloadCommand extends BaseCommand $this->addArgument('sources', InputArgument::REQUIRED, 'The sources will be compiled, comma separated'); $this->addOption('shallow-clone', null, null, 'Clone shallow'); $this->addOption('with-openssl11', null, null, 'Use openssl 1.1'); - $this->addOption('with-php', null, InputOption::VALUE_REQUIRED, 'version in major.minor format (default 8.2)', '8.2'); + $this->addOption('with-php', null, InputOption::VALUE_REQUIRED, 'version in major.minor format (default 8.3)', '8.3'); $this->addOption('clean', null, null, 'Clean old download cache and source before fetch'); $this->addOption('all', 'A', null, 'Fetch all sources that static-php-cli needed'); $this->addOption('custom-url', 'U', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Specify custom source download url, e.g "php-src:https://downloads.php.net/~eric/php-8.3.0beta1.tar.gz"'); From f984516a676192eb5c262ae1d0f0cc0314f49c93 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 3 Nov 2024 12:37:40 +0800 Subject: [PATCH 057/101] Change swoole source to git master instead of pecl (6.0 has not been released) --- config/source.json | 11 ++++++++--- src/globals/ext-tests/swoole.php | 1 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config/source.json b/config/source.json index 30557c95..4b5da3db 100644 --- a/config/source.json +++ b/config/source.json @@ -748,13 +748,18 @@ } }, "swoole": { - "type": "ghtar", "path": "php-src/ext/swoole", - "repo": "swoole/swoole-src", - "prefer-stable": true, + "type": "git", + "rev": "master", + "url": "https://github.com/swoole/swoole-src.git", "license": { "type": "file", "path": "LICENSE" + }, + "alt": { + "type": "ghtar", + "repo": "swoole/swoole-src", + "prefer-stable": true } }, "swow": { diff --git a/src/globals/ext-tests/swoole.php b/src/globals/ext-tests/swoole.php index 9e5752f0..dd539ad4 100644 --- a/src/globals/ext-tests/swoole.php +++ b/src/globals/ext-tests/swoole.php @@ -6,7 +6,6 @@ assert(function_exists('swoole_cpu_num')); assert(function_exists('swoole_string')); assert(class_exists('Swoole\Coroutine')); assert(class_exists('Swoole\Coroutine\Http2\Client')); -assert(class_exists('Swoole\Coroutine\Redis')); assert(class_exists('Swoole\Coroutine\WaitGroup')); assert(class_exists('Swoole\Http2\Request')); assert(constant('SWOOLE_VERSION')); From f6fe902c766421cc84ff56dc2ed3799afc2a3e70 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 3 Nov 2024 12:37:57 +0800 Subject: [PATCH 058/101] Fix sodium build, remove build patches --- src/SPC/builder/extension/sodium.php | 35 ---------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/SPC/builder/extension/sodium.php diff --git a/src/SPC/builder/extension/sodium.php b/src/SPC/builder/extension/sodium.php deleted file mode 100644 index 18059774..00000000 --- a/src/SPC/builder/extension/sodium.php +++ /dev/null @@ -1,35 +0,0 @@ -removeLineContainingString(); - } - - private function removeLineContainingString(): bool - { - $path = SOURCE_PATH . '/php-src/ext/sodium/config.m4'; - $search = '-Wno-logical-op'; - if (!file_exists($path)) { - return false; - } - $content = file_get_contents($path); - $lines = preg_split('/\r\n|\n/', $content); - $filteredLines = array_filter($lines, function ($line) use ($search) { - return strpos($line, $search) === false; - }); - $newContent = implode("\n", $filteredLines); - file_put_contents($path, $newContent); - return true; - } -} From 1186bac49c8e3c77b7e1f311b1122e479a5a0a8c Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 3 Nov 2024 12:38:49 +0800 Subject: [PATCH 059/101] Update README --- README-zh.md | 22 ++++++++++++---------- README.md | 23 +++++++++++++---------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/README-zh.md b/README-zh.md index 3f8c31df..b9f74c81 100755 --- a/README-zh.md +++ b/README-zh.md @@ -82,16 +82,18 @@ static-php-cli(简称 `spc`)有许多特性: > > :x: 不支持 -| PHP Version | Status | Comment | -|-------------|--------------------|------------------------------| -| 7.2 | :x: | | -| 7.3 | :warning: | phpmicro 和许多扩展不支持 7.3、7.4 版本 | -| 7.4 | :warning: | phpmicro 和许多扩展不支持 7.3、7.4 版本 | -| 8.0 | :heavy_check_mark: | PHP 官方已停止 8.0 的维护 | -| 8.1 | :heavy_check_mark: | PHP 官方仅对 8.1 提供安全更新 | -| 8.2 | :heavy_check_mark: | | -| 8.3 | :heavy_check_mark: | | -| 8.4 | :x: | WIP | +| PHP Version | Status | Comment | +|-------------|--------------------|----------------------------------------------| +| 7.2 | :x: | | +| 7.3 | :x: | phpmicro 和许多扩展不支持 7.3、7.4 版本 | +| 7.4 | :x: | phpmicro 和许多扩展不支持 7.3、7.4 版本 | +| 8.0 | :warning: | PHP 官方已停止 8.0 的维护,我们不再处理 8.0 相关的 backport 支持 | +| 8.1 | :heavy_check_mark: | PHP 官方仅对 8.1 提供安全更新 | +| 8.2 | :heavy_check_mark: | | +| 8.3 | :heavy_check_mark: | | +| 8.4 | :heavy_check_mark: | | + +> 这个表格的支持状态是 static-php-cli 对构建对应版本的支持情况,不是 PHP 官方对该版本的支持情况。 ### 支持的扩展 diff --git a/README.md b/README.md index 176d0895..2288b028 100755 --- a/README.md +++ b/README.md @@ -89,16 +89,19 @@ Currently supported PHP versions for compilation: > > :x: not supported -| PHP Version | Status | Comment | -|-------------|--------------------|---------------------------------------------------| -| 7.2 | :x: | | -| 7.3 | :warning: | phpmicro and some extensions not supported on 7.x | -| 7.4 | :warning: | phpmicro and some extensions not supported on 7.x | -| 8.0 | :heavy_check_mark: | PHP official has stopped maintenance of 8.0 | -| 8.1 | :heavy_check_mark: | PHP official has security fixes only | -| 8.2 | :heavy_check_mark: | | -| 8.3 | :heavy_check_mark: | | -| 8.4 | :x: | WIP | +| PHP Version | Status | Comment | +|-------------|--------------------|----------------------------------------------------------------------------------------------------| +| 7.2 | :x: | | +| 7.3 | :x: | phpmicro and some extensions not supported on 7.x | +| 7.4 | :x: | phpmicro and some extensions not supported on 7.x | +| 8.0 | :warning: | PHP official has stopped maintenance of 8.0, we no longer provide backport support for version 8.0 | +| 8.1 | :heavy_check_mark: | PHP official has security fixes only | +| 8.2 | :heavy_check_mark: | | +| 8.3 | :heavy_check_mark: | | +| 8.4 | :heavy_check_mark: | | + +> This table shows the support status for static-php-cli in building the corresponding version, +> not the official PHP support status for that version. ### Supported Extensions From 610fb66b0c8b777c26cb9266d11539939e1c9407 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 3 Nov 2024 13:56:02 +0800 Subject: [PATCH 060/101] Remove --with-zlib-dir that has been removed in 8.4 --- src/SPC/builder/extension/zlib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SPC/builder/extension/zlib.php b/src/SPC/builder/extension/zlib.php index 916ee3a2..a4b8d44b 100644 --- a/src/SPC/builder/extension/zlib.php +++ b/src/SPC/builder/extension/zlib.php @@ -12,6 +12,9 @@ class zlib extends Extension { public function getUnixConfigureArg(): string { + if ($this->builder->getPHPVersionID() >= 80400) { + return '--with-zlib'; + } return '--with-zlib --with-zlib-dir="' . BUILD_ROOT_PATH . '"'; } } From 756bdbf92f82a6466b5b264ca4ab382aef46e8ac Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 3 Nov 2024 13:56:36 +0800 Subject: [PATCH 061/101] Fix imagick build for PHP 8.4 --- src/SPC/store/SourcePatcher.php | 10 +++++++ src/globals/patch/imagick_php84.patch | 40 +++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 src/globals/patch/imagick_php84.patch diff --git a/src/SPC/store/SourcePatcher.php b/src/SPC/store/SourcePatcher.php index f74b1d84..c97ccf8d 100644 --- a/src/SPC/store/SourcePatcher.php +++ b/src/SPC/store/SourcePatcher.php @@ -26,6 +26,7 @@ class SourcePatcher FileSystem::addSourceExtractHook('yaml', [SourcePatcher::class, 'patchYamlWin32']); FileSystem::addSourceExtractHook('libyaml', [SourcePatcher::class, 'patchLibYaml']); FileSystem::addSourceExtractHook('php-src', [SourcePatcher::class, 'patchImapLicense']); + FileSystem::addSourceExtractHook('ext-imagick', [SourcePatcher::class, 'patchImagickWith84']); } /** @@ -383,6 +384,15 @@ class SourcePatcher return false; } + /** + * Patch imagick for PHP 8.4 + */ + public static function patchImagickWith84(): bool + { + SourcePatcher::patchFile('imagick_php84.patch', SOURCE_PATH . '/php-src/ext/imagick'); + return true; + } + /** * Patch cli SAPI Makefile for Windows. * diff --git a/src/globals/patch/imagick_php84.patch b/src/globals/patch/imagick_php84.patch new file mode 100644 index 00000000..8eb98bb1 --- /dev/null +++ b/src/globals/patch/imagick_php84.patch @@ -0,0 +1,40 @@ +From 65e27f2bc02e7e8f1bf64e26e359e42a1331fca1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= +Date: Wed, 25 Sep 2024 10:56:28 +0200 +Subject: [PATCH] Fix removed "php_strtolower" for PHP 8.4 + +--- + imagick.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/imagick.c b/imagick.c +index 1b765389..ebab7ae7 100644 +--- a/imagick.c ++++ b/imagick.c +@@ -610,7 +610,7 @@ static zval *php_imagick_read_property(zend_object *object, zend_string *member, + if (format) { + retval = rv; + ZVAL_STRING(retval, format); +- php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); + IMAGICK_FREE_MAGICK_MEMORY(format); + } else { + retval = rv; +@@ -683,7 +683,7 @@ static zval *php_imagick_read_property(zval *object, zval *member, int type, voi + if (format) { + retval = rv; + ZVAL_STRING(retval, format); +- php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); + IMAGICK_FREE_MAGICK_MEMORY(format); + } else { + retval = rv; +@@ -766,7 +766,7 @@ static zval *php_imagick_read_property(zval *object, zval *member, int type, con + + if (format) { + ZVAL_STRING(retval, format, 1); +- php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); ++ zend_str_tolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); + IMAGICK_FREE_MAGICK_MEMORY(format); + } else { + ZVAL_STRING(retval, "", 1); \ No newline at end of file From 5f69e957ac0c2b275cd7f9e1aceb480d3936932e Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 3 Nov 2024 13:56:48 +0800 Subject: [PATCH 062/101] Add 8.1-8.3 test --- src/globals/test-extensions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 1ed0d122..1064f2d2 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -13,6 +13,9 @@ declare(strict_types=1); // test php version $test_php_version = [ + '8.1', + '8.2', + '8.3', '8.4', ]; From 4f87e01bff9582448cccce0b085509fbc6ce49be Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 5 Nov 2024 11:18:36 +0800 Subject: [PATCH 063/101] Use similar optimize flags for compiling PHP (bump major ver) --- config/env.ini | 2 +- src/SPC/ConsoleApplication.php | 2 +- src/SPC/util/GlobalEnvManager.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/env.ini b/config/env.ini index 948521dd..3d504baf 100644 --- a/config/env.ini +++ b/config/env.ini @@ -94,7 +94,7 @@ SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="${SPC_PHP_DEFAULT_OPTIMIZE_CFLAGS} -fno-ident ; EXTRA_LIBS for `make` php SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="" ; EXTRA_LDFLAGS_PROGRAM for `make` php -SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM="-all-static" +SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM="-all-static -Wl,-O1 -pie" [macos] ; compiler environments diff --git a/src/SPC/ConsoleApplication.php b/src/SPC/ConsoleApplication.php index 6b44013c..0ef842b6 100644 --- a/src/SPC/ConsoleApplication.php +++ b/src/SPC/ConsoleApplication.php @@ -30,7 +30,7 @@ use Symfony\Component\Console\Application; */ final class ConsoleApplication extends Application { - public const VERSION = '2.3.7'; + public const VERSION = '2.4.0'; public function __construct() { diff --git a/src/SPC/util/GlobalEnvManager.php b/src/SPC/util/GlobalEnvManager.php index 9a30f8d0..6c6c9820 100644 --- a/src/SPC/util/GlobalEnvManager.php +++ b/src/SPC/util/GlobalEnvManager.php @@ -41,7 +41,7 @@ class GlobalEnvManager self::putenv('PKG_CONFIG=' . BUILD_BIN_PATH . '/pkg-config'); self::putenv('PKG_CONFIG_PATH=' . BUILD_ROOT_PATH . '/lib/pkgconfig'); if ($builder instanceof BuilderBase) { - self::putenv('SPC_PHP_DEFAULT_OPTIMIZE_CFLAGS=' . ($builder->getOption('no-strip') ? '-g -O0' : '-g -Os')); + self::putenv('SPC_PHP_DEFAULT_OPTIMIZE_CFLAGS=' . ($builder->getOption('no-strip') ? '-g -O0' : '-g -fstack-protector-strong -fpic -fpie -Os -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64')); } } From 219edb6b5969975f1e7376f61c38501ba7730397 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 5 Nov 2024 12:54:53 +0800 Subject: [PATCH 064/101] Add extension matrix tests --- .github/workflows/ext-matrix-tests.yml | 148 +++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 .github/workflows/ext-matrix-tests.yml diff --git a/.github/workflows/ext-matrix-tests.yml b/.github/workflows/ext-matrix-tests.yml new file mode 100644 index 00000000..f8568ad4 --- /dev/null +++ b/.github/workflows/ext-matrix-tests.yml @@ -0,0 +1,148 @@ +name: "Extension matrix tests" + +on: + workflow_dispatch: + pull_request: + branches: [ "main" ] + paths: + - '.github/workflows/ext-matrix-tests.yml' + +jobs: + test: + name: "${{ matrix.extension }} (PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }})" + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + extension: + - amqp + - apcu + - bcmath + - bz2 + - calendar + - ctype + - curl + - dba + - dom + - ds + - event + - exif + - filter + - fileinfo + - ftp + - gd + - gettext + - gmp + - iconv + - igbinary + - imagick + - imap + - intl + - ldap + - mbstring,mbregex + - memcache + - mysqli,mysqlnd,pdo_mysql + - opcache + - openssl + - pcntl + - password-argon2 + - pcntl + - pdo + - pgsql,pdo_pgsql + - phar + - posix + - rar + - protobuf + - readline + - redis + - session + - shmop + - simdjson + - simplexml,xml + - snappy + - soap + - sockets + - sodium + - sqlite3,pdo_sqlite + - sqlsrv + - ssh2 + - swoole + - swoole,swoole-hook-pgsql,swoole-hook-mysql,swoole-hook-sqlite + - swow + - sysvmsg,sysvsem,sysvshm + - tidy + - tokenizer + - uuid + - uv + - xhprof + - xlswriter + - xmlwriter,xmlreader + - xsl + - yac + - yaml + - zip + - zlib + - zstd + php-version: + - "8.4" + operating-system: + - "ubuntu-latest" + #- "macos-13" + #- "debian-arm64-self-hosted" + - "macos-14" + + steps: + - name: "Checkout" + uses: "actions/checkout@v4" + + - name: OS type + id: os-type + run: | + OS="" + if [ "${{ matrix.operating-system }}" = "ubuntu-latest" ]; then + OS="linux-x86_64" + elif [ "${{ matrix.operating-system }}" = "macos-13" ]; then + OS="macos-x86_64" + elif [ "${{ matrix.operating-system }}" = "debian-arm64-self-hosted" ]; then + OS="linux-aarch64" + elif [ "${{ matrix.operating-system }}" = "macos-14" ]; then + OS="macos-aarch64" + fi + echo "OS=$OS" >> $GITHUB_ENV + + - name: "Setup PHP" + uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + tools: pecl, composer + extensions: curl, openssl, mbstring + ini-values: memory_limit=-1 + env: + phpts: nts + + - name: "Install Dependencies" + run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + + - id: cache-download + uses: actions/cache@v4 + with: + path: downloads + key: php-${{ matrix.php-version }}-dependencies-for-tests + + # If there's no dependencies cache, fetch sources + - name: "Download sources" + env: + GITHUB_TOKEN: ${{ secrets.S_GITHUB_TOKEN }} + run: ./bin/spc download --with-php=${{ matrix.php-version }} --for-extensions=${{ matrix.extension }} --debug + + - name: "Build library: ${{ matrix.library }}" + run: | + SPC_USE_SUDO=yes ./bin/spc doctor --auto-fix + if [ "${{ env.OS }}" = "linux-x86_64" ]; then + ./bin/spc install-pkg upx + UPX=--with-upx-pack + elif [ "${{ env.OS }}" = "linux-aarch64" ]; then + ./bin/spc install-pkg upx + UPX=--with-upx-pack + fi + ./bin/spc build --build-cli --build-micro --build-fpm ${{ matrix.extension }} --debug $UPX --with-suggested-libs --with-suggested-exts From 87750c462f3250269571d7e55027413bf8a00fdf Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 5 Nov 2024 12:58:09 +0800 Subject: [PATCH 065/101] Do not cache PHP --- .github/workflows/ext-matrix-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ext-matrix-tests.yml b/.github/workflows/ext-matrix-tests.yml index f8568ad4..4e7bd314 100644 --- a/.github/workflows/ext-matrix-tests.yml +++ b/.github/workflows/ext-matrix-tests.yml @@ -132,8 +132,8 @@ jobs: # If there's no dependencies cache, fetch sources - name: "Download sources" env: - GITHUB_TOKEN: ${{ secrets.S_GITHUB_TOKEN }} - run: ./bin/spc download --with-php=${{ matrix.php-version }} --for-extensions=${{ matrix.extension }} --debug + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./bin/spc download --with-php=${{ matrix.php-version }} --for-extensions=${{ matrix.extension }} --debug --ignore-cache-sources=php-src - name: "Build library: ${{ matrix.library }}" run: | From e269d1ba007e118a044f66e1dc9d6a165bf2dc0b Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Wed, 6 Nov 2024 16:29:17 +0800 Subject: [PATCH 066/101] Fix gettext sanity check --- src/globals/ext-tests/gettext.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/globals/ext-tests/gettext.php b/src/globals/ext-tests/gettext.php index c161d682..a50baa5d 100644 --- a/src/globals/ext-tests/gettext.php +++ b/src/globals/ext-tests/gettext.php @@ -5,7 +5,6 @@ declare(strict_types=1); assert(function_exists('gettext')); assert(function_exists('bindtextdomain')); assert(function_exists('textdomain')); -assert(function_exists('bind_textdomain_codeset')); if (!is_dir('locale/en_US/LC_MESSAGES/')) { mkdir('locale/en_US/LC_MESSAGES/', 0755, true); @@ -19,7 +18,6 @@ setlocale(LC_ALL, 'en_US'); $domain = 'test'; bindtextdomain($domain, 'locale/'); -bind_textdomain_codeset($domain, 'UTF-8'); textdomain($domain); assert(gettext(json_decode('"\u793a\u4f8b"', true)) === 'Example'); From b9584e48ac875abc15e627d5a12090323c8d6f6f Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Wed, 6 Nov 2024 16:45:45 +0800 Subject: [PATCH 067/101] Fix FileSystem remove soft link directory --- src/SPC/store/FileSystem.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SPC/store/FileSystem.php b/src/SPC/store/FileSystem.php index 4b5b32d6..5780a216 100644 --- a/src/SPC/store/FileSystem.php +++ b/src/SPC/store/FileSystem.php @@ -367,6 +367,9 @@ class FileSystem } } } + if (is_link($dir)) { + return unlink($dir); + } return rmdir($dir); } From d2c929cb726e35c5ea2b451bc276ded1363ef1e0 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 9 Nov 2024 17:39:29 +0800 Subject: [PATCH 068/101] Update to RC4 --- src/SPC/store/source/PhpSource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/store/source/PhpSource.php b/src/SPC/store/source/PhpSource.php index c631fe81..c1d8dad4 100644 --- a/src/SPC/store/source/PhpSource.php +++ b/src/SPC/store/source/PhpSource.php @@ -21,7 +21,7 @@ class PhpSource extends CustomSourceBase { $major = defined('SPC_BUILD_PHP_VERSION') ? SPC_BUILD_PHP_VERSION : '8.1'; if ($major === '8.4') { - Downloader::downloadSource('php-src', ['type' => 'url', 'url' => 'https://downloads.php.net/~saki/php-8.4.0RC3.tar.xz'], $force); + Downloader::downloadSource('php-src', ['type' => 'url', 'url' => 'https://downloads.php.net/~calvinb/php-8.4.0RC4.tar.xz'], $force); } else { Downloader::downloadSource('php-src', self::getLatestPHPInfo($major), $force); } From 8c586fe7d9d5539c2e2922c30d954deb292185db Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 22 Nov 2024 15:11:15 +0800 Subject: [PATCH 069/101] Remove RC version for PHP 8.4 --- src/SPC/store/source/PhpSource.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/SPC/store/source/PhpSource.php b/src/SPC/store/source/PhpSource.php index c1d8dad4..d15fd40f 100644 --- a/src/SPC/store/source/PhpSource.php +++ b/src/SPC/store/source/PhpSource.php @@ -19,12 +19,8 @@ class PhpSource extends CustomSourceBase */ public function fetch(bool $force = false, ?array $config = null, int $lock_as = SPC_LOCK_SOURCE): void { - $major = defined('SPC_BUILD_PHP_VERSION') ? SPC_BUILD_PHP_VERSION : '8.1'; - if ($major === '8.4') { - Downloader::downloadSource('php-src', ['type' => 'url', 'url' => 'https://downloads.php.net/~calvinb/php-8.4.0RC4.tar.xz'], $force); - } else { - Downloader::downloadSource('php-src', self::getLatestPHPInfo($major), $force); - } + $major = defined('SPC_BUILD_PHP_VERSION') ? SPC_BUILD_PHP_VERSION : '8.3'; + Downloader::downloadSource('php-src', self::getLatestPHPInfo($major), $force); } /** From e1652a4b36b58c4d96405209d829e84c3ced39d1 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 22 Nov 2024 15:11:20 +0800 Subject: [PATCH 070/101] Sort config --- config/source.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/config/source.json b/config/source.json index 4b5da3db..9b27fae5 100644 --- a/config/source.json +++ b/config/source.json @@ -102,6 +102,18 @@ "path": "LICENSE" } }, + "ext-imap": { + "type": "url", + "url": "https://pecl.php.net/get/imap", + "path": "php-src/ext/imap", + "filename": "imap.tgz", + "license": { + "type": "file", + "path": [ + "LICENSE" + ] + } + }, "ext-memcache": { "type": "url", "url": "https://pecl.php.net/get/memcache", @@ -259,18 +271,6 @@ "path": "LICENSE" } }, - "ext-imap": { - "type": "url", - "url": "https://pecl.php.net/get/imap", - "path": "php-src/ext/imap", - "filename": "imap.tgz", - "license": { - "type": "file", - "path": [ - "LICENSE" - ] - } - }, "inotify": { "type": "url", "url": "https://pecl.php.net/get/inotify", From f04b54bc2a2950c7d6ce74747bef105615b2a10e Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 22 Nov 2024 15:22:57 +0800 Subject: [PATCH 071/101] Update docs --- docs/en/faq/index.md | 8 ++++++++ docs/en/guide/extension-notes.md | 2 +- docs/en/guide/index.md | 2 +- docs/en/guide/manual-build.md | 12 ++++++------ docs/zh/faq/index.md | 8 +++++++- docs/zh/guide/extension-notes.md | 2 +- docs/zh/guide/index.md | 2 +- docs/zh/guide/manual-build.md | 12 ++++++------ 8 files changed, 31 insertions(+), 17 deletions(-) diff --git a/docs/en/faq/index.md b/docs/en/faq/index.md index 05881ca8..7cef18f6 100644 --- a/docs/en/faq/index.md +++ b/docs/en/faq/index.md @@ -84,3 +84,11 @@ For Linux systems, you can download the [cacert.pem](https://curl.se/docs/caextr For the certificate locations of different distros, please refer to [Golang docs](https://go.dev/src/crypto/x509/root_linux.go). > INI configuration `openssl.cafile` cannot be set dynamically using the `ini_set()` function, because `openssl.cafile` is a `PHP_INI_SYSTEM` type configuration and can only be set in the `php.ini` file. + +## Why don't we support older versions of PHP? + +Because older versions of PHP have many problems, such as security issues, performance issues, and functional issues. +In addition, many older versions of PHP are not compatible with the latest dependency libraries, +which is one of the reasons why older versions of PHP are not supported. + +You can use older versions compiled earlier by static-php-cli, such as PHP 8.0, but earlier versions will not be explicitly supported. diff --git a/docs/en/guide/extension-notes.md b/docs/en/guide/extension-notes.md index fc6b170f..5cd4e436 100644 --- a/docs/en/guide/extension-notes.md +++ b/docs/en/guide/extension-notes.md @@ -46,7 +46,7 @@ This extension contains an implementation of the coroutine environment for `pdo_ ## swow -1. Only PHP version >= 8.0 is supported. +1. Only PHP 8.0 ~ 8.3 is supported. ## imap diff --git a/docs/en/guide/index.md b/docs/en/guide/index.md index 41a6b383..6ae37db7 100644 --- a/docs/en/guide/index.md +++ b/docs/en/guide/index.md @@ -36,7 +36,7 @@ Windows currently only supports the x86_64 architecture, and does not support 32 ## Supported PHP Version -Currently, static php cli supports PHP versions 8.0 to 8.3, and theoretically supports PHP 7.4 and earlier versions. +Currently, static php cli supports PHP versions 8.1 to 8.4, and theoretically supports PHP 8.0 and earlier versions. Simply select the earlier version when downloading. However, due to some extensions and special components that have stopped supporting earlier versions of PHP, static-php-cli will not explicitly support earlier versions. diff --git a/docs/en/guide/manual-build.md b/docs/en/guide/manual-build.md index ba023254..74d75118 100644 --- a/docs/en/guide/manual-build.md +++ b/docs/en/guide/manual-build.md @@ -142,9 +142,9 @@ including php-src and the source code of various dependent libraries. # Download all dependencies bin/spc download --all -# Download all dependent packages, and specify the main version of PHP to download, optional: 7.3, 7.4, 8.0, 8.1, 8.2, 8.3 +# Download all dependent packages, and specify the main version of PHP to download, optional: 8.1, 8.2, 8.3, 8.4 # Also supports specific version of php release: 8.3.10, 8.2.22, etc. -bin/spc download --all --with-php=8.2 +bin/spc download --all --with-php=8.3 # Show download progress bar while downloading (curl) bin/spc download --all --debug @@ -272,12 +272,12 @@ If you want to build multiple versions of PHP and don't want to build other depe you can use `switch-php-version` to quickly switch to another version and compile after compiling one version: ```shell -# switch to 8.3 -bin/spc switch-php-version 8.3 +# switch to 8.4 +bin/spc switch-php-version 8.4 # build bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli -# switch to 8.0 -bin/spc switch-php-version 8.0 +# switch to 8.1 +bin/spc switch-php-version 8.1 # build bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli ``` diff --git a/docs/zh/faq/index.md b/docs/zh/faq/index.md index f36313cd..73f64050 100644 --- a/docs/zh/faq/index.md +++ b/docs/zh/faq/index.md @@ -70,4 +70,10 @@ PHP 代码的编译器是完全不同的项目,因此不会考虑额外的情 对于 Linux 系统,你可以从 curl 官方网站下载 [cacert.pem](https://curl.se/docs/caextract.html) 文件,也可以使用系统自带的证书文件。 有关不同发行版的证书位置,可参考 [Go 标准库](https://go.dev/src/crypto/x509/root_linux.go)。 -> INI 配置 `openssl.cafile` 不可以使用 `ini_set()` 函数动态设置,因为 `openssl.cafile` 是一个 `PHP_INI_SYSTEM` 类型的配置,只能在 `php.ini` 文件中设置。 \ No newline at end of file +> INI 配置 `openssl.cafile` 不可以使用 `ini_set()` 函数动态设置,因为 `openssl.cafile` 是一个 `PHP_INI_SYSTEM` 类型的配置,只能在 `php.ini` 文件中设置。 + +## 为什么不支持旧版本 PHP ? + +因为旧版本的 PHP 有很多问题,比如安全问题、性能问题、功能问题等。此外,旧版本的 PHP 很多都无法与最新的依赖库兼容,这也是不支持旧版本 PHP 的原因之一。 + +你可以使用 static-php-cli 早期编译好的旧版本,如 PHP 8.0,但是不会明确支持早期版本。 diff --git a/docs/zh/guide/extension-notes.md b/docs/zh/guide/extension-notes.md index 4fc475e3..cf757d1b 100644 --- a/docs/zh/guide/extension-notes.md +++ b/docs/zh/guide/extension-notes.md @@ -43,7 +43,7 @@ swoole-hook-sqlite 与 `pdo_sqlite` 扩展冲突。如需使用 Swoole 和 `pdo_ ## swow -1. swow 仅支持 PHP >= 8.0 版本。 +1. swow 仅支持 PHP 8.0 ~ 8.3 版本。 ## imap diff --git a/docs/zh/guide/index.md b/docs/zh/guide/index.md index 7fcfafaf..eb0674c3 100644 --- a/docs/zh/guide/index.md +++ b/docs/zh/guide/index.md @@ -29,6 +29,6 @@ Windows 目前只支持 x86_64 架构,不支持 32 位 x86、不支持 arm64 ## PHP 支持版本 -目前,static-php-cli 对 PHP 7.4 ~ 8.3 版本是支持的,对于 PHP 7.4 及更早版本理论上支持,只需下载时选择早期版本即可。 +目前,static-php-cli 对 PHP 8.1 ~ 8.4 版本是支持的,对于 PHP 8.0 及更早版本理论上支持,只需下载时选择早期版本即可。 但由于部分扩展和特殊组件已对早期版本的 PHP 停止了支持,所以 static-php-cli 不会明确支持早期版本。 我们推荐你编译尽可能新的 PHP 版本,以获得更好的体验。 diff --git a/docs/zh/guide/manual-build.md b/docs/zh/guide/manual-build.md index 2e7c17f5..06d26a2c 100644 --- a/docs/zh/guide/manual-build.md +++ b/docs/zh/guide/manual-build.md @@ -141,8 +141,8 @@ bin/spc download --for-extensions="curl,pcntl,xml,mbstring" --prefer-pre-built # 下载所有依赖包 bin/spc download --all -# 下载所有依赖包,并指定下载的 PHP 主版本,可选:7.3,7.4,8.0,8.1,8.2,8.3,也可以使用特定的版本,如 8.3.10。 -bin/spc download --all --with-php=8.2 +# 下载所有依赖包,并指定下载的 PHP 主版本,可选:8.1,8.2,8.3,8.4,也可以使用特定的版本,如 8.3.10。 +bin/spc download --all --with-php=8.3 # 下载时显示下载进度条(curl) bin/spc download --all --debug @@ -236,12 +236,12 @@ bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli 如果你想构建多个版本的 PHP,且不想每次都重复构建其他依赖库,可以使用 `switch-php-version` 在编译好一个版本后快速切换至另一个版本并编译: ```shell -# switch to 8.3 -bin/spc switch-php-version 8.3 +# switch to 8.4 +bin/spc switch-php-version 8.4 # build bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli -# switch to 8.0 -bin/spc switch-php-version 8.0 +# switch to 8.1 +bin/spc switch-php-version 8.1 # build bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli ``` From 1ab464431fdb9c3e35cc9835abde5036cee3d5db Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 22 Nov 2024 15:25:55 +0800 Subject: [PATCH 072/101] Update workflows, add php 8.4 --- .github/workflows/build-linux-arm.yml | 3 ++- .github/workflows/build-linux-x86_64.yml | 3 ++- .github/workflows/build-macos-aarch64.yml | 3 ++- .github/workflows/build-macos-x86_64.yml | 3 ++- .github/workflows/build-windows-x86_64.yml | 1 + .github/workflows/tests.yml | 1 + 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-linux-arm.yml b/.github/workflows/build-linux-arm.yml index cd5acd53..34912f21 100644 --- a/.github/workflows/build-linux-arm.yml +++ b/.github/workflows/build-linux-arm.yml @@ -12,9 +12,10 @@ on: version: required: true description: php version to compile - default: '8.2' + default: '8.3' type: choice options: + - '8.4' - '8.3' - '8.2' - '8.1' diff --git a/.github/workflows/build-linux-x86_64.yml b/.github/workflows/build-linux-x86_64.yml index a637dd7c..8fb28667 100644 --- a/.github/workflows/build-linux-x86_64.yml +++ b/.github/workflows/build-linux-x86_64.yml @@ -6,9 +6,10 @@ on: version: required: true description: php version to compile - default: '8.2' + default: '8.3' type: choice options: + - '8.4' - '8.3' - '8.2' - '8.1' diff --git a/.github/workflows/build-macos-aarch64.yml b/.github/workflows/build-macos-aarch64.yml index 0ffe4bd2..f8d6033f 100644 --- a/.github/workflows/build-macos-aarch64.yml +++ b/.github/workflows/build-macos-aarch64.yml @@ -6,9 +6,10 @@ on: version: required: true description: php version to compile - default: '8.2' + default: '8.3' type: choice options: + - '8.4' - '8.3' - '8.2' - '8.1' diff --git a/.github/workflows/build-macos-x86_64.yml b/.github/workflows/build-macos-x86_64.yml index d02bd09f..205b20c5 100644 --- a/.github/workflows/build-macos-x86_64.yml +++ b/.github/workflows/build-macos-x86_64.yml @@ -6,9 +6,10 @@ on: version: required: true description: php version to compile - default: '8.2' + default: '8.3' type: choice options: + - '8.4' - '8.3' - '8.2' - '8.1' diff --git a/.github/workflows/build-windows-x86_64.yml b/.github/workflows/build-windows-x86_64.yml index 17664851..32b63652 100644 --- a/.github/workflows/build-windows-x86_64.yml +++ b/.github/workflows/build-windows-x86_64.yml @@ -9,6 +9,7 @@ on: default: '8.2' type: choice options: + - '8.4' - '8.3' - '8.2' - '8.1' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bfec641b..6548fb88 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -82,6 +82,7 @@ jobs: - php: '8.1' - php: '8.2' - php: '8.3' + - php: '8.4' steps: - name: "Checkout" From 62b0bf8ecabb339ee4fa8118891d4cc9425d8733 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 23 Nov 2024 11:51:21 +0800 Subject: [PATCH 073/101] Remove PHP 8.1 libxml2 patch --- src/SPC/store/SourcePatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/store/SourcePatcher.php b/src/SPC/store/SourcePatcher.php index c97ccf8d..b4c3b933 100644 --- a/src/SPC/store/SourcePatcher.php +++ b/src/SPC/store/SourcePatcher.php @@ -439,7 +439,7 @@ class SourcePatcher return true; } if ($ver_id < 80200) { - self::patchFile('spc_fix_libxml2_12_php81.patch', SOURCE_PATH . '/php-src'); + // self::patchFile('spc_fix_libxml2_12_php81.patch', SOURCE_PATH . '/php-src'); self::patchFile('spc_fix_alpine_build_php80.patch', SOURCE_PATH . '/php-src'); return true; } From 391555b1f5787d28c9bec28efcdf8ab37e15e25c Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 23 Nov 2024 11:53:08 +0800 Subject: [PATCH 074/101] Update docs --- docs/en/guide/extension-notes.md | 2 +- docs/zh/guide/extension-notes.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/guide/extension-notes.md b/docs/en/guide/extension-notes.md index 5cd4e436..95145653 100644 --- a/docs/en/guide/extension-notes.md +++ b/docs/en/guide/extension-notes.md @@ -46,7 +46,7 @@ This extension contains an implementation of the coroutine environment for `pdo_ ## swow -1. Only PHP 8.0 ~ 8.3 is supported. +1. Only PHP 8.0 ~ 8.4 is supported. ## imap diff --git a/docs/zh/guide/extension-notes.md b/docs/zh/guide/extension-notes.md index cf757d1b..9c5d9296 100644 --- a/docs/zh/guide/extension-notes.md +++ b/docs/zh/guide/extension-notes.md @@ -43,7 +43,7 @@ swoole-hook-sqlite 与 `pdo_sqlite` 扩展冲突。如需使用 Swoole 和 `pdo_ ## swow -1. swow 仅支持 PHP 8.0 ~ 8.3 版本。 +1. swow 仅支持 PHP 8.0 ~ 8.4 版本。 ## imap From a8a071de1a712f13a2731fa507c5ac8d14d4741b Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Mon, 25 Nov 2024 11:03:18 +0000 Subject: [PATCH 075/101] Add missing step --- docs/en/guide/build-on-windows.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/en/guide/build-on-windows.md b/docs/en/guide/build-on-windows.md index b41e4493..e5c0c459 100644 --- a/docs/en/guide/build-on-windows.md +++ b/docs/en/guide/build-on-windows.md @@ -74,6 +74,12 @@ bin/setup-runtime -action add-path bin/setup-runtime -action remove-path ``` +Finally, now that you have PHP and Composer installed, you need to install static-php-cli's Composer dependencies: + +```shell +composer install +``` + ### Install other Tools (automatic) For `php-sdk-binary-tools`, `strawberry-perl`, and `nasm`, From 05b602d38c2f9d17f2fec5e85a5f54781a903766 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 5 Dec 2024 10:30:38 +0800 Subject: [PATCH 076/101] Fix pgsql with PHP 8.4 embed missing libs bug --- src/SPC/ConsoleApplication.php | 2 +- src/SPC/builder/extension/pgsql.php | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/SPC/ConsoleApplication.php b/src/SPC/ConsoleApplication.php index 0ef842b6..cfebb831 100644 --- a/src/SPC/ConsoleApplication.php +++ b/src/SPC/ConsoleApplication.php @@ -30,7 +30,7 @@ use Symfony\Component\Console\Application; */ final class ConsoleApplication extends Application { - public const VERSION = '2.4.0'; + public const VERSION = '2.4.1'; public function __construct() { diff --git a/src/SPC/builder/extension/pgsql.php b/src/SPC/builder/extension/pgsql.php index 8b447a16..1c82d7d0 100644 --- a/src/SPC/builder/extension/pgsql.php +++ b/src/SPC/builder/extension/pgsql.php @@ -6,6 +6,8 @@ namespace SPC\builder\extension; use SPC\builder\Extension; use SPC\exception\FileSystemException; +use SPC\exception\RuntimeException; +use SPC\exception\WrongUsageException; use SPC\store\FileSystem; use SPC\util\CustomExt; @@ -13,10 +15,21 @@ use SPC\util\CustomExt; class pgsql extends Extension { /** + * @return bool * @throws FileSystemException + * @throws RuntimeException + * @throws WrongUsageException */ public function patchBeforeConfigure(): bool { + if ($this->builder->getPHPVersionID() >= 80400) { + FileSystem::replaceFileStr( + SOURCE_PATH . '/php-src/configure', + 'LIBS="-lpq', + 'LIBS="-lpq -lpgport -lpgcommon' + ); + return true; + } FileSystem::replaceFileRegex( SOURCE_PATH . '/php-src/configure', '/-lpq/', @@ -24,4 +37,16 @@ class pgsql extends Extension ); return true; } + + /** + * @throws WrongUsageException + * @throws RuntimeException + */ + public function getUnixConfigureArg(): string + { + if ($this->builder->getPHPVersionID() >= 80400) { + return '--with-pgsql=' . BUILD_ROOT_PATH . ' PGSQL_CFLAGS=-I' . BUILD_INCLUDE_PATH . ' PGSQL_LIBS="-L' . BUILD_LIB_PATH . ' -lpq -lpgport -lpgcommon"'; + } + return '--with-pgsql=' . BUILD_ROOT_PATH; + } } From b9f709c23d0939638942eee87ccdfa18bc44409f Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 5 Dec 2024 10:32:22 +0800 Subject: [PATCH 077/101] Change ext.json for pgsql --- config/ext.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/ext.json b/config/ext.json index 25604c89..85be0b7d 100644 --- a/config/ext.json +++ b/config/ext.json @@ -524,7 +524,7 @@ }, "notes": true, "type": "builtin", - "arg-type": "with-prefix", + "arg-type": "custom", "lib-depends": [ "postgresql" ] From cc088b638224ae0a6d70870f1d6813d3f705627e Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 5 Dec 2024 11:02:36 +0800 Subject: [PATCH 078/101] Let grpc use openssl --- config/lib.json | 3 ++- src/SPC/builder/unix/library/grpc.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/lib.json b/config/lib.json index 565a6112..06b5cd2c 100644 --- a/config/lib.json +++ b/config/lib.json @@ -147,7 +147,8 @@ "libcares.a" ], "lib-depends": [ - "zlib" + "zlib", + "openssl" ], "frameworks": [ "CoreFoundation" diff --git a/src/SPC/builder/unix/library/grpc.php b/src/SPC/builder/unix/library/grpc.php index d0a6678c..ea93139d 100644 --- a/src/SPC/builder/unix/library/grpc.php +++ b/src/SPC/builder/unix/library/grpc.php @@ -11,7 +11,7 @@ trait grpc protected function build(): void { shell()->cd($this->source_dir) - ->exec('EXTRA_DEFINES=GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK CXXFLAGS="-L' . BUILD_LIB_PATH . ' -I' . BUILD_INCLUDE_PATH . '" make static -j' . $this->builder->concurrency); + ->exec('EXTRA_DEFINES=GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK EMBED_OPENSSL=false CXXFLAGS="-L' . BUILD_LIB_PATH . ' -I' . BUILD_INCLUDE_PATH . '" make static -j' . $this->builder->concurrency); copy($this->source_dir . '/libs/opt/libgrpc.a', BUILD_LIB_PATH . '/libgrpc.a'); copy($this->source_dir . '/libs/opt/libboringssl.a', BUILD_LIB_PATH . '/libboringssl.a'); if (!file_exists(BUILD_LIB_PATH . '/libcares.a')) { From 1a0e6ee7174a53b2d60e2bb57f4f995164db1190 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 5 Dec 2024 11:03:16 +0800 Subject: [PATCH 079/101] cs-fix, add tests --- composer.lock | 28 ++++++++++----------- config/source.json | 10 +++++--- src/SPC/builder/extension/pgsql.php | 1 - src/SPC/builder/freebsd/library/openssl.php | 1 + src/SPC/builder/linux/library/libpng.php | 1 + src/SPC/builder/linux/library/libwebp.php | 1 + src/SPC/builder/linux/library/openssl.php | 1 + src/SPC/builder/macos/library/bzip2.php | 1 + src/SPC/builder/macos/library/curl.php | 1 + src/SPC/builder/macos/library/libavif.php | 1 + src/SPC/builder/macos/library/libiconv.php | 1 + src/SPC/builder/macos/library/libpng.php | 1 + src/SPC/builder/macos/library/libwebp.php | 1 + src/SPC/builder/macos/library/nghttp2.php | 1 + src/SPC/builder/macos/library/openssl.php | 1 + src/SPC/builder/macos/library/zlib.php | 1 + src/globals/test-extensions.php | 2 +- 17 files changed, 35 insertions(+), 19 deletions(-) diff --git a/composer.lock b/composer.lock index 3a7b9356..a5378127 100644 --- a/composer.lock +++ b/composer.lock @@ -2529,16 +2529,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.64.0", + "version": "v3.65.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "58dd9c931c785a79739310aef5178928305ffa67" + "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/58dd9c931c785a79739310aef5178928305ffa67", - "reference": "58dd9c931c785a79739310aef5178928305ffa67", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/79d4f3e77b250a7d8043d76c6af8f0695e8a469f", + "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f", "shasum": "" }, "require": { @@ -2548,7 +2548,7 @@ "ext-filter": "*", "ext-json": "*", "ext-tokenizer": "*", - "fidry/cpu-core-counter": "^1.0", + "fidry/cpu-core-counter": "^1.2", "php": "^7.4 || ^8.0", "react/child-process": "^0.6.5", "react/event-loop": "^1.0", @@ -2568,18 +2568,18 @@ "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { - "facile-it/paraunit": "^1.3 || ^2.3", - "infection/infection": "^0.29.5", - "justinrainbow/json-schema": "^5.2", + "facile-it/paraunit": "^1.3.1 || ^2.4", + "infection/infection": "^0.29.8", + "justinrainbow/json-schema": "^5.3 || ^6.0", "keradus/cli-executor": "^2.1", - "mikey179/vfsstream": "^1.6.11", + "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", - "phpunit/phpunit": "^9.6.19 || ^10.5.21 || ^11.2", - "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0", - "symfony/yaml": "^5.4 || ^6.0 || ^7.0" + "phpunit/phpunit": "^9.6.21 || ^10.5.38 || ^11.4.3", + "symfony/var-dumper": "^5.4.47 || ^6.4.15 || ^7.1.8", + "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.1.6" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -2620,7 +2620,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.64.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.65.0" }, "funding": [ { @@ -2628,7 +2628,7 @@ "type": "github" } ], - "time": "2024-08-30T23:09:38+00:00" + "time": "2024-11-25T00:39:24+00:00" }, { "name": "humbug/box", diff --git a/config/source.json b/config/source.json index 9b27fae5..8f9437cc 100644 --- a/config/source.json +++ b/config/source.json @@ -36,9 +36,13 @@ } }, "bzip2": { - "type": "filelist", - "url": "https://sourceware.org/pub/bzip2/", - "regex": "/href=\"(?bzip2-(?[^\"]+)\\.tar\\.gz)\"/", + "alt": { + "type": "filelist", + "url": "https://sourceware.org/pub/bzip2/", + "regex": "/href=\"(?bzip2-(?[^\"]+)\\.tar\\.gz)\"/" + }, + "type": "url", + "url": "https://dl.static-php.dev/static-php-cli/deps/bzip2/bzip2-1.0.8.tar.gz", "provide-pre-built": true, "license": { "type": "text", diff --git a/src/SPC/builder/extension/pgsql.php b/src/SPC/builder/extension/pgsql.php index 1c82d7d0..d159008a 100644 --- a/src/SPC/builder/extension/pgsql.php +++ b/src/SPC/builder/extension/pgsql.php @@ -15,7 +15,6 @@ use SPC\util\CustomExt; class pgsql extends Extension { /** - * @return bool * @throws FileSystemException * @throws RuntimeException * @throws WrongUsageException diff --git a/src/SPC/builder/freebsd/library/openssl.php b/src/SPC/builder/freebsd/library/openssl.php index e525745a..fb029a77 100644 --- a/src/SPC/builder/freebsd/library/openssl.php +++ b/src/SPC/builder/freebsd/library/openssl.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/linux/library/libpng.php b/src/SPC/builder/linux/library/libpng.php index 1946e925..5049a647 100644 --- a/src/SPC/builder/linux/library/libpng.php +++ b/src/SPC/builder/linux/library/libpng.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/linux/library/libwebp.php b/src/SPC/builder/linux/library/libwebp.php index d376e341..8cd3c670 100644 --- a/src/SPC/builder/linux/library/libwebp.php +++ b/src/SPC/builder/linux/library/libwebp.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/linux/library/openssl.php b/src/SPC/builder/linux/library/openssl.php index 46fcd75e..e427bbf9 100644 --- a/src/SPC/builder/linux/library/openssl.php +++ b/src/SPC/builder/linux/library/openssl.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/macos/library/bzip2.php b/src/SPC/builder/macos/library/bzip2.php index bd44e0bc..7719770c 100644 --- a/src/SPC/builder/macos/library/bzip2.php +++ b/src/SPC/builder/macos/library/bzip2.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/macos/library/curl.php b/src/SPC/builder/macos/library/curl.php index 3a24f31a..0555f66e 100644 --- a/src/SPC/builder/macos/library/curl.php +++ b/src/SPC/builder/macos/library/curl.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/macos/library/libavif.php b/src/SPC/builder/macos/library/libavif.php index 74b84b6a..8201c64d 100644 --- a/src/SPC/builder/macos/library/libavif.php +++ b/src/SPC/builder/macos/library/libavif.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/macos/library/libiconv.php b/src/SPC/builder/macos/library/libiconv.php index d5c2b693..945c82e0 100644 --- a/src/SPC/builder/macos/library/libiconv.php +++ b/src/SPC/builder/macos/library/libiconv.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/macos/library/libpng.php b/src/SPC/builder/macos/library/libpng.php index 39522a8c..b61cc898 100644 --- a/src/SPC/builder/macos/library/libpng.php +++ b/src/SPC/builder/macos/library/libpng.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/macos/library/libwebp.php b/src/SPC/builder/macos/library/libwebp.php index 1b2a2ee8..324b5543 100644 --- a/src/SPC/builder/macos/library/libwebp.php +++ b/src/SPC/builder/macos/library/libwebp.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/macos/library/nghttp2.php b/src/SPC/builder/macos/library/nghttp2.php index 09277912..61aceb24 100644 --- a/src/SPC/builder/macos/library/nghttp2.php +++ b/src/SPC/builder/macos/library/nghttp2.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/macos/library/openssl.php b/src/SPC/builder/macos/library/openssl.php index 1e171ef2..54ebe975 100644 --- a/src/SPC/builder/macos/library/openssl.php +++ b/src/SPC/builder/macos/library/openssl.php @@ -1,4 +1,5 @@ * diff --git a/src/SPC/builder/macos/library/zlib.php b/src/SPC/builder/macos/library/zlib.php index 2f451c10..a5c0b2b0 100644 --- a/src/SPC/builder/macos/library/zlib.php +++ b/src/SPC/builder/macos/library/zlib.php @@ -1,4 +1,5 @@ * diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 1064f2d2..49bda62c 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -38,7 +38,7 @@ $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' => 'grpc', + 'Linux', 'Darwin' => 'grpc,openssl', 'Windows' => 'amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,exif,ffi,fileinfo,filter,ftp,gd,iconv,igbinary,libxml,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_sqlite,pdo_sqlsrv,phar,rar,redis,session,shmop,simdjson,simplexml,soap,sockets,sqlite3,sqlsrv,ssh2,swow,sysvshm,tokenizer,xml,xmlreader,xmlwriter,yac,yaml,zip,zlib', }; From 39bc44322e163d607b7ef5b60e8e4c95ad61700b Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 5 Dec 2024 11:04:44 +0800 Subject: [PATCH 080/101] cs-fix --- src/SPC/builder/macos/library/brotli.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SPC/builder/macos/library/brotli.php b/src/SPC/builder/macos/library/brotli.php index 75b68fbc..1061d913 100644 --- a/src/SPC/builder/macos/library/brotli.php +++ b/src/SPC/builder/macos/library/brotli.php @@ -1,4 +1,5 @@ * From fe72b800c6eddc4ad0de4a1d5793b33d334ccdc4 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 5 Dec 2024 11:17:37 +0800 Subject: [PATCH 081/101] Add pgsql tests --- src/globals/test-extensions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 49bda62c..6bf02159 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -38,7 +38,7 @@ $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' => 'grpc,openssl', + 'Linux', 'Darwin' => 'grpc,openssl,pgsql', 'Windows' => 'amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,exif,ffi,fileinfo,filter,ftp,gd,iconv,igbinary,libxml,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_sqlite,pdo_sqlsrv,phar,rar,redis,session,shmop,simdjson,simplexml,soap,sockets,sqlite3,sqlsrv,ssh2,swow,sysvshm,tokenizer,xml,xmlreader,xmlwriter,yac,yaml,zip,zlib', }; From 64258e3513f360139917d8f92b9738dfb177b339 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 5 Dec 2024 18:02:24 +0800 Subject: [PATCH 082/101] Fix pgsql linux builds with PHP 8.4 --- src/SPC/builder/extension/pgsql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/builder/extension/pgsql.php b/src/SPC/builder/extension/pgsql.php index d159008a..51b20a5b 100644 --- a/src/SPC/builder/extension/pgsql.php +++ b/src/SPC/builder/extension/pgsql.php @@ -25,7 +25,7 @@ class pgsql extends Extension FileSystem::replaceFileStr( SOURCE_PATH . '/php-src/configure', 'LIBS="-lpq', - 'LIBS="-lpq -lpgport -lpgcommon' + 'LIBS="-lpq -lpgport -lpgcommon -lssl -lcrypto -lz -lm' ); return true; } From 45bdb6a66b93ce9de726fbfdfb8ea6b9b65f4f3a Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 5 Dec 2024 15:48:09 +0800 Subject: [PATCH 083/101] Add extension configure tests --- .github/workflows/ext-configure-tests.yml | 137 ++++++++++++++++++++++ src/SPC/builder/BuilderBase.php | 9 ++ src/SPC/exception/InterruptException.php | 7 ++ src/globals/functions.php | 6 + tests/configure.php | 13 ++ 5 files changed, 172 insertions(+) create mode 100644 .github/workflows/ext-configure-tests.yml create mode 100644 src/SPC/exception/InterruptException.php create mode 100644 tests/configure.php diff --git a/.github/workflows/ext-configure-tests.yml b/.github/workflows/ext-configure-tests.yml new file mode 100644 index 00000000..cdc7e50e --- /dev/null +++ b/.github/workflows/ext-configure-tests.yml @@ -0,0 +1,137 @@ +name: "Extension configure tests" + +on: + workflow_dispatch: + pull_request: + branches: [ "main" ] + paths: + - '.github/workflows/ext-matrix-tests.yml' + +jobs: + test: + name: "${{ matrix.extension }} (PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }})" + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + extension: + - apcu + - bcmath + - bz2 + - calendar + - ctype + - curl + - dba + - dom + - exif + - fileinfo + - filter + - ftp + - gd + - gmp + - gettext + - iconv + - igbinary + - imagick + - intl + - ldap + - mbregex + - mbstring + - mysqli + - mysqlnd + - opcache + - openssl + - parallel + - pcntl + - pdo + - pdo_mysql + - pdo_pgsql + - pdo_sqlite + - pgsql + - phar + - posix + - protobuf + - readline + - redis + - session + - shmop + - simplexml + - soap + - sockets + - sodium + - sqlite3 + - ssh2 + - sysvmsg + - sysvsem + - sysvshm + - tidy + - tokenizer + - xlswriter + - xml + - xmlreader + - xmlwriter + - zip + - zlib + - yaml + - zstd + php-version: + - "8.4" + operating-system: + - "ubuntu-latest" + + steps: + - name: "Checkout" + uses: "actions/checkout@v4" + + - name: OS type + id: os-type + run: | + OS="" + if [ "${{ matrix.operating-system }}" = "ubuntu-latest" ]; then + OS="linux-x86_64" + elif [ "${{ matrix.operating-system }}" = "macos-13" ]; then + OS="macos-x86_64" + elif [ "${{ matrix.operating-system }}" = "debian-arm64-self-hosted" ]; then + OS="linux-aarch64" + elif [ "${{ matrix.operating-system }}" = "macos-14" ]; then + OS="macos-aarch64" + fi + echo "OS=$OS" >> $GITHUB_ENV + + - name: "Setup PHP" + uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + tools: pecl, composer + extensions: curl, openssl, mbstring + ini-values: memory_limit=-1 + env: + phpts: nts + + - name: "Install Dependencies" + run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + + - id: cache-download + uses: actions/cache@v4 + with: + path: downloads + key: php-${{ matrix.php-version }}-dependencies-for-tests + + # If there's no dependencies cache, fetch sources + - name: "Download sources" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./bin/spc download --with-php=${{ matrix.php-version }} --for-extensions=${{ matrix.extension }} --debug --ignore-cache-sources=php-src + + - name: "Build library: ${{ matrix.library }}" + run: | + SPC_USE_SUDO=yes ./bin/spc doctor --auto-fix + if [ "${{ env.OS }}" = "linux-x86_64" ]; then + ./bin/spc install-pkg upx + UPX=--with-upx-pack + elif [ "${{ env.OS }}" = "linux-aarch64" ]; then + ./bin/spc install-pkg upx + UPX=--with-upx-pack + fi + + ./bin/spc build --build-cli --build-micro ${{ matrix.extension }} -P tests/configure.php diff --git a/src/SPC/builder/BuilderBase.php b/src/SPC/builder/BuilderBase.php index 33d187c2..8fba69cf 100644 --- a/src/SPC/builder/BuilderBase.php +++ b/src/SPC/builder/BuilderBase.php @@ -6,6 +6,7 @@ namespace SPC\builder; use SPC\exception\ExceptionHandler; use SPC\exception\FileSystemException; +use SPC\exception\InterruptException; use SPC\exception\RuntimeException; use SPC\exception\WrongUsageException; use SPC\store\Config; @@ -407,6 +408,13 @@ abstract class BuilderBase } logger()->debug('Running additional patch script: ' . $patch); require $patch; + } catch (InterruptException $e) { + if ($e->getCode() === 0) { + logger()->notice('Patch script ' . $patch . ' interrupted' . ($e->getMessage() ? (': ' . $e->getMessage()) : '.')); + } else { + logger()->error('Patch script ' . $patch . ' interrupted with error code [' . $e->getCode() . ']' . ($e->getMessage() ? (': ' . $e->getMessage()) : '.')); + } + exit($e->getCode()); } catch (\Throwable $e) { logger()->critical('Patch script ' . $patch . ' failed to run.'); if ($this->getOption('debug')) { @@ -414,6 +422,7 @@ abstract class BuilderBase } else { logger()->critical('Please check with --debug option to see more details.'); } + exit(1); } } } diff --git a/src/SPC/exception/InterruptException.php b/src/SPC/exception/InterruptException.php new file mode 100644 index 00000000..b004f47f --- /dev/null +++ b/src/SPC/exception/InterruptException.php @@ -0,0 +1,7 @@ +getPatchPoint(); } +function patch_point_interrupt(int $retcode, string $msg = ''): InterruptException +{ + return new InterruptException(message: $msg, code: $retcode); +} + // ------- function f_* part ------- // f_ means standard function wrapper diff --git a/tests/configure.php b/tests/configure.php new file mode 100644 index 00000000..6811b631 --- /dev/null +++ b/tests/configure.php @@ -0,0 +1,13 @@ + Date: Thu, 5 Dec 2024 15:49:18 +0800 Subject: [PATCH 084/101] Add extension configure tests --- .github/workflows/ext-configure-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ext-configure-tests.yml b/.github/workflows/ext-configure-tests.yml index cdc7e50e..33d39931 100644 --- a/.github/workflows/ext-configure-tests.yml +++ b/.github/workflows/ext-configure-tests.yml @@ -5,7 +5,7 @@ on: pull_request: branches: [ "main" ] paths: - - '.github/workflows/ext-matrix-tests.yml' + - '.github/workflows/ext-configure-tests.yml' jobs: test: From 3659e20b0d78959d01577becede518018dcfad26 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 5 Dec 2024 15:52:59 +0800 Subject: [PATCH 085/101] Fix patch point tests --- src/SPC/builder/BuilderBase.php | 2 +- tests/SPC/builder/BuilderTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SPC/builder/BuilderBase.php b/src/SPC/builder/BuilderBase.php index 8fba69cf..b61a10e5 100644 --- a/src/SPC/builder/BuilderBase.php +++ b/src/SPC/builder/BuilderBase.php @@ -422,7 +422,7 @@ abstract class BuilderBase } else { logger()->critical('Please check with --debug option to see more details.'); } - exit(1); + throw $e; } } } diff --git a/tests/SPC/builder/BuilderTest.php b/tests/SPC/builder/BuilderTest.php index fe46b785..5796f5df 100644 --- a/tests/SPC/builder/BuilderTest.php +++ b/tests/SPC/builder/BuilderTest.php @@ -246,6 +246,7 @@ class BuilderTest extends TestCase public function testEmitPatchPointNotExists() { $this->expectOutputRegex('/failed to run/'); + $this->expectException(RuntimeException::class); $this->builder->setOption('with-added-patch', ['/tmp/patch-point.not_exsssists.php']); $this->builder->emitPatchPoint('not-exists'); } From 3ce24da15ce4c51a1dba6984c2cb04bc7f96d34b Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 5 Dec 2024 16:59:22 +0800 Subject: [PATCH 086/101] Fix patch point tests --- .github/workflows/ext-configure-tests.yml | 70 ++--------------------- 1 file changed, 5 insertions(+), 65 deletions(-) diff --git a/.github/workflows/ext-configure-tests.yml b/.github/workflows/ext-configure-tests.yml index 33d39931..d1f629ec 100644 --- a/.github/workflows/ext-configure-tests.yml +++ b/.github/workflows/ext-configure-tests.yml @@ -15,69 +15,17 @@ jobs: fail-fast: false matrix: extension: - - apcu - - bcmath - - bz2 - - calendar - - ctype - - curl - - dba - - dom - - exif - - fileinfo - - filter - - ftp - - gd - - gmp - - gettext - - iconv - - igbinary - - imagick - - intl - - ldap - - mbregex - - mbstring - - mysqli - - mysqlnd - - opcache - - openssl - parallel - - pcntl - - pdo - - pdo_mysql - pdo_pgsql - - pdo_sqlite - pgsql - - phar - - posix - - protobuf - - readline - - redis - - session - - shmop - - simplexml - - soap - - sockets - - sodium - - sqlite3 - - ssh2 - - sysvmsg - - sysvsem - - sysvshm - - tidy - - tokenizer - - xlswriter - - xml - - xmlreader - - xmlwriter - - zip - - zlib - - yaml - - zstd php-version: - "8.4" + - "8.3" + - "8.2" + - "8.1" operating-system: - "ubuntu-latest" + - "macos-14" steps: - name: "Checkout" @@ -126,12 +74,4 @@ jobs: - name: "Build library: ${{ matrix.library }}" run: | SPC_USE_SUDO=yes ./bin/spc doctor --auto-fix - if [ "${{ env.OS }}" = "linux-x86_64" ]; then - ./bin/spc install-pkg upx - UPX=--with-upx-pack - elif [ "${{ env.OS }}" = "linux-aarch64" ]; then - ./bin/spc install-pkg upx - UPX=--with-upx-pack - fi - - ./bin/spc build --build-cli --build-micro ${{ matrix.extension }} -P tests/configure.php + ./bin/spc build --build-cli --build-micro ${{ matrix.extension }} -P tests/configure.php --debug --enable-zts From bc7dba6125d4092d427a9e7df6239fb04548bbc4 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 5 Dec 2024 18:43:31 +0800 Subject: [PATCH 087/101] Fix parallel config.m4 --- .github/workflows/ext-configure-tests.yml | 77 ----------------------- src/SPC/builder/extension/parallel.php | 7 +++ src/globals/test-extensions.php | 4 +- tests/configure.php | 13 ---- 4 files changed, 9 insertions(+), 92 deletions(-) delete mode 100644 .github/workflows/ext-configure-tests.yml delete mode 100644 tests/configure.php diff --git a/.github/workflows/ext-configure-tests.yml b/.github/workflows/ext-configure-tests.yml deleted file mode 100644 index d1f629ec..00000000 --- a/.github/workflows/ext-configure-tests.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: "Extension configure tests" - -on: - workflow_dispatch: - pull_request: - branches: [ "main" ] - paths: - - '.github/workflows/ext-configure-tests.yml' - -jobs: - test: - name: "${{ matrix.extension }} (PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }})" - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - extension: - - parallel - - pdo_pgsql - - pgsql - php-version: - - "8.4" - - "8.3" - - "8.2" - - "8.1" - operating-system: - - "ubuntu-latest" - - "macos-14" - - steps: - - name: "Checkout" - uses: "actions/checkout@v4" - - - name: OS type - id: os-type - run: | - OS="" - if [ "${{ matrix.operating-system }}" = "ubuntu-latest" ]; then - OS="linux-x86_64" - elif [ "${{ matrix.operating-system }}" = "macos-13" ]; then - OS="macos-x86_64" - elif [ "${{ matrix.operating-system }}" = "debian-arm64-self-hosted" ]; then - OS="linux-aarch64" - elif [ "${{ matrix.operating-system }}" = "macos-14" ]; then - OS="macos-aarch64" - fi - echo "OS=$OS" >> $GITHUB_ENV - - - name: "Setup PHP" - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - tools: pecl, composer - extensions: curl, openssl, mbstring - ini-values: memory_limit=-1 - env: - phpts: nts - - - name: "Install Dependencies" - run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - - - id: cache-download - uses: actions/cache@v4 - with: - path: downloads - key: php-${{ matrix.php-version }}-dependencies-for-tests - - # If there's no dependencies cache, fetch sources - - name: "Download sources" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./bin/spc download --with-php=${{ matrix.php-version }} --for-extensions=${{ matrix.extension }} --debug --ignore-cache-sources=php-src - - - name: "Build library: ${{ matrix.library }}" - run: | - SPC_USE_SUDO=yes ./bin/spc doctor --auto-fix - ./bin/spc build --build-cli --build-micro ${{ matrix.extension }} -P tests/configure.php --debug --enable-zts diff --git a/src/SPC/builder/extension/parallel.php b/src/SPC/builder/extension/parallel.php index f50dffb2..de4e5d88 100644 --- a/src/SPC/builder/extension/parallel.php +++ b/src/SPC/builder/extension/parallel.php @@ -6,6 +6,7 @@ namespace SPC\builder\extension; use SPC\builder\Extension; use SPC\exception\WrongUsageException; +use SPC\store\FileSystem; use SPC\util\CustomExt; #[CustomExt('parallel')] @@ -17,4 +18,10 @@ class parallel extends Extension throw new WrongUsageException('ext-parallel must be built with ZTS builds. Use "--enable-zts" option!'); } } + + public function patchBeforeBuildconf(): bool + { + FileSystem::replaceFileRegex(SOURCE_PATH . '/php-src/ext/parallel/config.m4', '/PHP_VERSION=.*/m', ''); + return true; + } } diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 6bf02159..a08ebc7f 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -26,7 +26,7 @@ $test_os = [ ]; // whether enable thread safe -$zts = false; +$zts = true; $no_strip = false; @@ -38,7 +38,7 @@ $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' => 'grpc,openssl,pgsql', + 'Linux', 'Darwin' => 'parallel', 'Windows' => 'amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,exif,ffi,fileinfo,filter,ftp,gd,iconv,igbinary,libxml,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_sqlite,pdo_sqlsrv,phar,rar,redis,session,shmop,simdjson,simplexml,soap,sockets,sqlite3,sqlsrv,ssh2,swow,sysvshm,tokenizer,xml,xmlreader,xmlwriter,yac,yaml,zip,zlib', }; diff --git a/tests/configure.php b/tests/configure.php deleted file mode 100644 index 6811b631..00000000 --- a/tests/configure.php +++ /dev/null @@ -1,13 +0,0 @@ - Date: Fri, 6 Dec 2024 13:07:52 +0800 Subject: [PATCH 088/101] Update build-macos-x86_64.yml --- .github/workflows/build-macos-x86_64.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos-x86_64.yml b/.github/workflows/build-macos-x86_64.yml index 205b20c5..619bbe6f 100644 --- a/.github/workflows/build-macos-x86_64.yml +++ b/.github/workflows/build-macos-x86_64.yml @@ -13,8 +13,6 @@ on: - '8.3' - '8.2' - '8.1' - - '8.0' - - '7.4' build-cli: description: build cli binary default: true @@ -36,6 +34,10 @@ on: debug: description: enable debug logs type: boolean + no-strip: + description: keep debug symbols for debugging + type: boolean + default: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -88,6 +90,8 @@ jobs: run: echo "SPC_BUILD_DEBUG=--debug" >> $GITHUB_ENV - if: inputs.prefer-pre-built == true run: echo "SPC_PRE_BUILT=--prefer-pre-built" >> $env:GITHUB_ENV + - if: inputs.no-strip == true + run: echo "SPC_NO_STRIP=--no-strip" >> $env:GITHUB_ENV # With target select: cli, micro or both - if: ${{ inputs.build-cli == true }} @@ -99,10 +103,10 @@ jobs: # If there's no dependencies cache, fetch sources, with or without debug - if: steps.cache-download.outputs.cache-hit != 'true' - run: ./bin/spc download --with-php=${{ inputs.version }} --for-extensions=${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_PRE_BUILT }} + run: ./bin/spc download --with-php=${{ inputs.version }} --for-extensions=${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_PRE_BUILT }} --ignore-cache-sources=php-src # Run build command - - run: ./bin/spc build ${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }} + - run: ./bin/spc build ${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_NO_STRIP }} ${{ env.SPC_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }} # Upload cli executable - if: ${{ inputs.build-cli == true }} From cf37e16e387832983cef1b7ecd4207ae33318f05 Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Fri, 6 Dec 2024 13:13:50 +0800 Subject: [PATCH 089/101] Update build-macos-x86_64.yml --- .github/workflows/build-macos-x86_64.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos-x86_64.yml b/.github/workflows/build-macos-x86_64.yml index 619bbe6f..488f7f3e 100644 --- a/.github/workflows/build-macos-x86_64.yml +++ b/.github/workflows/build-macos-x86_64.yml @@ -83,7 +83,7 @@ jobs: uses: actions/cache@v4 with: path: downloads - key: php-${{ env.INPUT_HASH }} + key: php-${{ inputs.version }}-macos-x86_64 # With or without debug - if: inputs.debug == true @@ -102,8 +102,7 @@ jobs: run: echo "SPC_BUILD_FPM=--build-fpm" >> $GITHUB_ENV # If there's no dependencies cache, fetch sources, with or without debug - - if: steps.cache-download.outputs.cache-hit != 'true' - run: ./bin/spc download --with-php=${{ inputs.version }} --for-extensions=${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_PRE_BUILT }} --ignore-cache-sources=php-src + - run: ./bin/spc download --with-php=${{ inputs.version }} --for-extensions=${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_PRE_BUILT }} --ignore-cache-sources=php-src # Run build command - run: ./bin/spc build ${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_NO_STRIP }} ${{ env.SPC_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }} From fdc4a907c763bbe09bf7ff43f36098587c4f1452 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 9 Dec 2024 21:38:28 +0800 Subject: [PATCH 090/101] Fix pgsql missing symbol --- src/SPC/builder/extension/pgsql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/builder/extension/pgsql.php b/src/SPC/builder/extension/pgsql.php index 51b20a5b..ff0c5a6e 100644 --- a/src/SPC/builder/extension/pgsql.php +++ b/src/SPC/builder/extension/pgsql.php @@ -44,7 +44,7 @@ class pgsql extends Extension public function getUnixConfigureArg(): string { if ($this->builder->getPHPVersionID() >= 80400) { - return '--with-pgsql=' . BUILD_ROOT_PATH . ' PGSQL_CFLAGS=-I' . BUILD_INCLUDE_PATH . ' PGSQL_LIBS="-L' . BUILD_LIB_PATH . ' -lpq -lpgport -lpgcommon"'; + return '--with-pgsql PGSQL_CFLAGS=-I' . BUILD_INCLUDE_PATH . ' PGSQL_LIBS="-L' . BUILD_LIB_PATH . ' -lpq -lpgport -lpgcommon"'; } return '--with-pgsql=' . BUILD_ROOT_PATH; } From f433866671a3223cd9d25d6cd5df2aa713627603 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 10 Dec 2024 23:06:47 +0800 Subject: [PATCH 091/101] Add embed spc-config output instead of php-config --- src/SPC/util/SPCConfigUtil.php | 104 +++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 src/SPC/util/SPCConfigUtil.php diff --git a/src/SPC/util/SPCConfigUtil.php b/src/SPC/util/SPCConfigUtil.php new file mode 100644 index 00000000..1e60aa5a --- /dev/null +++ b/src/SPC/util/SPCConfigUtil.php @@ -0,0 +1,104 @@ +builder = BuilderProvider::makeBuilderByInput($input ?? new ArgvInput()); + } + } + + public function config(array $extensions = [], array $libraries = [], bool $include_suggest_ext = false, bool $include_suggest_lib = false): array + { + [$extensions, $libraries] = DependencyUtil::getExtsAndLibs($extensions, $libraries, $include_suggest_ext, $include_suggest_lib); + + ob_start(); + $this->builder->proveLibs($libraries); + $this->builder->proveExts($extensions); + ob_get_clean(); + $ldflags = $this->getLdflagsString(); + $libs = $this->getLibsString($libraries); + $cflags = $this->getIncludesString(); + + // embed + $libs = '-lphp -lc ' . $libs; + $extra_env = getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS'); + if (is_string($extra_env)) { + $libs .= ' ' . $extra_env; + } + // c++ + if ($this->builder->hasCpp()) { + $libs .= $this->builder instanceof MacOSBuilder ? ' -lc++' : ' -lstdc++'; + } + return [ + 'cflags' => $cflags, + 'ldflags' => $ldflags, + 'libs' => $libs, + ]; + } + + private function getIncludesString(): string + { + $base = BUILD_INCLUDE_PATH; + $php_embed_includes = [ + "-I{$base}", + "-I{$base}/php", + "-I{$base}/php/main", + "-I{$base}/php/TSRM", + "-I{$base}/php/Zend", + "-I{$base}/php/ext", + ]; + return implode(' ', $php_embed_includes); + } + + private function getLdflagsString(): string + { + return '-L' . BUILD_LIB_PATH; + } + + private function getLibsString(array $libraries): string + { + $short_name = []; + foreach (array_reverse($libraries) as $library) { + $libs = Config::getLib($library, 'static-libs', []); + foreach ($libs as $lib) { + $short_name[] = $this->getShortLibName($lib); + } + if (PHP_OS_FAMILY !== 'Darwin') { + continue; + } + foreach (Config::getLib($library, 'frameworks', []) as $fw) { + $ks = '-framework ' . $fw; + if (!in_array($ks, $short_name)) { + $short_name[] = $ks; + } + } + } + // patch: imagick (imagemagick wrapper) for linux needs -lgomp + if (in_array('imagemagick', $libraries) && PHP_OS_FAMILY === 'Linux') { + $short_name[] = '-lgomp'; + } + return implode(' ', $short_name); + } + + private function getShortLibName(string $lib): string + { + if (!str_starts_with($lib, 'lib') || !str_ends_with($lib, '.a')) { + return BUILD_LIB_PATH . '/' . $lib; + } + // get short name + return '-l' . substr($lib, 3, -2); + } +} From c4b9660cd7507d4f8ecd4c5fef5173f4b8ed4cf7 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 10 Dec 2024 23:08:01 +0800 Subject: [PATCH 092/101] Add embed sanity check --- src/SPC/builder/BuilderBase.php | 9 ++++++- src/SPC/builder/unix/UnixBuilderBase.php | 28 ++++++++++++++++++++++ src/SPC/builder/windows/WindowsBuilder.php | 1 + src/SPC/util/UnixShell.php | 3 +++ src/globals/common-tests/embed.c | 17 +++++++++++++ src/globals/common-tests/embed.php | 4 ++++ 6 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 src/globals/common-tests/embed.c create mode 100644 src/globals/common-tests/embed.php diff --git a/src/SPC/builder/BuilderBase.php b/src/SPC/builder/BuilderBase.php index b61a10e5..0456af8b 100644 --- a/src/SPC/builder/BuilderBase.php +++ b/src/SPC/builder/BuilderBase.php @@ -25,6 +25,12 @@ abstract class BuilderBase /** @var array extensions */ protected array $exts = []; + /** @var array extension names */ + protected array $ext_list = []; + + /** @var array library names */ + protected array $lib_list = []; + /** @var bool compile libs only (just mark it) */ protected bool $libs_only = false; @@ -161,7 +167,7 @@ abstract class BuilderBase * @throws FileSystemException * @throws RuntimeException * @throws \ReflectionException - * @throws WrongUsageException + * @throws \Throwable|WrongUsageException * @internal */ public function proveExts(array $extensions, bool $skip_check_deps = false): void @@ -191,6 +197,7 @@ abstract class BuilderBase foreach ($this->exts as $ext) { $ext->checkDependency(); } + $this->ext_list = $extensions; } /** diff --git a/src/SPC/builder/unix/UnixBuilderBase.php b/src/SPC/builder/unix/UnixBuilderBase.php index 3ec21f06..347e1f16 100644 --- a/src/SPC/builder/unix/UnixBuilderBase.php +++ b/src/SPC/builder/unix/UnixBuilderBase.php @@ -12,6 +12,7 @@ use SPC\exception\WrongUsageException; use SPC\store\Config; use SPC\store\FileSystem; use SPC\util\DependencyUtil; +use SPC\util\SPCConfigUtil; abstract class UnixBuilderBase extends BuilderBase { @@ -128,6 +129,7 @@ abstract class UnixBuilderBase extends BuilderBase foreach ($this->libs as $lib) { $lib->calcDependency(); } + $this->lib_list = $sorted_libraries; } /** @@ -170,6 +172,32 @@ abstract class UnixBuilderBase extends BuilderBase } } } + + // sanity check for embed + if (($build_target & BUILD_TARGET_EMBED) === BUILD_TARGET_EMBED) { + logger()->info('running embed sanity check'); + $sample_file_path = SOURCE_PATH . '/embed-test'; + if (!is_dir($sample_file_path)) { + @mkdir($sample_file_path); + } + // copy embed test files + copy(ROOT_DIR . '/src/globals/common-tests/embed.c', $sample_file_path . '/embed.c'); + copy(ROOT_DIR . '/src/globals/common-tests/embed.php', $sample_file_path . '/embed.php'); + $util = new SPCConfigUtil($this); + $config = $util->config($this->ext_list, $this->lib_list, $this->getOption('with-suggested-exts'), $this->getOption('with-suggested-libs')); + $lens = "{$config['cflags']} {$config['ldflags']} {$config['libs']}"; + if (PHP_OS_FAMILY === 'Linux') { + $lens .= ' -static'; + } + [$ret, $out] = shell()->cd($sample_file_path)->execWithResult(getenv('CC') . ' -o embed embed.c ' . $lens); + if ($ret !== 0) { + throw new RuntimeException('embed failed sanity check: build failed. Error message: ' . implode("\n", $out)); + } + [$ret, $output] = shell()->cd($sample_file_path)->execWithResult('./embed'); + if ($ret !== 0 || trim(implode('', $output)) !== 'hello') { + throw new RuntimeException('embed failed sanity check: run failed. Error message: ' . implode("\n", $output)); + } + } } /** diff --git a/src/SPC/builder/windows/WindowsBuilder.php b/src/SPC/builder/windows/WindowsBuilder.php index bd391abb..46b8ac48 100644 --- a/src/SPC/builder/windows/WindowsBuilder.php +++ b/src/SPC/builder/windows/WindowsBuilder.php @@ -248,6 +248,7 @@ class WindowsBuilder extends BuilderBase foreach ($this->libs as $lib) { $lib->calcDependency(); } + $this->lib_list = $sorted_libraries; } /** diff --git a/src/SPC/util/UnixShell.php b/src/SPC/util/UnixShell.php index 16ae3f8c..44e97bfe 100644 --- a/src/SPC/util/UnixShell.php +++ b/src/SPC/util/UnixShell.php @@ -62,6 +62,9 @@ class UnixShell logger()->debug(ConsoleColor::blue('[EXEC] ') . ConsoleColor::gray($cmd)); } logger()->debug('Executed at: ' . debug_backtrace()[0]['file'] . ':' . debug_backtrace()[0]['line']); + if ($this->cd !== null) { + $cmd = 'cd ' . escapeshellarg($this->cd) . ' && ' . $cmd; + } exec($cmd, $out, $code); return [$code, $out]; } diff --git a/src/globals/common-tests/embed.c b/src/globals/common-tests/embed.c new file mode 100644 index 00000000..85c29921 --- /dev/null +++ b/src/globals/common-tests/embed.c @@ -0,0 +1,17 @@ +#include + +int main(int argc,char **argv){ + + PHP_EMBED_START_BLOCK(argc,argv) + + zend_file_handle file_handle; + + zend_stream_init_filename(&file_handle,"embed.php"); + + if(php_execute_script(&file_handle) == FAILURE){ + php_printf("Failed to execute PHP script.\n"); + } + + PHP_EMBED_END_BLOCK() + return 0; +} \ No newline at end of file diff --git a/src/globals/common-tests/embed.php b/src/globals/common-tests/embed.php new file mode 100644 index 00000000..aa1d7e41 --- /dev/null +++ b/src/globals/common-tests/embed.php @@ -0,0 +1,4 @@ + Date: Tue, 10 Dec 2024 23:08:11 +0800 Subject: [PATCH 093/101] Add spc-config command --- src/SPC/command/SPCConfigCommand.php | 53 ++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/SPC/command/SPCConfigCommand.php diff --git a/src/SPC/command/SPCConfigCommand.php b/src/SPC/command/SPCConfigCommand.php new file mode 100644 index 00000000..0377ace9 --- /dev/null +++ b/src/SPC/command/SPCConfigCommand.php @@ -0,0 +1,53 @@ +addArgument('extensions', InputArgument::OPTIONAL, 'The extensions will be compiled, comma separated'); + $this->addOption('with-libs', null, InputOption::VALUE_REQUIRED, 'add additional libraries, comma separated', ''); + $this->addOption('with-suggested-libs', 'L', null, 'Build with suggested libs for selected exts and libs'); + $this->addOption('with-suggested-exts', 'E', null, 'Build with suggested extensions for selected exts'); + $this->addOption('includes', null, null, 'Add additional include path'); + $this->addOption('libs', null, null, 'Add additional libs path'); + } + + /** + * @throws RuntimeException + */ + public function handle(): int + { + // transform string to array + $libraries = array_map('trim', array_filter(explode(',', $this->getOption('with-libs')))); + // transform string to array + $extensions = $this->getArgument('extensions') ? $this->parseExtensionList($this->getArgument('extensions')) : []; + $include_suggest_ext = $this->getOption('with-suggested-exts'); + $include_suggest_lib = $this->getOption('with-suggested-libs'); + + $util = new SPCConfigUtil(null, $this->input); + $config = $util->config($extensions, $libraries, $include_suggest_ext, $include_suggest_lib); + + if ($this->getOption('includes')) { + $this->output->writeln($config['cflags']); + } elseif ($this->getOption('libs')) { + $this->output->writeln("{$config['ldflags']} {$config['libs']}"); + } else { + $this->output->writeln("{$config['cflags']} {$config['ldflags']} {$config['libs']}"); + } + + return 0; + } +} From 955c367a47e377ab6959b7f972432173fad7c360 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 10 Dec 2024 23:08:23 +0800 Subject: [PATCH 094/101] Fix pgsql embed builds --- src/SPC/builder/extension/pgsql.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/SPC/builder/extension/pgsql.php b/src/SPC/builder/extension/pgsql.php index ff0c5a6e..d385554c 100644 --- a/src/SPC/builder/extension/pgsql.php +++ b/src/SPC/builder/extension/pgsql.php @@ -21,14 +21,6 @@ class pgsql extends Extension */ public function patchBeforeConfigure(): bool { - if ($this->builder->getPHPVersionID() >= 80400) { - FileSystem::replaceFileStr( - SOURCE_PATH . '/php-src/configure', - 'LIBS="-lpq', - 'LIBS="-lpq -lpgport -lpgcommon -lssl -lcrypto -lz -lm' - ); - return true; - } FileSystem::replaceFileRegex( SOURCE_PATH . '/php-src/configure', '/-lpq/', From 82e11e52dd077c9f3ab19b2b5d53684eef5418f9 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 10 Dec 2024 23:08:31 +0800 Subject: [PATCH 095/101] Fix gettext build --- src/SPC/builder/unix/library/gettext.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SPC/builder/unix/library/gettext.php b/src/SPC/builder/unix/library/gettext.php index 6a1995c4..e20dd4f6 100644 --- a/src/SPC/builder/unix/library/gettext.php +++ b/src/SPC/builder/unix/library/gettext.php @@ -19,6 +19,7 @@ trait gettext '--disable-java ' . '--disable-c+ ' . $extra . + '--with-included-gettext ' . '--with-libiconv-prefix=' . BUILD_ROOT_PATH . ' ' . '--prefix=' . BUILD_ROOT_PATH ) From 52869218e04d6c9ab2d061f16df93da7574cfb1f Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 10 Dec 2024 23:08:49 +0800 Subject: [PATCH 096/101] Fix grpc redundant static lib --- config/lib.json | 1 - 1 file changed, 1 deletion(-) diff --git a/config/lib.json b/config/lib.json index 06b5cd2c..61334280 100644 --- a/config/lib.json +++ b/config/lib.json @@ -143,7 +143,6 @@ "source": "grpc", "static-libs-unix": [ "libgrpc.a", - "libboringssl.a", "libcares.a" ], "lib-depends": [ From 43cc9d0ba3d335e69e0fe033de1371bfab525e0d Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 10 Dec 2024 23:09:00 +0800 Subject: [PATCH 097/101] Add command, bump version --- src/SPC/ConsoleApplication.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SPC/ConsoleApplication.php b/src/SPC/ConsoleApplication.php index cfebb831..1849a654 100644 --- a/src/SPC/ConsoleApplication.php +++ b/src/SPC/ConsoleApplication.php @@ -22,6 +22,7 @@ use SPC\command\DumpLicenseCommand; use SPC\command\ExtractCommand; use SPC\command\InstallPkgCommand; use SPC\command\MicroCombineCommand; +use SPC\command\SPCConfigCommand; use SPC\command\SwitchPhpVersionCommand; use Symfony\Component\Console\Application; @@ -30,7 +31,7 @@ use Symfony\Component\Console\Application; */ final class ConsoleApplication extends Application { - public const VERSION = '2.4.1'; + public const VERSION = '2.4.2'; public function __construct() { @@ -52,6 +53,7 @@ final class ConsoleApplication extends Application new ExtractCommand(), new MicroCombineCommand(), new SwitchPhpVersionCommand(), + new SPCConfigCommand(), // Dev commands new AllExtCommand(), From 5c51305978ac3b64a926bff862210e81c287a3fc Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 10 Dec 2024 23:09:21 +0800 Subject: [PATCH 098/101] Add embed build tests --- .github/workflows/tests.yml | 4 ++++ src/SPC/command/BuildCliCommand.php | 4 +++- src/globals/test-extensions.php | 18 ++++++++++++------ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6548fb88..fc91093c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -199,3 +199,7 @@ jobs: - name: "Run Build Tests (build)" run: php src/globals/test-extensions.php build_cmd ${{ matrix.os }} ${{ matrix.php }} + + - name: "Run Build Tests (build - embed for non-windows)" + if: matrix.os != 'windows-latest' + run: php src/globals/test-extensions.php build_embed_cmd ${{ matrix.os }} ${{ matrix.php }} diff --git a/src/SPC/command/BuildCliCommand.php b/src/SPC/command/BuildCliCommand.php index d8b7cf76..bc214760 100644 --- a/src/SPC/command/BuildCliCommand.php +++ b/src/SPC/command/BuildCliCommand.php @@ -181,7 +181,9 @@ class BuildCliCommand extends BuildCommand // compile stopwatch :P $time = round(microtime(true) - START_TIME, 3); - logger()->info('Build complete, used ' . $time . ' s !'); + logger()->info(''); + logger()->info(' Build complete, used ' . $time . ' s !'); + logger()->info(''); // ---------- When using bin/spc-alpine-docker, the build root path is different from the host system ---------- $build_root_path = BUILD_ROOT_PATH; diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index a08ebc7f..c7c661de 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -34,11 +34,11 @@ $no_strip = false; $upx = false; // prefer downloading pre-built packages to speed up the build process -$prefer_pre_built = false; +$prefer_pre_built = true; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'parallel', + 'Linux', 'Darwin' => 'apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,ftp,gd,gmp,gettext,iconv,igbinary,imagick,intl,ldap,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,parallel,pcntl,pdo,pdo_mysql,pdo_pgsql,pdo_sqlite,pgsql,phar,posix,protobuf,readline,redis,session,shmop,simplexml,soap,sockets,sodium,sqlite3,ssh2,sysvmsg,sysvsem,sysvshm,tidy,tokenizer,xlswriter,xml,xmlreader,xmlwriter,zip,zlib,yaml,zstd', 'Windows' => 'amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,exif,ffi,fileinfo,filter,ftp,gd,iconv,igbinary,libxml,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_sqlite,pdo_sqlsrv,phar,rar,redis,session,shmop,simdjson,simplexml,soap,sockets,sqlite3,sqlsrv,ssh2,swow,sysvshm,tokenizer,xml,xmlreader,xmlwriter,yac,yaml,zip,zlib', }; @@ -52,7 +52,7 @@ $with_libs = match (PHP_OS_FAMILY) { // You can use `common`, `bulk`, `minimal` or `none`. // note: combination is only available for *nix platform. Windows must use `none` combination $base_combination = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'minimal', + 'Linux', 'Darwin' => 'none', 'Windows' => 'none', }; @@ -121,7 +121,6 @@ if ($argv[1] === 'build_cmd') { $build_cmd .= $no_strip ? '--no-strip ' : ''; $build_cmd .= $upx ? '--with-upx-pack ' : ''; $build_cmd .= $final_libs === '' ? '' : ('--with-libs=' . quote2($final_libs) . ' '); - $build_cmd .= '--build-cli --build-micro '; $build_cmd .= str_starts_with($argv[2], 'windows-') ? '' : '--build-fpm '; $build_cmd .= '--debug '; } @@ -150,9 +149,16 @@ if ($argv[1] === 'download_cmd') { } } elseif ($argv[1] === 'build_cmd') { if (str_starts_with($argv[2], 'windows-')) { - passthru('powershell.exe -file .\bin\spc.ps1 ' . $build_cmd, $retcode); + passthru('powershell.exe -file .\bin\spc.ps1 ' . $build_cmd . ' --build-cli --build-micro', $retcode); } else { - passthru('./bin/spc ' . $build_cmd, $retcode); + passthru('./bin/spc ' . $build_cmd . ' --build-cli --build-micro', $retcode); + } +} elseif ($argv[1] === 'build_embed_cmd') { + if (str_starts_with($argv[2], 'windows-')) { + // windows does not accept embed SAPI + passthru('powershell.exe -file .\bin\spc.ps1 ' . $build_cmd . ' --build-cli', $retcode); + } else { + passthru('./bin/spc ' . $build_cmd . ' --build-embed', $retcode); } } From 804020210d55a07be9feb6cfd356fb315ba8f7c1 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 10 Dec 2024 23:39:13 +0800 Subject: [PATCH 099/101] Fix test --- src/globals/test-extensions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index c7c661de..d7d81099 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -138,6 +138,7 @@ echo match ($argv[1]) { 'prefer_pre_built' => $prefer_pre_built ? '--prefer-pre-built' : '', 'download_cmd' => $down_cmd, 'build_cmd' => $build_cmd, + 'build_embed_cmd' => $build_cmd, default => '', }; From 8b9b70704a05cfeca1b29474c40e37dd607ef065 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 10 Dec 2024 23:55:33 +0800 Subject: [PATCH 100/101] Fix test --- src/globals/test-extensions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index d7d81099..8f0c32cc 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -114,7 +114,7 @@ if ($argv[1] === 'download_cmd') { } // generate build command -if ($argv[1] === 'build_cmd') { +if ($argv[1] === 'build_cmd' || $argv[1] === 'build_embed_cmd') { $build_cmd = 'build '; $build_cmd .= quote2($final_extensions) . ' '; $build_cmd .= $zts ? '--enable-zts ' : ''; From 1bc7bc3421eed0ad1cf37a9da71a7ab62b3206ec Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 13 Dec 2024 14:37:27 +0800 Subject: [PATCH 101/101] Addd embed docs --- docs/en/guide/manual-build.md | 73 +++++++++++++++++++++++++++++++++++ docs/zh/guide/manual-build.md | 72 ++++++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+) diff --git a/docs/en/guide/manual-build.md b/docs/en/guide/manual-build.md index 74d75118..a0b02b08 100644 --- a/docs/en/guide/manual-build.md +++ b/docs/en/guide/manual-build.md @@ -553,3 +553,76 @@ If you need to build multiple times locally, the following method can save you t - If you want to rebuild once, but do not re-download the source code, you can first `rm -rf buildroot source` to delete the compilation directory and source code directory, and then rebuild. - If you want to update a version of a dependency, you can use `bin/spc del-download ` to delete the specified source code, and then use `download ` to download it again. - If you want to update all dependent versions, you can use `bin/spc download --clean` to delete all downloaded sources, and then download them again. + +## embed usage + +If you want to embed static-php into other C language programs, you can use `--build-embed` to build an embed version of PHP. + +```bash +bin/spc build {your extensions} --build-embed --debug +``` + +Under normal circumstances, PHP embed will generate `php-config` after compilation. +For static-php, we provide `spc-config` to obtain the parameters during compilation. +In addition, when using embed SAPI (libphp.a), you need to use the same compiler as libphp, otherwise there will be a link error. + +Here is the basic usage of spc-config: + +```bash +# output all flags and options +bin/spc spc-config curl,zlib,phar,openssl + +# output libs +bin/spc spc-config curl,zlib,phar,openssl --libs + +# output includes +bin/spc spc-config curl,zlib,phar,openssl --includes +``` + +By default, static-php uses the following compilers on different systems: + +- macOS: `clang` +- Linux (Alpine Linux): `gcc` +- Linux (glibc based distros, x86_64): `/usr/local/musl/bin/x86_64-linux-musl-gcc` +- Linux (glibc based distros, aarch64): `/usr/local/musl/bin/aarch64-linux-musl-gcc` +- FreeBSD: `clang` + +Here is an example of using embed SAPI: + +```c +// embed.c +#include + +int main(int argc,char **argv){ + + PHP_EMBED_START_BLOCK(argc,argv) + + zend_file_handle file_handle; + + zend_stream_init_filename(&file_handle,"embed.php"); + + if(php_execute_script(&file_handle) == FAILURE){ + php_printf("Failed to execute PHP script.\n"); + } + + PHP_EMBED_END_BLOCK() + return 0; +} +``` + + +```php +` 删除指定的源码,然后使用 `download ` 重新下载。 - 如果你想更新所有依赖的版本,可以使用 `bin/spc download --clean` 删除所有下载的源码,然后重新下载。 + +## embed 使用 + +如果你想将 static-php 嵌入到其他 C 语言程序中,可以使用 `--build-embed` 构建一个 embed 版本的 PHP。 + +```bash +bin/spc build {your extensions} --build-embed --debug +``` + +在通常的情况下,PHP embed 编译后会生成 `php-config`。对于 static-php,我们提供了 `spc-config`,用于获取编译时的参数。 +另外,在使用 embed SAPI(libphp.a)时,你需要使用和编译 libphp 相同的编译器,否则会出现链接错误。 + +下面是 spc-config 的基本用法: + +```bash +# output all flags and options +bin/spc spc-config curl,zlib,phar,openssl + +# output libs +bin/spc spc-config curl,zlib,phar,openssl --libs + +# output includes +bin/spc spc-config curl,zlib,phar,openssl --includes +``` + +默认情况下,static-php 在不同系统使用的编译器分别是: + +- macOS: `clang` +- Linux (Alpine Linux): `gcc` +- Linux (glibc based distros, x86_64): `/usr/local/musl/bin/x86_64-linux-musl-gcc` +- Linux (glibc based distros, aarch64): `/usr/local/musl/bin/aarch64-linux-musl-gcc` +- FreeBSD: `clang` + +下面是一个使用 embed SAPI 的例子: + +```c +// embed.c +#include + +int main(int argc,char **argv){ + + PHP_EMBED_START_BLOCK(argc,argv) + + zend_file_handle file_handle; + + zend_stream_init_filename(&file_handle,"embed.php"); + + if(php_execute_script(&file_handle) == FAILURE){ + php_printf("Failed to execute PHP script.\n"); + } + + PHP_EMBED_END_BLOCK() + return 0; +} +``` + + +```php +