Compare commits

...

56 Commits

Author SHA1 Message Date
Jerry Ma
9dcda873f3 Fix debian libtool bug (#276)
* add libtool installation for debian

* update composer lock

* re-fix libtool check

* re-fix libtool check
2023-11-27 22:35:40 +08:00
crazywhalecc
4400c6271e update composer lock 2023-11-27 21:59:59 +08:00
crazywhalecc
0589690eaa add libtool installation for debian 2023-11-27 21:59:59 +08:00
Jerry Ma
5449e05898 Update README.md 2023-11-24 10:28:35 +08:00
crazywhalecc
93e64e1d5a use php 8.2 to setup php runtime 2023-11-24 01:33:12 +08:00
crazywhalecc
7a2e237069 add php 8.3 support 2023-11-24 01:33:12 +08:00
crazywhalecc
c95da8c150 add tests 2023-11-24 01:23:15 +08:00
crazywhalecc
89afd44344 add tidy support for linux 2023-11-24 01:23:15 +08:00
crazywhalecc
04f100da8b add tidy support 2023-11-24 01:23:15 +08:00
Jerry Ma
2e24976b71 Update README.md 2023-11-22 11:05:57 +08:00
Jerry Ma
36a30cc23b Update README.md 2023-11-21 23:35:34 +08:00
crazywhalecc
869130572f change test 2023-11-21 23:09:20 +08:00
crazywhalecc
2bb08af89b add rar test 2023-11-21 23:09:20 +08:00
crazywhalecc
b3d41ef969 add extension rar 2023-11-21 23:09:20 +08:00
crazywhalecc
9c904409cd use string 2023-11-19 13:47:48 +08:00
crazywhalecc
859182abff remove fail fast 2023-11-19 13:44:12 +08:00
crazywhalecc
c0e88bf4bd prevent setup php from using 8.0 2023-11-19 13:42:40 +08:00
crazywhalecc
79bcd35c0e Add test build things 2023-11-19 13:41:09 +08:00
crazywhalecc
2e637524fc Add test build things 2023-11-19 13:38:55 +08:00
Jerry Ma
a2c687599f Create pull_request_template.md 2023-11-19 13:38:09 +08:00
Kévin Dunglas
d09a3074ad include git metadata 2023-11-16 19:21:54 +08:00
Kévin Dunglas
5736964b2e fix 2023-11-16 19:21:54 +08:00
Kévin Dunglas
edaa82b8c5 autogen 2023-11-16 19:21:54 +08:00
Kévin Dunglas
2a6441a500 switch to git 2023-11-16 19:21:54 +08:00
crazywhalecc
3bd5a05725 remove pthreads4w 2023-11-16 00:12:56 +08:00
Kévin Dunglas
a6fbcc954e fix pthreads4w URL 2023-11-16 00:12:56 +08:00
crazywhalecc
66cebb5fe4 disable brotli if not enabled 2023-11-15 18:29:59 +08:00
crazywhalecc
e3671387fc temporarily use fixed url for freetype 2023-11-15 18:00:06 +08:00
Jerry Ma
f7c73c00af Fix iconv not depends on libiconv in linux 2023-11-14 20:54:03 +08:00
Jerry Ma
74536bd2e1 Change CI download all to --for-extensions (#262)
* Change download all to --for-extensions

* Update build-linux-x86_64.yml

* Update build-linux-arm.yml

* Update build-linux-x86_64.yml

* Update build-macos-x86_64.yml
2023-11-13 17:59:03 +08:00
crazywhalecc
a8f2b0096b cs fix 2023-11-13 16:09:11 +08:00
crazywhalecc
2d192fc390 replace libpng to github 2023-11-13 16:09:11 +08:00
crazywhalecc
031da802f3 apply new patches 2023-11-13 16:09:11 +08:00
crazywhalecc
5fdeb33031 separate linux and macos patches 2023-11-13 16:09:11 +08:00
crazywhalecc
347da67b71 use static-php/imap 2023-11-13 16:09:11 +08:00
crazywhalecc
65ef9ab20c use WrongUsageException for not supported libs 2023-11-13 16:09:11 +08:00
crazywhalecc
3d64c6349e remove kerberos temporarily
--for-extensions is not working with it
2023-11-13 16:09:11 +08:00
DubbleClick
31cf9bb5b7 fix redhat os detection 2023-11-13 16:09:11 +08:00
DubbleClick
7c4a991c0e add imap support 2023-11-13 16:09:11 +08:00
crazywhalecc
07f943af7e add dev:extensions command custom column display 2023-11-06 22:29:52 +08:00
crazywhalecc
ff74f0cdaf overwrite mbregex cli check 2023-11-05 17:49:30 +08:00
crazywhalecc
dccfde9f39 Adjust mbstring and mbregex dependencies 2023-11-05 17:49:30 +08:00
crazywhalecc
5db23e1db7 let sanity check can be overwritten 2023-11-05 17:49:30 +08:00
crazywhalecc
b1ae48a209 let sanity check can be overwritten 2023-11-05 17:49:30 +08:00
crazywhalecc
ac7a236763 Transfer crazywhalecc/phpmicro ownership 2023-11-01 21:07:20 +08:00
crazywhalecc
1bf39c1f06 Update static-php-cli-hosted ownership 2023-11-01 20:51:31 +08:00
Jerry Ma
678283cd98 Update README.md 2023-11-01 20:48:23 +08:00
crazywhalecc
97a76aba8a update README 2023-11-01 20:35:45 +08:00
Jerry Ma
af464e7b3d Update source.json 2023-11-01 20:06:49 +08:00
Jerry Ma
5ee7dd9200 Update README-zh.md 2023-11-01 13:51:12 +08:00
Jerry Ma
9e1c2c6dd5 Update README-zh.md 2023-11-01 13:49:37 +08:00
Jerry Ma
d29ba16cbc Update README.md 2023-11-01 13:49:18 +08:00
Jerry Ma
7bef45eb32 Update README.md 2023-11-01 11:01:44 +08:00
crazywhalecc
772ab77d2e fix glfw linking issue 2023-11-01 10:03:36 +08:00
crazywhalecc
58897c6941 add swoole curl hook support, disable pgsql hook support 2023-11-01 10:03:36 +08:00
Jerry Ma
8230e1bcec Update README.md 2023-11-01 00:02:59 +08:00
32 changed files with 901 additions and 321 deletions

12
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,12 @@
## What does this PR do?
## Checklist before merging
> If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
> If a modification is not involved, please skip it directly.
- [ ] If it's a extension or dependency update, make sure adding related extensions in `src/global/test-extensions.php`.
- [ ] If you changed the behavior of static-php-cli, add docs in [static-php/static-php-cli-docs](https://github.com/static-php/static-php-cli-docs) .
- [ ] If you updated `config/xxxx.json` content, run `bin/spc dev:sort-config xxx`.

View File

@@ -15,6 +15,7 @@ on:
default: '8.2' default: '8.2'
type: choice type: choice
options: options:
- '8.3'
- '8.2' - '8.2'
- '8.1' - '8.1'
- '8.0' - '8.0'
@@ -51,7 +52,7 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: downloads path: downloads
key: php-${{ inputs.version }}-dependencies key: php-${{ inputs.version }}-dependencies-${{ inputs.extensions }}
# With or without debug # With or without debug
- if: inputs.debug == true - if: inputs.debug == true
@@ -67,7 +68,7 @@ jobs:
# If there's no dependencies cache, fetch sources, with or without debug # If there's no dependencies cache, fetch sources, with or without debug
- if: steps.cache-download.outputs.cache-hit != 'true' - if: steps.cache-download.outputs.cache-hit != 'true'
run: SPC_USE_ARCH=${{ inputs.operating-system }} ./bin/spc-alpine-docker download --with-php=${{ inputs.version }} --all ${{ env.SPC_BUILD_DEBUG }} run: SPC_USE_ARCH=${{ inputs.operating-system }} ./bin/spc-alpine-docker download --with-php=${{ inputs.version }} --for-extensions=${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }}
# Run build command # Run build command
- run: SPC_USE_ARCH=${{ inputs.operating-system }} ./bin/spc-alpine-docker build ${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }} - run: SPC_USE_ARCH=${{ inputs.operating-system }} ./bin/spc-alpine-docker build ${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }}

View File

@@ -9,6 +9,7 @@ on:
default: '8.2' default: '8.2'
type: choice type: choice
options: options:
- '8.3'
- '8.2' - '8.2'
- '8.1' - '8.1'
- '8.0' - '8.0'
@@ -56,7 +57,7 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: downloads path: downloads
key: php-${{ inputs.version }}-dependencies key: php-${{ inputs.version }}-dependencies-${{ inputs.extensions }}
# With or without debug # With or without debug
- if: inputs.debug == true - if: inputs.debug == true
@@ -72,7 +73,7 @@ jobs:
# If there's no dependencies cache, fetch sources, with or without debug # If there's no dependencies cache, fetch sources, with or without debug
- if: steps.cache-download.outputs.cache-hit != 'true' - if: steps.cache-download.outputs.cache-hit != 'true'
run: CACHE_API_EXEC=yes ./bin/spc-alpine-docker download --with-php=${{ inputs.version }} --all ${{ env.SPC_BUILD_DEBUG }} run: CACHE_API_EXEC=yes ./bin/spc-alpine-docker download --with-php=${{ inputs.version }} --for-extensions=${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }}
# Run build command # Run build command
- run: ./bin/spc-alpine-docker build ${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }} - run: ./bin/spc-alpine-docker build ${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }}

View File

@@ -9,6 +9,7 @@ on:
default: '8.2' default: '8.2'
type: choice type: choice
options: options:
- '8.3'
- '8.2' - '8.2'
- '8.1' - '8.1'
- '8.0' - '8.0'
@@ -61,7 +62,7 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: downloads path: downloads
key: php-${{ inputs.version }}-dependencies key: php-${{ inputs.version }}-dependencies-${{ inputs.extensions }}
# With or without debug # With or without debug
- if: inputs.debug == true - if: inputs.debug == true
@@ -77,7 +78,7 @@ jobs:
# If there's no dependencies cache, fetch sources, with or without debug # If there's no dependencies cache, fetch sources, with or without debug
- if: steps.cache-download.outputs.cache-hit != 'true' - if: steps.cache-download.outputs.cache-hit != 'true'
run: ./bin/spc download --with-php=${{ inputs.version }} --all ${{ env.SPC_BUILD_DEBUG }} run: ./bin/spc download --with-php=${{ inputs.version }} --for-extensions=${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }}
# Run build command # 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_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }}

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
php-version: [ "8.0", "8.1", "8.2" ] php-version: [ "8.0", "8.1", "8.2", "8.3" ]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@@ -24,7 +24,7 @@ jobs:
- name: Reuse static-php-cli-hosted artifacts - name: Reuse static-php-cli-hosted artifacts
uses: dawidd6/action-download-artifact@v2 uses: dawidd6/action-download-artifact@v2
with: with:
repo: crazywhalecc/static-php-cli-hosted repo: static-php/static-php-cli-hosted
branch: master branch: master
workflow: build-spc-release.yml workflow: build-spc-release.yml
name: "spc-${{ matrix.operating-system }}" name: "spc-${{ matrix.operating-system }}"

View File

@@ -1,98 +1,146 @@
name: Tests name: Tests
on: on:
push: push:
branches: [ "main" ] branches: [ "main" ]
pull_request: pull_request:
branches: [ "main" ] branches: [ "main" ]
permissions: permissions:
contents: read contents: read
jobs: jobs:
php-cs-fixer: php-cs-fixer:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
- name: Checkout - name: "Checkout"
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup PHP - name: "Setup PHP"
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.1' php-version: '8.1'
extensions: curl, openssl, mbstring extensions: curl, openssl, mbstring
ini-values: memory_limit=-1 ini-values: memory_limit=-1
tools: pecl, composer, php-cs-fixer tools: pecl, composer, php-cs-fixer
- name: Run PHP-CS-Fixer fix - name: Run PHP-CS-Fixer fix
run: php-cs-fixer fix --dry-run --diff --ansi run: php-cs-fixer fix --dry-run --diff --ansi
phpstan: phpstan:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
- name: Checkout - name: "Checkout"
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup PHP - name: "Setup PHP"
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.1' php-version: '8.1'
extensions: curl, openssl, mbstring extensions: curl, openssl, mbstring
ini-values: memory_limit=-1 ini-values: memory_limit=-1
tools: composer tools: composer
- name: Cache Composer packages - name: "Cache Composer packages"
id: composer-cache id: composer-cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: vendor path: vendor
key: ${{ runner.os }}-phpstan-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-phpstan-${{ hashFiles('**/composer.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-phpstan- ${{ runner.os }}-phpstan-
- name: Install Dependencies - name: "Install Dependencies"
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Run phpstan - name: "Run phpstan"
run: vendor/bin/phpstan analyse run: vendor/bin/phpstan analyse
phpunit: phpunit:
name: PHPUnit (PHP ${{ matrix.php }}) name: "PHPUnit (PHP ${{ matrix.php }})"
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
strategy: strategy:
matrix: matrix:
include: include:
- php: '8.1' - php: '8.1'
- php: '8.2' - php: '8.2'
fail-fast: false - php: '8.3'
steps: steps:
- name: Checkout - name: "Checkout"
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup PHP - name: "Setup PHP"
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: "${{ matrix.php }}" php-version: "${{ matrix.php }}"
tools: pecl, composer tools: pecl, composer
extensions: curl, openssl, mbstring extensions: curl, openssl, mbstring
ini-values: memory_limit=-1 ini-values: memory_limit=-1
- name: Cache Composer packages - name: "Cache Composer packages"
id: composer-cache id: composer-cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: vendor path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-php- ${{ runner.os }}-php-
- name: Install Dependencies - name: "Install Dependencies"
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Run PHPUnit tests - name: "Run PHPUnit Tests"
run: | run: |
vendor/bin/phpunit tests/ --no-coverage vendor/bin/phpunit tests/ --no-coverage
build:
name: "Build PHP Test (PHP ${{ matrix.php }} ${{ matrix.os }})"
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
matrix:
php:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
os:
- ubuntu-latest
- macos-latest
fail-fast: false
steps:
- name: "Checkout"
uses: actions/checkout@v4
- 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
- name: "Cache Composer packages"
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: "Install Dependencies"
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
- name: "Run Build Tests (download)"
run: bin/spc download --for-extensions="$(php src/globals/test-extensions.php)" --with-php=${{ matrix.php }} --debug
- name: "Run Build Tests (build)"
run: bin/spc build "$(php src/globals/test-extensions.php)" --build-cli --build-micro --build-fpm --debug

View File

@@ -12,13 +12,12 @@ Build single static PHP binary, with PHP project together, with popular extensio
<img width="600" alt="截屏2023-05-02 15 52 33" src="https://user-images.githubusercontent.com/20330940/235610318-2ef4e3f1-278b-4ca4-99f4-b38120efc395.png"> <img width="600" alt="截屏2023-05-02 15 52 33" src="https://user-images.githubusercontent.com/20330940/235610318-2ef4e3f1-278b-4ca4-99f4-b38120efc395.png">
> 该 SAPI 源自 [dixyes/phpmicro](https://github.com/dixyes/phpmicro) 的 [Fork 仓库](https://github.com/crazywhalecc/phpmicro)。 > 该 SAPI 源自 [dixyes/phpmicro](https://github.com/dixyes/phpmicro) 的 [Fork 仓库](https://github.com/static-php/phpmicro)。
[![Version](https://img.shields.io/badge/Version-2.0--rc7-pink.svg?style=flat-square)]() [![Version](https://img.shields.io/badge/Version-2.0--rc8-pink.svg?style=flat-square)]()
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)]() [![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)]()
[![](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/build-linux-x86_64.yml?branch=refactor&label=Linux%20Build&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/build.yml) [![](https://img.shields.io/github/actions/workflow/status/static-php/static-php-cli-hosted/build-php-common.yml?branch=refactor&label=Build%20Common%20Extensions&style=flat-square)](https://github.com/static-php/static-php-cli-hosted/actions/workflows/build-php-common.yml)
[![](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/build-macos-x86_64.yml?branch=refactor&label=macOS%20Build&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/build.yml) [![](https://img.shields.io/badge/Extension%20Counter-65+-yellow.svg?style=flat-square)]()
[![](https://img.shields.io/badge/Extension%20Counter-55+-yellow.svg?style=flat-square)]()
[![](https://img.shields.io/github/search/crazywhalecc/static-php-cli/TODO?label=TODO%20Counter&style=flat-square)]() [![](https://img.shields.io/github/search/crazywhalecc/static-php-cli/TODO?label=TODO%20Counter&style=flat-square)]()
> 项目名称是 static-php-cli但其实支持 cli、fpm、micro 和 embed SAPI 😎 > 项目名称是 static-php-cli但其实支持 cli、fpm、micro 和 embed SAPI 😎
@@ -131,7 +130,7 @@ chmod +x bin/spc
./bin/spc build "bcmath,openssl,tokenizer,sqlite3,pdo_sqlite,ftp,curl" --build-cli --build-micro ./bin/spc build "bcmath,openssl,tokenizer,sqlite3,pdo_sqlite,ftp,curl" --build-cli --build-micro
``` ```
你也可以使用参数 `--with-php=x.y` 来指定下载的 PHP 版本,目前支持 7.3 ~ 8.2 你也可以使用参数 `--with-php=x.y` 来指定下载的 PHP 版本,目前支持 7.3 ~ 8.3
```bash ```bash
# 优先考虑使用 >= 8.0 的 PHP 版本,因为 phpmicro 不支持在 PHP7 中构建 # 优先考虑使用 >= 8.0 的 PHP 版本,因为 phpmicro 不支持在 PHP7 中构建
@@ -232,7 +231,7 @@ bin/spc micro:combine my-app.phar -I "memory_limit=4G" -I "disable_functions=sys
另外,添加新扩展的贡献方式,可以参考下方 `进阶` 另外,添加新扩展的贡献方式,可以参考下方 `进阶`
如果你想贡献文档内容,请到项目仓库 [crazywhalecc/static-php-cli-docs](https://github.com/crazywhalecc/static-php-cli-docs) 贡献。 如果你想贡献文档内容,请到项目仓库 [static-php/static-php-cli-docs](https://github.com/static-php/static-php-cli-docs) 贡献。
## 赞助本项目 ## 赞助本项目

View File

@@ -14,24 +14,24 @@ You can also use the micro binary file to combine php binary and php source code
<img width="600" alt="2023-05-02 15 52 33" src="https://user-images.githubusercontent.com/20330940/235610318-2ef4e3f1-278b-4ca4-99f4-b38120efc395.png"> <img width="600" alt="2023-05-02 15 52 33" src="https://user-images.githubusercontent.com/20330940/235610318-2ef4e3f1-278b-4ca4-99f4-b38120efc395.png">
> This SAPI feature is from the [Fork](https://github.com/crazywhalecc/phpmicro) of [dixyes/phpmicro](https://github.com/dixyes/phpmicro). > This SAPI feature is from the [Fork](https://github.com/static-php/phpmicro) of [dixyes/phpmicro](https://github.com/dixyes/phpmicro).
[![Version](https://img.shields.io/badge/Version-2.0--rc7-pink.svg?style=flat-square)]() [![Version](https://img.shields.io/badge/Version-2.0--rc8-pink.svg?style=flat-square)]()
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)]() [![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)]()
[![](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/build-linux-x86_64.yml?branch=refactor&label=Linux%20Build&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/build.yml) [![](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/build-linux-x86_64.yml?branch=refactor&label=Linux%20Build&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/build.yml)
[![](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/build-macos-x86_64.yml?branch=refactor&label=macOS%20Build&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/build.yml) [![](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/build-macos-x86_64.yml?branch=refactor&label=macOS%20Build&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/build.yml)
[![](https://img.shields.io/badge/Extension%20Counter-55+-yellow.svg?style=flat-square)]() [![](https://img.shields.io/badge/Extension%20Counter-65+-yellow.svg?style=flat-square)]()
[![](https://img.shields.io/github/search/crazywhalecc/static-php-cli/TODO?label=TODO%20Counter&style=flat-square)]() [![](https://img.shields.io/github/search/crazywhalecc/static-php-cli/TODO?label=TODO%20Counter&style=flat-square)]()
## Docs ## Docs
The current README contains basic usage. For all the features of static-php-cli, The current README contains basic usage. For all the features of static-php-cli,
see <https://static-php.dev>. see <https://static-php.dev> .
## Direct Download ## Direct Download
If you don't want to compile yourself, you can download example pre-compiled artifact from Actions, or from self-hosted server: [Here](https://dl.static-php.dev/static-php-cli/common/) If you don't want to compile yourself, you can download example pre-compiled artifact from [Actions](https://github.com/static-php/static-php-cli-hosted/actions/workflows/build-php-common.yml), or from [self-hosted server](https://dl.static-php.dev/static-php-cli/common/).
> self-hosted server contains extensions: `bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,gmp,iconv,xml,mbstring,mbregex,mysqlnd,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,redis,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip` > self-hosted server contains extensions: `bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,gmp,iconv,xml,mbstring,mbregex,mysqlnd,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,redis,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip`
@@ -65,6 +65,8 @@ Please first select the extension you want to compile based on the extension lis
> If an extension you need is missing, you can submit an issue. > If an extension you need is missing, you can submit an issue.
Here is the current planned roadmap for extension support: [#152](https://github.com/crazywhalecc/static-php-cli/issues/152) .
### GitHub Actions Build ### GitHub Actions Build
Use GitHub Action to easily build a statically compiled PHP, Use GitHub Action to easily build a statically compiled PHP,
@@ -88,13 +90,12 @@ Currently, the platforms supported by `spc` binary are Linux and macOS.
Here's how to download from GitHub Actions: Here's how to download from GitHub Actions:
1. Enter [GitHub Actions](https://github.com/crazywhalecc/static-php-cli/actions/workflows/release-build.yml). 1. Enter [GitHub Actions](https://github.com/crazywhalecc/static-php-cli/actions/workflows/release-build.yml) or [self-hosted nightly builds](https://dl.static-php.dev/static-php-cli/spc-bin/nightly/).
2. Select the latest build task, select `Artifacts`, and download the binary file of the corresponding platform. 2. If you download from GHA, select the latest build task, select `Artifacts`, and download the binary file of the corresponding platform.
3. Unzip the `.zip` file. After decompressing, add execution permissions to it: `chmod +x ./spc`. 3. If you download from GHA, unzip the `.zip` file. After decompressing, add execution permissions to it: `chmod +x ./spc`.
4. If you download from self-hosted server, download `spc-$os-$arch` file and just use it (don't forget `chmod +x`).
You can also download binaries from a self-hosted server: [enter](https://dl.static-php.dev/static-php-cli/spc-bin/nightly/). > SPC single-file binary is built by phpmicro and box, and it doesn't need to install PHP. Just treat `spc` as a standalone executable.
> SPC single-file binary is built by phpmicro and box.
### Manual build (using source code) ### Manual build (using source code)
@@ -144,7 +145,7 @@ Basic usage for building php and micro with some extensions:
./bin/spc build bcmath,openssl,tokenizer,sqlite3,pdo_sqlite,ftp,curl --build-cli --build-micro ./bin/spc build bcmath,openssl,tokenizer,sqlite3,pdo_sqlite,ftp,curl --build-cli --build-micro
``` ```
You can also use the parameter `--with-php=x.y` to specify the downloaded PHP version, currently supports 7.4 ~ 8.2: You can also use the parameter `--with-php=x.y` to specify the downloaded PHP version, currently supports 7.4 ~ 8.3:
```bash ```bash
# Using PHP >= 8.0 is recommended, because PHP7 cannot use phpmicro # Using PHP >= 8.0 is recommended, because PHP7 cannot use phpmicro
@@ -197,7 +198,7 @@ cd buildroot/bin/
> phpmicro is a SelF-extracted eXecutable SAPI module, > phpmicro is a SelF-extracted eXecutable SAPI module,
> provided by [phpmicro](https://github.com/dixyes/phpmicro) project. > provided by [phpmicro](https://github.com/dixyes/phpmicro) project.
> But this project is using a [fork](https://github.com/crazywhalecc/phpmicro) of phpmicro, because we need to add some features to it. > But this project is using a [fork](https://github.com/static-php/phpmicro) of phpmicro, because we need to add some features to it.
> It can put php runtime and your source code together. > It can put php runtime and your source code together.
When using the parameter `--build-all` or `--build-micro`, When using the parameter `--build-all` or `--build-micro`,
@@ -257,13 +258,14 @@ For an advanced example of how to use this feature, take a look at [how to use i
If the extension you need is missing, you can create an issue. If the extension you need is missing, you can create an issue.
If you are familiar with this project, you are also welcome to initiate a pull request. If you are familiar with this project, you are also welcome to initiate a pull request.
If you want to contribute document content, please go to [crazywhalecc/static-php-cli-docs](https://github.com/crazywhalecc/static-php-cli-docs). If you want to contribute documentation, please go to [static-php/static-php-cli-docs](https://github.com/static-php/static-php-cli-docs).
Now there is a [static-php](https://github.com/static-php) organization, which is used to store the repo related to the project.
Part of the English document is written by me, and part is translated by Google, Part of the English document is written by me, and part is translated by Google,
and there may be inaccurate descriptions, strange or offensive expressions. and there may be inaccurate descriptions, strange or offensive expressions.
If you are a native English speaker, some corrections to the documentation are welcome. If you are a native English speaker, some corrections to the documentation are welcome.
## Sponsor this project ## Sponsor this project
You can sponsor my project on [this page](https://github.com/crazywhalecc/crazywhalecc/blob/master/FUNDING.md). You can sponsor my project on [this page](https://github.com/crazywhalecc/crazywhalecc/blob/master/FUNDING.md).
@@ -271,11 +273,13 @@ You can sponsor my project on [this page](https://github.com/crazywhalecc/crazyw
## Open-Source License ## Open-Source License
This project itself is based on MIT License, This project itself is based on MIT License,
some newly added extensions and dependencies may originate from the following projects (including but not limited to), some newly added extensions and dependencies may originate from the the other projects,
and the headers of these code files will also be given additional instructions LICENSE and AUTHOR: and the headers of these code files will also be given additional instructions LICENSE and AUTHOR.
- [dixyes/lwmbs](https://github.com/dixyes/lwmbs) (Mulun Permissive License) These are similar projects:
- [swoole/swoole-cli](https://github.com/swoole/swoole-cli) (Apache 2.0 LICENSE+SWOOLE-CLI LICENSE)
- [dixyes/lwmbs](https://github.com/dixyes/lwmbs)
- [swoole/swoole-cli](https://github.com/swoole/swoole-cli)
Due to the special nature of this project, Due to the special nature of this project,
many other open source projects such as curl and protobuf will be used during the project compilation process, many other open source projects such as curl and protobuf will be used during the project compilation process,

View File

@@ -25,7 +25,7 @@ __DIR__=$(cd "$(dirname "$0")" && pwd)
__PROJECT__=$(cd "${__DIR__}"/../ && pwd) __PROJECT__=$(cd "${__DIR__}"/../ && pwd)
# set download dir # set download dir
__PHP_RUNTIME_URL__="https://dl.static-php.dev/static-php-cli/common/php-8.2.10-cli-${__OS_FIXED__}-${__ARCH__}.tar.gz" __PHP_RUNTIME_URL__="https://dl.static-php.dev/static-php-cli/common/php-8.2.12-cli-${__OS_FIXED__}-${__ARCH__}.tar.gz"
__COMPOSER_URL__="https://getcomposer.org/download/latest-stable/composer.phar" __COMPOSER_URL__="https://getcomposer.org/download/latest-stable/composer.phar"
# use china mirror # use china mirror
@@ -46,7 +46,7 @@ done
case "$mirror" in case "$mirror" in
china) china)
__PHP_RUNTIME_URL__="https://dl.static-php.dev/static-php-cli/common/php-8.2.10-cli-${__OS_FIXED__}-${__ARCH__}.tar.gz" __PHP_RUNTIME_URL__="https://dl.static-php.dev/static-php-cli/common/php-8.2.12-cli-${__OS_FIXED__}-${__ARCH__}.tar.gz"
__COMPOSER_URL__="https://mirrors.aliyun.com/composer/composer.phar" __COMPOSER_URL__="https://mirrors.aliyun.com/composer/composer.phar"
;; ;;

236
composer.lock generated
View File

@@ -8,16 +8,16 @@
"packages": [ "packages": [
{ {
"name": "illuminate/collections", "name": "illuminate/collections",
"version": "v10.29.0", "version": "v10.33.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/collections.git", "url": "https://github.com/illuminate/collections.git",
"reference": "bb8784ce913bd46f944b4bd67cd857f40d9cfe68" "reference": "766a3b6c3e5c8011b037a147266dcf7f93b21223"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/collections/zipball/bb8784ce913bd46f944b4bd67cd857f40d9cfe68", "url": "https://api.github.com/repos/illuminate/collections/zipball/766a3b6c3e5c8011b037a147266dcf7f93b21223",
"reference": "bb8784ce913bd46f944b4bd67cd857f40d9cfe68", "reference": "766a3b6c3e5c8011b037a147266dcf7f93b21223",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -59,11 +59,11 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2023-10-10T12:55:25+00:00" "time": "2023-11-20T15:45:45+00:00"
}, },
{ {
"name": "illuminate/conditionable", "name": "illuminate/conditionable",
"version": "v10.29.0", "version": "v10.33.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/conditionable.git", "url": "https://github.com/illuminate/conditionable.git",
@@ -109,16 +109,16 @@
}, },
{ {
"name": "illuminate/contracts", "name": "illuminate/contracts",
"version": "v10.29.0", "version": "v10.33.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/contracts.git", "url": "https://github.com/illuminate/contracts.git",
"reference": "6c39fba7b2311e28f5c6ac7d729e3d49a2a98406" "reference": "f6bf37a272fda164f6c451407c99f820eb1eb95b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/6c39fba7b2311e28f5c6ac7d729e3d49a2a98406", "url": "https://api.github.com/repos/illuminate/contracts/zipball/f6bf37a272fda164f6c451407c99f820eb1eb95b",
"reference": "6c39fba7b2311e28f5c6ac7d729e3d49a2a98406", "reference": "f6bf37a272fda164f6c451407c99f820eb1eb95b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -153,11 +153,11 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2023-09-05T19:07:46+00:00" "time": "2023-10-30T00:59:22+00:00"
}, },
{ {
"name": "illuminate/macroable", "name": "illuminate/macroable",
"version": "v10.29.0", "version": "v10.33.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/macroable.git", "url": "https://github.com/illuminate/macroable.git",
@@ -203,16 +203,16 @@
}, },
{ {
"name": "laravel/prompts", "name": "laravel/prompts",
"version": "v0.1.12", "version": "v0.1.13",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/prompts.git", "url": "https://github.com/laravel/prompts.git",
"reference": "b35f249028c22016e45e48626e19e5d42fd827ff" "reference": "e1379d8ead15edd6cc4369c22274345982edc95a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/prompts/zipball/b35f249028c22016e45e48626e19e5d42fd827ff", "url": "https://api.github.com/repos/laravel/prompts/zipball/e1379d8ead15edd6cc4369c22274345982edc95a",
"reference": "b35f249028c22016e45e48626e19e5d42fd827ff", "reference": "e1379d8ead15edd6cc4369c22274345982edc95a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -254,9 +254,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/laravel/prompts/issues", "issues": "https://github.com/laravel/prompts/issues",
"source": "https://github.com/laravel/prompts/tree/v0.1.12" "source": "https://github.com/laravel/prompts/tree/v0.1.13"
}, },
"time": "2023-10-18T14:18:57+00:00" "time": "2023-10-27T13:53:59+00:00"
}, },
{ {
"name": "psr/container", "name": "psr/container",
@@ -414,16 +414,16 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v6.3.4", "version": "v6.3.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", "url": "https://api.github.com/repos/symfony/console/zipball/0d14a9f6d04d4ac38a8cea1171f4554e325dae92",
"reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -484,7 +484,7 @@
"terminal" "terminal"
], ],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v6.3.4" "source": "https://github.com/symfony/console/tree/v6.3.8"
}, },
"funding": [ "funding": [
{ {
@@ -500,11 +500,11 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-08-16T10:10:12+00:00" "time": "2023-10-31T08:09:35+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v3.3.0", "version": "v3.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
@@ -551,7 +551,7 @@
"description": "A generic function and convention to trigger deprecation notices", "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0"
}, },
"funding": [ "funding": [
{ {
@@ -901,16 +901,16 @@
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
"version": "v3.3.0", "version": "v3.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/service-contracts.git", "url": "https://github.com/symfony/service-contracts.git",
"reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838",
"reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -963,7 +963,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/service-contracts/tree/v3.3.0" "source": "https://github.com/symfony/service-contracts/tree/v3.4.0"
}, },
"funding": [ "funding": [
{ {
@@ -979,20 +979,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-05-23T14:45:45+00:00" "time": "2023-07-30T20:28:31+00:00"
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v6.3.5", "version": "v6.3.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" "reference": "13880a87790c76ef994c91e87efb96134522577a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a",
"reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", "reference": "13880a87790c76ef994c91e87efb96134522577a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1049,7 +1049,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v6.3.5" "source": "https://github.com/symfony/string/tree/v6.3.8"
}, },
"funding": [ "funding": [
{ {
@@ -1065,7 +1065,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-09-18T10:38:32+00:00" "time": "2023-11-09T08:28:21+00:00"
}, },
{ {
"name": "zhamao/logger", "name": "zhamao/logger",
@@ -1691,16 +1691,16 @@
}, },
{ {
"name": "captainhook/captainhook", "name": "captainhook/captainhook",
"version": "5.18.2", "version": "5.18.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/captainhookphp/captainhook.git", "url": "https://github.com/captainhookphp/captainhook.git",
"reference": "61c24442f71ea216e9e172861d48d7676439dd18" "reference": "b7bc503a40ccfe80ea9638e4921b4697669d725f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/captainhookphp/captainhook/zipball/61c24442f71ea216e9e172861d48d7676439dd18", "url": "https://api.github.com/repos/captainhookphp/captainhook/zipball/b7bc503a40ccfe80ea9638e4921b4697669d725f",
"reference": "61c24442f71ea216e9e172861d48d7676439dd18", "reference": "b7bc503a40ccfe80ea9638e4921b4697669d725f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1762,7 +1762,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/captainhookphp/captainhook/issues", "issues": "https://github.com/captainhookphp/captainhook/issues",
"source": "https://github.com/captainhookphp/captainhook/tree/5.18.2" "source": "https://github.com/captainhookphp/captainhook/tree/5.18.3"
}, },
"funding": [ "funding": [
{ {
@@ -1770,7 +1770,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-10-16T15:13:42+00:00" "time": "2023-11-05T13:56:19+00:00"
}, },
{ {
"name": "captainhook/plugin-composer", "name": "captainhook/plugin-composer",
@@ -2247,16 +2247,16 @@
}, },
{ {
"name": "filp/whoops", "name": "filp/whoops",
"version": "2.15.3", "version": "2.15.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filp/whoops.git", "url": "https://github.com/filp/whoops.git",
"reference": "c83e88a30524f9360b11f585f71e6b17313b7187" "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", "url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546",
"reference": "c83e88a30524f9360b11f585f71e6b17313b7187", "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2306,7 +2306,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/filp/whoops/issues", "issues": "https://github.com/filp/whoops/issues",
"source": "https://github.com/filp/whoops/tree/2.15.3" "source": "https://github.com/filp/whoops/tree/2.15.4"
}, },
"funding": [ "funding": [
{ {
@@ -2314,54 +2314,54 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-07-13T12:00:00+00:00" "time": "2023-11-03T12:00:00+00:00"
}, },
{ {
"name": "friendsofphp/php-cs-fixer", "name": "friendsofphp/php-cs-fixer",
"version": "v3.37.1", "version": "v3.40.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "c3fe76976081ab871aa654e872da588077e19679" "reference": "27d2b3265b5d550ec411b4319967ae7cfddfb2e0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/c3fe76976081ab871aa654e872da588077e19679", "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/27d2b3265b5d550ec411b4319967ae7cfddfb2e0",
"reference": "c3fe76976081ab871aa654e872da588077e19679", "reference": "27d2b3265b5d550ec411b4319967ae7cfddfb2e0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"composer/semver": "^3.3", "composer/semver": "^3.4",
"composer/xdebug-handler": "^3.0.3", "composer/xdebug-handler": "^3.0.3",
"ext-json": "*", "ext-json": "*",
"ext-tokenizer": "*", "ext-tokenizer": "*",
"php": "^7.4 || ^8.0", "php": "^7.4 || ^8.0",
"sebastian/diff": "^4.0 || ^5.0", "sebastian/diff": "^4.0 || ^5.0",
"symfony/console": "^5.4 || ^6.0", "symfony/console": "^5.4 || ^6.0 || ^7.0",
"symfony/event-dispatcher": "^5.4 || ^6.0", "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0",
"symfony/filesystem": "^5.4 || ^6.0", "symfony/filesystem": "^5.4 || ^6.0 || ^7.0",
"symfony/finder": "^5.4 || ^6.0", "symfony/finder": "^5.4 || ^6.0 || ^7.0",
"symfony/options-resolver": "^5.4 || ^6.0", "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0",
"symfony/polyfill-mbstring": "^1.27", "symfony/polyfill-mbstring": "^1.28",
"symfony/polyfill-php80": "^1.27", "symfony/polyfill-php80": "^1.28",
"symfony/polyfill-php81": "^1.27", "symfony/polyfill-php81": "^1.28",
"symfony/process": "^5.4 || ^6.0", "symfony/process": "^5.4 || ^6.0 || ^7.0",
"symfony/stopwatch": "^5.4 || ^6.0" "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0"
}, },
"require-dev": { "require-dev": {
"facile-it/paraunit": "^1.3 || ^2.0", "facile-it/paraunit": "^1.3 || ^2.0",
"justinrainbow/json-schema": "^5.2", "justinrainbow/json-schema": "^5.2",
"keradus/cli-executor": "^2.0", "keradus/cli-executor": "^2.1",
"mikey179/vfsstream": "^1.6.11", "mikey179/vfsstream": "^1.6.11",
"php-coveralls/php-coveralls": "^2.5.3", "php-coveralls/php-coveralls": "^2.7",
"php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/accessible-object": "^1.1",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4",
"phpspec/prophecy": "^1.16", "phpspec/prophecy": "^1.17",
"phpspec/prophecy-phpunit": "^2.0", "phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.6",
"symfony/phpunit-bridge": "^6.2.3", "symfony/phpunit-bridge": "^6.3.8 || ^7.0",
"symfony/yaml": "^5.4 || ^6.0" "symfony/yaml": "^5.4 || ^6.0 || ^7.0"
}, },
"suggest": { "suggest": {
"ext-dom": "For handling output formats in XML", "ext-dom": "For handling output formats in XML",
@@ -2399,7 +2399,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.37.1" "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.40.0"
}, },
"funding": [ "funding": [
{ {
@@ -2407,7 +2407,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-10-29T20:51:23+00:00" "time": "2023-11-26T09:25:53+00:00"
}, },
{ {
"name": "humbug/box", "name": "humbug/box",
@@ -2521,16 +2521,16 @@
}, },
{ {
"name": "humbug/php-scoper", "name": "humbug/php-scoper",
"version": "0.18.4", "version": "0.18.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/humbug/php-scoper.git", "url": "https://github.com/humbug/php-scoper.git",
"reference": "d79c1486537280c21c907e9a8a610eceb391407f" "reference": "9386a0af946f175d7a1ebfb68851bc2bb8ad7858"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/humbug/php-scoper/zipball/d79c1486537280c21c907e9a8a610eceb391407f", "url": "https://api.github.com/repos/humbug/php-scoper/zipball/9386a0af946f175d7a1ebfb68851bc2bb8ad7858",
"reference": "d79c1486537280c21c907e9a8a610eceb391407f", "reference": "9386a0af946f175d7a1ebfb68851bc2bb8ad7858",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2548,7 +2548,7 @@
"bamarni/composer-bin-plugin": "^1.1", "bamarni/composer-bin-plugin": "^1.1",
"ergebnis/composer-normalize": "^2.28", "ergebnis/composer-normalize": "^2.28",
"fidry/makefile": "^1.0", "fidry/makefile": "^1.0",
"humbug/box": "^4.0", "humbug/box": "^4.5.1",
"phpspec/prophecy-phpunit": "^2.0", "phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.0", "phpunit/phpunit": "^9.0",
"symfony/yaml": "^6.1" "symfony/yaml": "^6.1"
@@ -2598,9 +2598,9 @@
"description": "Prefixes all PHP namespaces in a file or directory.", "description": "Prefixes all PHP namespaces in a file or directory.",
"support": { "support": {
"issues": "https://github.com/humbug/php-scoper/issues", "issues": "https://github.com/humbug/php-scoper/issues",
"source": "https://github.com/humbug/php-scoper/tree/0.18.4" "source": "https://github.com/humbug/php-scoper/tree/0.18.7"
}, },
"time": "2023-10-20T17:14:04+00:00" "time": "2023-11-04T18:01:12+00:00"
}, },
{ {
"name": "jetbrains/phpstorm-stubs", "name": "jetbrains/phpstorm-stubs",
@@ -2722,16 +2722,16 @@
}, },
{ {
"name": "laravel/serializable-closure", "name": "laravel/serializable-closure",
"version": "v1.3.2", "version": "v1.3.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/serializable-closure.git", "url": "https://github.com/laravel/serializable-closure.git",
"reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c" "reference": "3dbf8a8e914634c48d389c1234552666b3d43754"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/076fe2cf128bd54b4341cdc6d49b95b34e101e4c", "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754",
"reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c", "reference": "3dbf8a8e914634c48d389c1234552666b3d43754",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2778,7 +2778,7 @@
"issues": "https://github.com/laravel/serializable-closure/issues", "issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure" "source": "https://github.com/laravel/serializable-closure"
}, },
"time": "2023-10-17T13:38:16+00:00" "time": "2023-11-08T14:08:06+00:00"
}, },
{ {
"name": "myclabs/deep-copy", "name": "myclabs/deep-copy",
@@ -3477,16 +3477,16 @@
}, },
{ {
"name": "phpstan/phpdoc-parser", "name": "phpstan/phpdoc-parser",
"version": "1.24.2", "version": "1.24.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git", "url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "bcad8d995980440892759db0c32acae7c8e79442" "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442", "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6bd0c26f3786cd9b7c359675cb789e35a8e07496",
"reference": "bcad8d995980440892759db0c32acae7c8e79442", "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3518,22 +3518,22 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types", "description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": { "support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues", "issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2" "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.4"
}, },
"time": "2023-09-26T12:28:12+00:00" "time": "2023-11-26T18:29:22+00:00"
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.10.40", "version": "1.10.44",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "93c84b5bf7669920d823631e39904d69b9c7dc5d" "reference": "bf84367c53a23f759513985c54ffe0d0c249825b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/93c84b5bf7669920d823631e39904d69b9c7dc5d", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bf84367c53a23f759513985c54ffe0d0c249825b",
"reference": "93c84b5bf7669920d823631e39904d69b9c7dc5d", "reference": "bf84367c53a23f759513985c54ffe0d0c249825b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3582,20 +3582,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-10-30T14:48:31+00:00" "time": "2023-11-21T16:30:46+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "10.1.7", "version": "10.1.9",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "355324ca4980b8916c18b9db29f3ef484078f26e" "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/355324ca4980b8916c18b9db29f3ef484078f26e", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a56a9ab2f680246adcf3db43f38ddf1765774735",
"reference": "355324ca4980b8916c18b9db29f3ef484078f26e", "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3652,7 +3652,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.7" "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.9"
}, },
"funding": [ "funding": [
{ {
@@ -3660,7 +3660,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-10-04T15:34:17+00:00" "time": "2023-11-23T12:23:20+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@@ -5292,7 +5292,7 @@
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
"version": "v3.3.0", "version": "v3.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git", "url": "https://github.com/symfony/event-dispatcher-contracts.git",
@@ -5348,7 +5348,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0"
}, },
"funding": [ "funding": [
{ {
@@ -5685,16 +5685,16 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v6.3.6", "version": "v6.3.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "999ede244507c32b8e43aebaa10e9fce20de7c97" "reference": "81acabba9046550e89634876ca64bfcd3c06aa0a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/999ede244507c32b8e43aebaa10e9fce20de7c97", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/81acabba9046550e89634876ca64bfcd3c06aa0a",
"reference": "999ede244507c32b8e43aebaa10e9fce20de7c97", "reference": "81acabba9046550e89634876ca64bfcd3c06aa0a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5749,7 +5749,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v6.3.6" "source": "https://github.com/symfony/var-dumper/tree/v6.3.8"
}, },
"funding": [ "funding": [
{ {
@@ -5765,7 +5765,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-10-12T18:45:56+00:00" "time": "2023-11-08T10:42:36+00:00"
}, },
{ {
"name": "thecodingmachine/safe", "name": "thecodingmachine/safe",
@@ -5908,16 +5908,16 @@
}, },
{ {
"name": "theseer/tokenizer", "name": "theseer/tokenizer",
"version": "1.2.1", "version": "1.2.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/theseer/tokenizer.git", "url": "https://github.com/theseer/tokenizer.git",
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5946,7 +5946,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": { "support": {
"issues": "https://github.com/theseer/tokenizer/issues", "issues": "https://github.com/theseer/tokenizer/issues",
"source": "https://github.com/theseer/tokenizer/tree/1.2.1" "source": "https://github.com/theseer/tokenizer/tree/1.2.2"
}, },
"funding": [ "funding": [
{ {
@@ -5954,7 +5954,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2021-07-28T10:34:58+00:00" "time": "2023-11-20T00:12:19+00:00"
}, },
{ {
"name": "webmozart/assert", "name": "webmozart/assert",

View File

@@ -118,7 +118,7 @@
"iconv": { "iconv": {
"type": "builtin", "type": "builtin",
"arg-type": "with-prefix", "arg-type": "with-prefix",
"lib-depends-windows": [ "lib-depends": [
"libiconv" "libiconv"
] ]
}, },
@@ -132,12 +132,12 @@
}, },
"imap": { "imap": {
"type": "builtin", "type": "builtin",
"arg-type": "with", "arg-type": "custom",
"lib-depends": [ "lib-depends": [
"imap" "imap"
], ],
"lib-suggests": [ "lib-suggests": [
"kerberos" "openssl"
] ]
}, },
"inotify": { "inotify": {
@@ -169,14 +169,14 @@
"arg-type": "custom", "arg-type": "custom",
"ext-depends": [ "ext-depends": [
"mbstring" "mbstring"
],
"lib-depends": [
"onig"
] ]
}, },
"mbstring": { "mbstring": {
"type": "builtin", "type": "builtin",
"arg-type": "custom", "arg-type": "custom"
"lib-depends": [
"onig"
]
}, },
"memcache": { "memcache": {
"type": "external", "type": "external",
@@ -234,7 +234,8 @@
"type": "builtin", "type": "builtin",
"arg-type": "custom", "arg-type": "custom",
"lib-depends": [ "lib-depends": [
"openssl" "openssl",
"zlib"
], ],
"ext-depends": [ "ext-depends": [
"zlib" "zlib"
@@ -305,6 +306,11 @@
"aspell" "aspell"
] ]
}, },
"rar": {
"type": "external",
"source": "rar",
"cpp-extension": true
},
"readline": { "readline": {
"type": "builtin", "type": "builtin",
"arg-type": "with-prefix", "arg-type": "with-prefix",
@@ -429,7 +435,7 @@
}, },
"tidy": { "tidy": {
"type": "builtin", "type": "builtin",
"arg-type": "with", "arg-type": "with-prefix",
"lib-depends": [ "lib-depends": [
"tidy" "tidy"
] ]

View File

@@ -141,6 +141,15 @@
"libxml2" "libxml2"
] ]
}, },
"imap": {
"source": "imap",
"static-libs-unix": [
"libc-client.a"
],
"lib-suggests": [
"openssl"
]
},
"ldap": { "ldap": {
"source": "ldap", "source": "ldap",
"static-libs-unix": [ "static-libs-unix": [
@@ -302,8 +311,7 @@
], ],
"lib-suggests-windows": [ "lib-suggests-windows": [
"icu", "icu",
"xz", "xz"
"pthreads4w"
] ]
}, },
"libxslt": { "libxslt": {
@@ -441,18 +449,6 @@
"zstd" "zstd"
] ]
}, },
"pthreads4w": {
"source": "pthreads4w",
"static-libs-windows": [
"libpthreadVC3.lib"
],
"headers-windows": [
"_ptw32.h",
"pthread.h",
"sched.h",
"semaphore.h"
]
},
"readline": { "readline": {
"source": "readline", "source": "readline",
"static-libs-unix": [ "static-libs-unix": [
@@ -487,6 +483,12 @@
"sqlite3ext.h" "sqlite3ext.h"
] ]
}, },
"tidy": {
"source": "tidy",
"static-libs-unix": [
"libtidy.a"
]
},
"xz": { "xz": {
"source": "xz", "source": "xz",
"static-libs-unix": [ "static-libs-unix": [

View File

@@ -111,9 +111,9 @@
} }
}, },
"freetype": { "freetype": {
"type": "filelist", "type": "git",
"url": "https://download-mirror.savannah.gnu.org/releases/freetype/", "rev": "VER-2-13-2",
"regex": "/href=\"(?<file>freetype-(?<version>[^\"]+)\\.tar\\.xz)\"/", "url": "https://github.com/freetype/freetype",
"license": { "license": {
"type": "file", "type": "file",
"path": "LICENSE.TXT" "path": "LICENSE.TXT"
@@ -144,6 +144,15 @@
"path": "LICENSE" "path": "LICENSE"
} }
}, },
"imap": {
"type": "git",
"url": "https://github.com/static-php/imap.git",
"rev": "master",
"license": {
"type": "file",
"path": "LICENSE"
}
},
"inotify": { "inotify": {
"type": "url", "type": "url",
"url": "https://pecl.php.net/get/inotify", "url": "https://pecl.php.net/get/inotify",
@@ -208,7 +217,7 @@
}, },
"libmcrypt": { "libmcrypt": {
"type": "url", "type": "url",
"url": "https://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz", "url": "https://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz",
"license": { "license": {
"type": "file", "type": "file",
"path": "COPYING" "path": "COPYING"
@@ -216,7 +225,7 @@
}, },
"libmemcached": { "libmemcached": {
"type": "git", "type": "git",
"url": "https://github.com/crazywhalecc/libmemcached-macos.git", "url": "https://github.com/static-php/libmemcached-macos.git",
"rev": "master", "rev": "master",
"license": { "license": {
"type": "file", "type": "file",
@@ -225,7 +234,7 @@
}, },
"libpng": { "libpng": {
"type": "git", "type": "git",
"url": "https://git.code.sf.net/p/libpng/code", "url": "https://github.com/glennrp/libpng.git",
"rev": "libpng16", "rev": "libpng16",
"license": { "license": {
"type": "file", "type": "file",
@@ -294,7 +303,7 @@
}, },
"mcrypt": { "mcrypt": {
"type": "url", "type": "url",
"url": "https://jaist.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz", "url": "https://downloads.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz",
"license": { "license": {
"type": "file", "type": "file",
"path": "COPYING" "path": "COPYING"
@@ -314,7 +323,7 @@
"type": "git", "type": "git",
"path": "php-src/sapi/micro", "path": "php-src/sapi/micro",
"rev": "master", "rev": "master",
"url": "https://github.com/crazywhalecc/phpmicro", "url": "https://github.com/static-php/phpmicro",
"license": { "license": {
"type": "file", "type": "file",
"path": "LICENSE" "path": "LICENSE"
@@ -393,10 +402,11 @@
"path": "LICENSE" "path": "LICENSE"
} }
}, },
"pthreads4w": { "rar": {
"type": "git", "type": "git",
"rev": "master", "url": "https://github.com/static-php/php-rar.git",
"url": "https://git.code.sf.net/p/pthreads4w/code", "path": "php-src/ext/rar",
"rev": "issue-php82",
"license": { "license": {
"type": "file", "type": "file",
"path": "LICENSE" "path": "LICENSE"
@@ -459,6 +469,15 @@
"path": "LICENSE" "path": "LICENSE"
} }
}, },
"tidy": {
"type": "url",
"url": "https://github.com/htacg/tidy-html5/archive/refs/tags/5.8.0.tar.gz",
"filename": "tidy-html5.tgz",
"license": {
"type": "file",
"path": "README/LICENSE.md"
}
},
"xlswriter": { "xlswriter": {
"type": "url", "type": "url",
"url": "https://pecl.php.net/get/xlswriter", "url": "https://pecl.php.net/get/xlswriter",

View File

@@ -69,7 +69,7 @@ abstract class BuilderBase
foreach ($libraries as $library) { foreach ($libraries as $library) {
// if some libs are not supported (but in config "lib.json", throw exception) // if some libs are not supported (but in config "lib.json", throw exception)
if (!isset($support_lib_list[$library])) { if (!isset($support_lib_list[$library])) {
throw new RuntimeException('library [' . $library . '] is in the lib.json list but not supported to compile, but in the future I will support it!'); throw new WrongUsageException('library [' . $library . '] is in the lib.json list but not supported to compile, but in the future I will support it!');
} }
$lib = new ($support_lib_list[$library])($this); $lib = new ($support_lib_list[$library])($this);
$this->addLib($lib); $this->addLib($lib);

View File

@@ -163,6 +163,35 @@ class Extension
return false; return false;
} }
/**
* Run compile check if build target is cli
* If you need to run some check, overwrite this or add your assert in src/globals/tests/{extension_name}.php
* If check failed, throw RuntimeException
*
* @throws RuntimeException
*/
public function runCliCheck(): void
{
[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php --ri "' . $this->getDistName() . '"', false);
if ($ret !== 0) {
throw new RuntimeException('extension ' . $this->getName() . ' failed compile check: php-cli returned ' . $ret);
}
if (file_exists(ROOT_DIR . '/src/globals/tests/' . $this->getName() . '.php')) {
// Trim additional content & escape special characters to allow inline usage
$test = str_replace(
['<?php', 'declare(strict_types=1);', "\n", '"', '$'],
['', '', '', '\"', '\$'],
file_get_contents(ROOT_DIR . '/src/globals/tests/' . $this->getName() . '.php')
);
[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php -r "' . trim($test) . '"');
if ($ret !== 0) {
throw new RuntimeException('extension ' . $this->getName() . ' failed sanity check');
}
}
}
/** /**
* @throws RuntimeException * @throws RuntimeException
*/ */

View File

@@ -17,10 +17,19 @@ class glfw extends Extension
*/ */
public function patchBeforeBuildconf(): bool public function patchBeforeBuildconf(): bool
{ {
if (file_exists(SOURCE_PATH . '/php-src/ext/glfw')) {
return false;
}
FileSystem::copyDir(SOURCE_PATH . '/ext-glfw', SOURCE_PATH . '/php-src/ext/glfw'); FileSystem::copyDir(SOURCE_PATH . '/ext-glfw', SOURCE_PATH . '/php-src/ext/glfw');
return true; return true;
} }
public function patchBeforeConfigure(): bool
{
FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/configure', '-lglfw ', '-lglfw3 ');
return true;
}
public function getUnixConfigureArg(): string public function getUnixConfigureArg(): string
{ {
return '--enable-glfw --with-glfw-dir=' . BUILD_ROOT_PATH; return '--enable-glfw --with-glfw-dir=' . BUILD_ROOT_PATH;

View File

@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace SPC\builder\extension;
use SPC\builder\Extension;
use SPC\exception\WrongUsageException;
use SPC\util\CustomExt;
#[CustomExt('imap')]
class imap extends Extension
{
/**
* @throws WrongUsageException
*/
public function getUnixConfigureArg(): string
{
if ($this->builder->getOption('enable-zts')) {
throw new WrongUsageException('ext-imap is not thread safe, do not build it with ZTS builds');
}
$arg = '--with-imap=' . BUILD_ROOT_PATH;
if ($this->builder->getLib('openssl') !== null) {
$arg .= ' --with-imap-ssl=' . BUILD_ROOT_PATH;
}
return $arg;
}
}

View File

@@ -5,18 +5,25 @@ declare(strict_types=1);
namespace SPC\builder\extension; namespace SPC\builder\extension;
use SPC\builder\Extension; use SPC\builder\Extension;
use SPC\exception\RuntimeException;
use SPC\util\CustomExt; use SPC\util\CustomExt;
#[CustomExt('mbregex')] #[CustomExt('mbregex')]
class mbregex extends Extension class mbregex extends Extension
{ {
public function getDistName(): string
{
return 'mbstring';
}
public function getConfigureArg(): string public function getConfigureArg(): string
{ {
return ''; return '';
} }
/**
* mbregex is not an extension, we need to overwrite the default check.
*/
public function runCliCheck(): void
{
[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php --ri "mbstring" | grep regex', false);
if ($ret !== 0) {
throw new RuntimeException('extension ' . $this->getName() . ' failed compile check: compiled php-cli mbstring extension does not contain regex !');
}
}
} }

View File

@@ -13,11 +13,11 @@ class swoole extends Extension
public function getUnixConfigureArg(): string public function getUnixConfigureArg(): string
{ {
$arg = '--enable-swoole'; $arg = '--enable-swoole';
$arg .= $this->builder->getExt('pgsql') ? ' --enable-swoole-pgsql' : ' --disable-swoole-pgsql'; // pgsql hook is buggy for static php
$arg .= ' --disable-swoole-pgsql';
$arg .= $this->builder->getLib('openssl') ? ' --enable-openssl' : ' --disable-openssl --without-openssl'; $arg .= $this->builder->getLib('openssl') ? ' --enable-openssl' : ' --disable-openssl --without-openssl';
$arg .= $this->builder->getLib('brotli') ? (' --enable-brotli --with-brotli-dir=' . BUILD_ROOT_PATH) : ''; $arg .= $this->builder->getLib('brotli') ? (' --enable-brotli --with-brotli-dir=' . BUILD_ROOT_PATH) : ' --disable-brotli';
// curl hook is buggy for static php $arg .= $this->builder->getExt('curl') ? ' --enable-swoole-curl' : ' --disable-swoole-curl';
$arg .= ' --disable-swoole-curl';
return $arg; return $arg;
} }
} }

View File

@@ -0,0 +1,63 @@
<?php
declare(strict_types=1);
namespace SPC\builder\linux\library;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
use SPC\store\FileSystem;
class imap extends LinuxLibraryBase
{
public const NAME = 'imap';
/**
* @throws FileSystemException
*/
public function patchBeforeBuild(): bool
{
$cc = getenv('CC') ?: 'gcc';
// FileSystem::replaceFileStr($this->source_dir . '/Makefile', '-DMAC_OSX_KLUDGE=1', '');
FileSystem::replaceFileStr($this->source_dir . '/src/osdep/unix/Makefile', 'CC=cc', "CC={$cc}");
/* FileSystem::replaceFileStr($this->source_dir . '/src/osdep/unix/Makefile', '-lcrypto -lz', '-lcrypto');
FileSystem::replaceFileStr($this->source_dir . '/src/osdep/unix/Makefile', '-lcrypto', '-lcrypto -lz');
FileSystem::replaceFileStr(
$this->source_dir . '/src/osdep/unix/ssl_unix.c',
"#include <x509v3.h>\n#include <ssl.h>",
"#include <ssl.h>\n#include <x509v3.h>"
);
// SourcePatcher::patchFile('1006_openssl1.1_autoverify.patch', $this->source_dir);
SourcePatcher::patchFile('2014_openssl1.1.1_sni.patch', $this->source_dir); */
FileSystem::replaceFileStr($this->source_dir . '/Makefile', 'SSLINCLUDE=/usr/include/openssl', 'SSLINCLUDE=' . BUILD_INCLUDE_PATH);
FileSystem::replaceFileStr($this->source_dir . '/Makefile', 'SSLLIB=/usr/lib', 'SSLLIB=' . BUILD_LIB_PATH);
return true;
}
/**
* @throws RuntimeException
*/
protected function build(): void
{
if ($this->builder->getLib('openssl')) {
$ssl_options = 'SPECIALAUTHENTICATORS=ssl SSLTYPE=unix.nopwd SSLINCLUDE=' . BUILD_INCLUDE_PATH . ' SSLLIB=' . BUILD_LIB_PATH;
} else {
$ssl_options = 'SSLTYPE=none';
}
shell()->cd($this->source_dir)
->exec('make clean')
->exec('touch ip6')
->exec(
"yes | make slx {$ssl_options}"
);
try {
shell()
->exec("cp -rf {$this->source_dir}/c-client/c-client.a " . BUILD_LIB_PATH . '/libc-client.a')
->exec("cp -rf {$this->source_dir}/c-client/*.c " . BUILD_LIB_PATH . '/')
->exec("cp -rf {$this->source_dir}/c-client/*.h " . BUILD_INCLUDE_PATH . '/')
->exec("cp -rf {$this->source_dir}/src/osdep/unix/*.h " . BUILD_INCLUDE_PATH . '/');
} catch (\Throwable) {
// last command throws an exception, no idea why since it works
}
}
}

View File

@@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
namespace SPC\builder\linux\library;
class tidy extends LinuxLibraryBase
{
use \SPC\builder\unix\library\tidy;
public const NAME = 'tidy';
}

View File

@@ -0,0 +1,66 @@
<?php
declare(strict_types=1);
namespace SPC\builder\macos\library;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
use SPC\store\FileSystem;
use SPC\store\SourcePatcher;
class imap extends MacOSLibraryBase
{
public const NAME = 'imap';
/**
* @throws FileSystemException
* @throws RuntimeException
*/
public function patchBeforeBuild(): bool
{
$cc = getenv('CC') ?: 'clang';
SourcePatcher::patchFile('0001_imap_macos.patch', $this->source_dir);
// FileSystem::replaceFileStr($this->source_dir . '/Makefile', '-DMAC_OSX_KLUDGE=1', '');
FileSystem::replaceFileStr($this->source_dir . '/src/osdep/unix/Makefile', 'CC=cc', "CC={$cc}");
/* FileSystem::replaceFileStr($this->source_dir . '/src/osdep/unix/Makefile', '-lcrypto -lz', '-lcrypto');
FileSystem::replaceFileStr($this->source_dir . '/src/osdep/unix/Makefile', '-lcrypto', '-lcrypto -lz');
FileSystem::replaceFileStr(
$this->source_dir . '/src/osdep/unix/ssl_unix.c',
"#include <x509v3.h>\n#include <ssl.h>",
"#include <ssl.h>\n#include <x509v3.h>"
);
// SourcePatcher::patchFile('1006_openssl1.1_autoverify.patch', $this->source_dir);
SourcePatcher::patchFile('2014_openssl1.1.1_sni.patch', $this->source_dir); */
FileSystem::replaceFileStr($this->source_dir . '/Makefile', 'SSLINCLUDE=/usr/include/openssl', 'SSLINCLUDE=' . BUILD_INCLUDE_PATH);
FileSystem::replaceFileStr($this->source_dir . '/Makefile', 'SSLLIB=/usr/lib', 'SSLLIB=' . BUILD_LIB_PATH);
return true;
}
/**
* @throws RuntimeException
*/
protected function build(): void
{
if ($this->builder->getLib('openssl')) {
$ssl_options = 'SPECIALAUTHENTICATORS=ssl SSLTYPE=unix.nopwd SSLINCLUDE=' . BUILD_INCLUDE_PATH . ' SSLLIB=' . BUILD_LIB_PATH;
} else {
$ssl_options = 'SSLTYPE=none';
}
shell()->cd($this->source_dir)
->exec('make clean')
->exec('touch ip6')
->exec(
"yes | EXTRACFLAGS='-Wimplicit-function-declaration -include $(xcrun --show-sdk-path)/usr/include/poll.h -include $(xcrun --show-sdk-path)/usr/include/time.h -include $(xcrun --show-sdk-path)/usr/include/utime.h' make osx {$ssl_options}"
);
try {
shell()
->exec("cp -rf {$this->source_dir}/c-client/c-client.a " . BUILD_LIB_PATH . '/libc-client.a')
->exec("cp -rf {$this->source_dir}/c-client/*.c " . BUILD_LIB_PATH . '/')
->exec("cp -rf {$this->source_dir}/c-client/*.h " . BUILD_INCLUDE_PATH . '/')
->exec("cp -rf {$this->source_dir}/src/osdep/unix/*.h " . BUILD_INCLUDE_PATH . '/');
} catch (\Throwable) {
// last command throws an exception, no idea why since it works
}
}
}

View File

@@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
namespace SPC\builder\macos\library;
class tidy extends MacOSLibraryBase
{
use \SPC\builder\unix\library\tidy;
public const NAME = 'tidy';
}

View File

@@ -66,24 +66,7 @@ trait UnixBuilderTrait
foreach ($this->exts as $ext) { foreach ($this->exts as $ext) {
logger()->debug('testing ext: ' . $ext->getName()); logger()->debug('testing ext: ' . $ext->getName());
[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php --ri "' . $ext->getDistName() . '"', false); $ext->runCliCheck();
if ($ret !== 0) {
throw new RuntimeException('extension ' . $ext->getName() . ' failed compile check');
}
if (file_exists(ROOT_DIR . '/src/globals/tests/' . $ext->getName() . '.php')) {
// Trim additional content & escape special characters to allow inline usage
$test = str_replace(
['<?php', 'declare(strict_types=1);', "\n", '"', '$'],
['', '', '', '\"', '\$'],
file_get_contents(ROOT_DIR . '/src/globals/tests/' . $ext->getName() . '.php')
);
[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php -r "' . trim($test) . '"');
if ($ret !== 0) {
throw new RuntimeException('extension ' . $ext->getName() . ' failed sanity check');
}
}
} }
} }

View File

@@ -26,6 +26,7 @@ trait freetype
$suggested .= ' '; $suggested .= ' ';
shell()->cd($this->source_dir) shell()->cd($this->source_dir)
->exec('sh autogen.sh')
->exec( ->exec(
'./configure ' . './configure ' .
'--enable-static --disable-shared --without-harfbuzz --prefix= ' . '--enable-static --disable-shared --without-harfbuzz --prefix= ' .

View File

@@ -24,7 +24,6 @@ trait postgresql
$optional_packages = [ $optional_packages = [
'zstd' => 'libzstd', 'zstd' => 'libzstd',
'ldap' => 'ldap', 'ldap' => 'ldap',
'libpam' => 'libpam',
'libxslt' => 'libxslt', 'libxslt' => 'libxslt',
'icu' => 'icu-i18n', 'icu' => 'icu-i18n',
]; ];
@@ -74,12 +73,12 @@ trait postgresql
'--with-libxml ' . '--with-libxml ' .
($this->builder->getLib('icu') ? '--with-icu ' : '--without-icu ') . ($this->builder->getLib('icu') ? '--with-icu ' : '--without-icu ') .
($this->builder->getLib('ldap') ? '--with-ldap ' : '--without-ldap ') . ($this->builder->getLib('ldap') ? '--with-ldap ' : '--without-ldap ') .
($this->builder->getLib('libpam') ? '--with-pam ' : '--without-pam ') .
($this->builder->getLib('libxslt') ? '--with-libxslt ' : '--without-libxslt ') . ($this->builder->getLib('libxslt') ? '--with-libxslt ' : '--without-libxslt ') .
($this->builder->getLib('zstd') ? '--with-zstd ' : '--without-zstd ') . ($this->builder->getLib('zstd') ? '--with-zstd ' : '--without-zstd ') .
'--without-lz4 ' . '--without-lz4 ' .
'--without-perl ' . '--without-perl ' .
'--without-python ' . '--without-python ' .
'--without-pam ' .
'--without-bonjour ' . '--without-bonjour ' .
'--without-tcl ' '--without-tcl '
); );

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace SPC\builder\unix\library;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
use SPC\store\FileSystem;
trait tidy
{
/**
* @throws RuntimeException
* @throws FileSystemException
*/
protected function build(): void
{
FileSystem::resetDir($this->source_dir . '/build-dir');
shell()->cd($this->source_dir . '/build-dir')
->exec(
'cmake ' .
"{$this->builder->makeCmakeArgs()} " .
'-DBUILD_SHARED_LIB=OFF ' .
'-DSUPPORT_CONSOLE_APP=OFF ' .
'..'
)
->exec("cmake --build . -j {$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
$this->patchPkgconfPrefix(['tidy.pc']);
}
}

View File

@@ -12,6 +12,7 @@ use SPC\store\Config;
use SPC\util\DependencyUtil; use SPC\util\DependencyUtil;
use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
use function Laravel\Prompts\table; use function Laravel\Prompts\table;
@@ -22,6 +23,13 @@ class AllExtCommand extends BaseCommand
public function configure(): void public function configure(): void
{ {
$this->addArgument('extensions', InputArgument::OPTIONAL, 'List of extensions that will be displayed, comma separated'); $this->addArgument('extensions', InputArgument::OPTIONAL, 'List of extensions that will be displayed, comma separated');
$this->addOption(
'columns',
null,
InputOption::VALUE_REQUIRED,
'List of columns that will be displayed, comma separated (lib-depends, lib-suggests, ext-depends, ext-suggests, unix-only)',
'lib-depends,lib-suggests,ext-depends,ext-suggests,unix-only'
);
} }
/** /**
@@ -32,6 +40,16 @@ class AllExtCommand extends BaseCommand
public function handle(): int public function handle(): int
{ {
$extensions = array_map('trim', array_filter(explode(',', $this->getArgument('extensions') ?? ''))); $extensions = array_map('trim', array_filter(explode(',', $this->getArgument('extensions') ?? '')));
$columns = array_map('trim', array_filter(explode(',', $this->getOption('columns'))));
foreach ($columns as $column) {
if (!in_array($column, ['lib-depends', 'lib-suggests', 'ext-depends', 'ext-suggests', 'unix-only', 'type'])) {
$this->output->writeln('<error>Column name [' . $column . '] is not valid.</error>');
$this->output->writeln('<error>Available column name: lib-depends, lib-suggests, ext-depends, ext-suggests, unix-only, type</error>');
return static::FAILURE;
}
}
array_unshift($columns, 'name');
$style = new SymfonyStyle($this->input, $this->output); $style = new SymfonyStyle($this->input, $this->output);
$style->writeln($extensions ? 'Available extensions:' : 'Extensions:'); $style->writeln($extensions ? 'Available extensions:' : 'Extensions:');
@@ -51,23 +69,26 @@ class AllExtCommand extends BaseCommand
$lib_suggests = Config::getExt($extension, 'lib-suggests', []); $lib_suggests = Config::getExt($extension, 'lib-suggests', []);
$ext_suggests = Config::getExt($extension, 'ext-suggests', []); $ext_suggests = Config::getExt($extension, 'ext-suggests', []);
$data[] = [ $row = [];
$extension, foreach ($columns as $column) {
implode(', ', $libraries), $row[] = match ($column) {
implode(', ', $lib_suggests), 'name' => $extension,
implode(',', $not_included), 'type' => Config::getExt($extension, 'type'),
implode(', ', $ext_suggests), 'lib-depends' => implode(', ', $libraries),
Config::getExt($extension, 'unix-only', false) ? 'true' : 'false', 'lib-suggests' => implode(', ', $lib_suggests),
]; 'ext-depends' => implode(',', $not_included),
'ext-suggests' => implode(', ', $ext_suggests),
'unix-only' => Config::getExt($extension, 'unix-only', false) ? 'true' : 'false',
default => '',
};
}
$data[] = $row;
} }
if ($data === []) { if ($data === []) {
$style->warning('Unknown extension selected: ' . implode(',', $extensions)); $style->warning('Unknown extension selected: ' . implode(',', $extensions));
} else { } else {
table( table($columns, $data);
['Extension', 'lib-depends', 'lib-suggests', 'ext-depends', 'ext-suggests', 'unix-only'],
$data
);
} }
return static::SUCCESS; return static::SUCCESS;

View File

@@ -28,7 +28,7 @@ class LinuxToolCheckList
'git', 'autoconf', 'automake', 'git', 'autoconf', 'automake',
'tar', 'unzip', 'gzip', 'tar', 'unzip', 'gzip',
'bzip2', 'cmake', 'patch', 'bzip2', 'cmake', 'patch',
'xz', 'xz', 'libtoolize',
]; ];
public const TOOLS_RHEL = [ public const TOOLS_RHEL = [
@@ -36,7 +36,7 @@ class LinuxToolCheckList
'git', 'autoconf', 'automake', 'git', 'autoconf', 'automake',
'tar', 'unzip', 'gzip', 'gcc', 'tar', 'unzip', 'gzip', 'gcc',
'bzip2', 'cmake', 'patch', 'bzip2', 'cmake', 'patch',
'xz', 'wget', // to get musl 'xz',
]; ];
/** @noinspection PhpUnused */ /** @noinspection PhpUnused */
@@ -47,8 +47,7 @@ class LinuxToolCheckList
$required = match ($distro['dist']) { $required = match ($distro['dist']) {
'alpine' => self::TOOLS_ALPINE, 'alpine' => self::TOOLS_ALPINE,
'almalinux' => self::TOOLS_RHEL, 'redhat' => self::TOOLS_RHEL,
'rhel' => self::TOOLS_RHEL,
default => self::TOOLS_DEBIAN, default => self::TOOLS_DEBIAN,
}; };
$missing = []; $missing = [];
@@ -61,8 +60,7 @@ class LinuxToolCheckList
return match ($distro['dist']) { return match ($distro['dist']) {
'ubuntu', 'ubuntu',
'alpine', 'alpine',
'rhel', 'redhat',
'almalinux',
'debian' => CheckResult::fail(implode(', ', $missing) . ' not installed on your system', 'install-linux-tools', [$distro, $missing]), 'debian' => CheckResult::fail(implode(', ', $missing) . ' not installed on your system', 'install-linux-tools', [$distro, $missing]),
default => CheckResult::fail(implode(', ', $missing) . ' not installed on your system'), default => CheckResult::fail(implode(', ', $missing) . ' not installed on your system'),
}; };
@@ -74,11 +72,10 @@ class LinuxToolCheckList
#[AsCheckItem('if necessary packages are installed', limit_os: 'Linux')] #[AsCheckItem('if necessary packages are installed', limit_os: 'Linux')]
public function checkSystemOSPackages(): ?CheckResult public function checkSystemOSPackages(): ?CheckResult
{ {
$distro = SystemUtil::getOSRelease(); if (SystemUtil::isMuslDist()) {
if ($distro['dist'] === 'alpine') {
// check linux-headers installation // check linux-headers installation
if (!file_exists('/usr/include/linux/mman.h')) { if (!file_exists('/usr/include/linux/mman.h')) {
return CheckResult::fail('linux-headers not installed on your system', 'install-linux-tools', [$distro, ['linux-headers']]); return CheckResult::fail('linux-headers not installed on your system', 'install-linux-tools', [SystemUtil::getOSRelease(), ['linux-headers']]);
} }
} }
return CheckResult::ok(); return CheckResult::ok();
@@ -94,8 +91,7 @@ class LinuxToolCheckList
$install_cmd = match ($distro['dist']) { $install_cmd = match ($distro['dist']) {
'ubuntu', 'debian' => 'apt-get install -y', 'ubuntu', 'debian' => 'apt-get install -y',
'alpine' => 'apk add', 'alpine' => 'apk add',
'rhel' => 'dnf install -y', 'redhat' => 'dnf install -y',
'almalinux' => 'dnf install -y',
default => throw new RuntimeException('Current linux distro does not have an auto-install script for musl packages yet.'), default => throw new RuntimeException('Current linux distro does not have an auto-install script for musl packages yet.'),
}; };
$prefix = ''; $prefix = '';
@@ -104,8 +100,9 @@ class LinuxToolCheckList
logger()->warning('Current user is not root, using sudo for running command'); logger()->warning('Current user is not root, using sudo for running command');
} }
try { try {
$is_rhel = in_array($distro['dist'], ['rhel', 'almalinux']); $is_debian = in_array($distro['dist'], ['debian', 'ubuntu']);
$to_install = $is_rhel ? $missing : str_replace('xz', 'xz-utils', $missing); $to_install = $is_debian ? str_replace('xz', 'xz-utils', $missing) : $missing;
$to_install = $is_debian ? str_replace('libtoolize', 'libtool', $to_install) : $to_install;
shell(true)->exec($prefix . $install_cmd . ' ' . implode(' ', $to_install)); shell(true)->exec($prefix . $install_cmd . ' ' . implode(' ', $to_install));
} catch (RuntimeException) { } catch (RuntimeException) {
return false; return false;

View File

@@ -0,0 +1,220 @@
From 5ab3bd7fa858eec0626a9dd0117ca3b050ef4660 Mon Sep 17 00:00:00 2001
From: crazywhalecc <jesse2061@outlook.com>
Date: Mon, 13 Nov 2023 00:00:52 +0800
Subject: [PATCH] make macOS static compile happy
---
src/c-client/netmsg.c | 1 +
src/c-client/nntp.c | 1 +
src/osdep/amiga/dummy.c | 1 +
src/osdep/amiga/mbx.c | 1 +
src/osdep/amiga/mh.c | 1 +
src/osdep/amiga/mtx.c | 1 +
src/osdep/amiga/unix.c | 1 +
src/osdep/unix/dummy.c | 1 +
src/osdep/unix/mbx.c | 1 +
src/osdep/unix/mh.c | 1 +
src/osdep/unix/mmdf.c | 1 +
src/osdep/unix/mtx.c | 1 +
src/osdep/unix/mx.c | 1 +
src/osdep/unix/tcp_unix.c | 1 +
src/osdep/unix/tenex.c | 2 ++
src/osdep/unix/unix.c | 1 +
16 files changed, 17 insertions(+)
diff --git a/src/c-client/netmsg.c b/src/c-client/netmsg.c
index 187e4eb..f316d0b 100644
--- a/src/c-client/netmsg.c
+++ b/src/c-client/netmsg.c
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <errno.h>
+#include <time.h>
extern int errno; /* just in case */
#include "c-client.h"
#include "netmsg.h"
diff --git a/src/c-client/nntp.c b/src/c-client/nntp.c
index fe90edb..b2f7536 100644
--- a/src/c-client/nntp.c
+++ b/src/c-client/nntp.c
@@ -29,6 +29,7 @@
#include <ctype.h>
#include <stdio.h>
+#include <time.h>
#include "c-client.h"
#include "newsrc.h"
#include "netmsg.h"
diff --git a/src/osdep/amiga/dummy.c b/src/osdep/amiga/dummy.c
index b003a0b..2c65824 100644
--- a/src/osdep/amiga/dummy.c
+++ b/src/osdep/amiga/dummy.c
@@ -35,6 +35,7 @@ extern int errno; /* just in case */
#include "osdep.h"
#include <pwd.h>
#include <sys/stat.h>
+#include <time.h>
#include "dummy.h"
#include "misc.h"
diff --git a/src/osdep/amiga/mbx.c b/src/osdep/amiga/mbx.c
index 1ece5d8..2495965 100644
--- a/src/osdep/amiga/mbx.c
+++ b/src/osdep/amiga/mbx.c
@@ -43,6 +43,7 @@ extern int errno; /* just in case */
#include <pwd.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <utime.h>
#include "misc.h"
#include "dummy.h"
#include "fdstring.h"
diff --git a/src/osdep/amiga/mh.c b/src/osdep/amiga/mh.c
index 0226b7a..e7c907a 100644
--- a/src/osdep/amiga/mh.c
+++ b/src/osdep/amiga/mh.c
@@ -36,6 +36,7 @@ extern int errno; /* just in case */
#include <pwd.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <utime.h>
#include "misc.h"
#include "dummy.h"
#include "fdstring.h"
diff --git a/src/osdep/amiga/mtx.c b/src/osdep/amiga/mtx.c
index 8e6f76e..ca7b368 100644
--- a/src/osdep/amiga/mtx.c
+++ b/src/osdep/amiga/mtx.c
@@ -43,6 +43,7 @@ extern int errno; /* just in case */
#include <pwd.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <utime.h>
#include "misc.h"
#include "dummy.h"
#include "fdstring.h"
diff --git a/src/osdep/amiga/unix.c b/src/osdep/amiga/unix.c
index be3c437..c755fe7 100644
--- a/src/osdep/amiga/unix.c
+++ b/src/osdep/amiga/unix.c
@@ -46,6 +46,7 @@ extern int errno; /* just in case */
#include "osdep.h"
#include <time.h>
#include <sys/stat.h>
+#include <utime.h>
#include "unix.h"
#include "pseudo.h"
#include "fdstring.h"
diff --git a/src/osdep/unix/dummy.c b/src/osdep/unix/dummy.c
index b003a0b..2c65824 100644
--- a/src/osdep/unix/dummy.c
+++ b/src/osdep/unix/dummy.c
@@ -35,6 +35,7 @@ extern int errno; /* just in case */
#include "osdep.h"
#include <pwd.h>
#include <sys/stat.h>
+#include <time.h>
#include "dummy.h"
#include "misc.h"
diff --git a/src/osdep/unix/mbx.c b/src/osdep/unix/mbx.c
index 1ece5d8..2495965 100644
--- a/src/osdep/unix/mbx.c
+++ b/src/osdep/unix/mbx.c
@@ -43,6 +43,7 @@ extern int errno; /* just in case */
#include <pwd.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <utime.h>
#include "misc.h"
#include "dummy.h"
#include "fdstring.h"
diff --git a/src/osdep/unix/mh.c b/src/osdep/unix/mh.c
index 0226b7a..e7c907a 100644
--- a/src/osdep/unix/mh.c
+++ b/src/osdep/unix/mh.c
@@ -36,6 +36,7 @@ extern int errno; /* just in case */
#include <pwd.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <utime.h>
#include "misc.h"
#include "dummy.h"
#include "fdstring.h"
diff --git a/src/osdep/unix/mmdf.c b/src/osdep/unix/mmdf.c
index e962434..8cc9fae 100644
--- a/src/osdep/unix/mmdf.c
+++ b/src/osdep/unix/mmdf.c
@@ -34,6 +34,7 @@ extern int errno; /* just in case */
#include "osdep.h"
#include <time.h>
#include <sys/stat.h>
+#include <utime.h>
#include "pseudo.h"
#include "fdstring.h"
#include "misc.h"
diff --git a/src/osdep/unix/mtx.c b/src/osdep/unix/mtx.c
index 8e6f76e..ca7b368 100644
--- a/src/osdep/unix/mtx.c
+++ b/src/osdep/unix/mtx.c
@@ -43,6 +43,7 @@ extern int errno; /* just in case */
#include <pwd.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <utime.h>
#include "misc.h"
#include "dummy.h"
#include "fdstring.h"
diff --git a/src/osdep/unix/mx.c b/src/osdep/unix/mx.c
index 4549527..9d444c9 100644
--- a/src/osdep/unix/mx.c
+++ b/src/osdep/unix/mx.c
@@ -36,6 +36,7 @@ extern int errno; /* just in case */
#include <pwd.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <utime.h>
#include "misc.h"
#include "dummy.h"
#include "fdstring.h"
diff --git a/src/osdep/unix/tcp_unix.c b/src/osdep/unix/tcp_unix.c
index 5bad706..5d6cd03 100644
--- a/src/osdep/unix/tcp_unix.c
+++ b/src/osdep/unix/tcp_unix.c
@@ -27,6 +27,7 @@
*/
#include "ip_unix.c"
+#include <poll.h>
#undef write /* don't use redefined write() */
diff --git a/src/osdep/unix/tenex.c b/src/osdep/unix/tenex.c
index eee61fb..61760f0 100644
--- a/src/osdep/unix/tenex.c
+++ b/src/osdep/unix/tenex.c
@@ -46,6 +46,8 @@ extern int errno; /* just in case */
#include "mail.h"
#include "osdep.h"
#include <sys/stat.h>
+#include <time.h>
+#include <utime.h>
#include "misc.h"
#include "dummy.h"
diff --git a/src/osdep/unix/unix.c b/src/osdep/unix/unix.c
index be3c437..c755fe7 100644
--- a/src/osdep/unix/unix.c
+++ b/src/osdep/unix/unix.c
@@ -46,6 +46,7 @@ extern int errno; /* just in case */
#include "osdep.h"
#include <time.h>
#include <sys/stat.h>
+#include <utime.h>
#include "unix.h"
#include "pseudo.h"
#include "fdstring.h"
--
2.39.3 (Apple Git-145)

View File

@@ -0,0 +1,8 @@
<?php
declare(strict_types=1);
# If you want to test new extensions here, just modify it.
$extensions = 'tidy,bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,gmp,iconv,xml,mbstring,mbregex,mysqlnd,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,redis,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip';
echo $extensions;