mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Add gen-ext-docs command (#462)
This commit is contained in:
parent
5d2bd93bd7
commit
968b3acbce
33
.github/workflows/update-docs-config.yml
vendored
33
.github/workflows/update-docs-config.yml
vendored
@ -15,9 +15,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: "Checkout static-php-cli"
|
- name: "Checkout static-php-cli"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
ref: main
|
|
||||||
path: static-php-cli
|
|
||||||
|
|
||||||
- name: "Checkout static-php-cli-docs"
|
- name: "Checkout static-php-cli-docs"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -33,7 +30,35 @@ jobs:
|
|||||||
git config --global user.name "GitHub Actions"
|
git config --global user.name "GitHub Actions"
|
||||||
|
|
||||||
- name: "Copy Config Files"
|
- name: "Copy Config Files"
|
||||||
run: cp -r static-php-cli/config/* static-php-cli-docs/docs/.vitepress/config/
|
run: cp -r config/* static-php-cli-docs/docs/.vitepress/config/
|
||||||
|
|
||||||
|
- name: "Install PHP for official runners"
|
||||||
|
uses: "shivammathur/setup-php@v2"
|
||||||
|
with:
|
||||||
|
coverage: none
|
||||||
|
tools: composer:v2
|
||||||
|
php-version: 8.2
|
||||||
|
ini-values: memory_limit=-1
|
||||||
|
|
||||||
|
- name: "Get Composer Cache Directory"
|
||||||
|
id: composer-cache
|
||||||
|
run: |
|
||||||
|
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: "Cache Composer dependencies"
|
||||||
|
uses: "actions/cache@v4"
|
||||||
|
with:
|
||||||
|
path: "${{ steps.composer-cache.outputs.dir }}"
|
||||||
|
key: "php-8.2-locked-composer-${{ hashFiles('**/composer.lock') }}"
|
||||||
|
restore-keys: |
|
||||||
|
php-8.2-locked-composer
|
||||||
|
|
||||||
|
- name: "Install Locked Dependencies"
|
||||||
|
run: "composer install --no-interaction --no-progress"
|
||||||
|
|
||||||
|
- name: "Generate Extension Support List"
|
||||||
|
run: |
|
||||||
|
bin/spc dev:gen-ext-docs > static-php-cli-docs/docs/extensions.md
|
||||||
|
|
||||||
- name: "Commit and Push Changes"
|
- name: "Commit and Push Changes"
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
283
config/ext.json
283
config/ext.json
@ -1,5 +1,8 @@
|
|||||||
{
|
{
|
||||||
"amqp": {
|
"amqp": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"source": "amqp",
|
"source": "amqp",
|
||||||
@ -18,6 +21,9 @@
|
|||||||
"type": "builtin"
|
"type": "builtin"
|
||||||
},
|
},
|
||||||
"bz2": {
|
"bz2": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -31,6 +37,7 @@
|
|||||||
"type": "builtin"
|
"type": "builtin"
|
||||||
},
|
},
|
||||||
"curl": {
|
"curl": {
|
||||||
|
"notes": true,
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with",
|
"arg-type": "with",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -49,6 +56,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dom": {
|
"dom": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"arg-type-windows": "with",
|
"arg-type-windows": "with",
|
||||||
@ -64,7 +74,21 @@
|
|||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "ext-ds"
|
"source": "ext-ds"
|
||||||
},
|
},
|
||||||
|
"enchant": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip",
|
||||||
|
"Darwin": "wip",
|
||||||
|
"Linux": "wip"
|
||||||
|
},
|
||||||
|
"type": "wip"
|
||||||
|
},
|
||||||
"event": {
|
"event": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "ext-event",
|
"source": "ext-event",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
@ -82,6 +106,11 @@
|
|||||||
"type": "builtin"
|
"type": "builtin"
|
||||||
},
|
},
|
||||||
"ffi": {
|
"ffi": {
|
||||||
|
"support": {
|
||||||
|
"Linux": "no",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"lib-depends-unix": [
|
"lib-depends-unix": [
|
||||||
@ -104,6 +133,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gd": {
|
"gd": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"arg-type-windows": "with",
|
"arg-type-windows": "with",
|
||||||
@ -122,6 +156,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gettext": {
|
"gettext": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -129,6 +167,12 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"glfw": {
|
"glfw": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "no",
|
||||||
|
"Linux": "no"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"source": "ext-glfw",
|
"source": "ext-glfw",
|
||||||
@ -138,6 +182,10 @@
|
|||||||
"lib-depends-windows": []
|
"lib-depends-windows": []
|
||||||
},
|
},
|
||||||
"gmp": {
|
"gmp": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -145,6 +193,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"iconv": {
|
"iconv": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"arg-type-windows": "with",
|
"arg-type-windows": "with",
|
||||||
@ -156,10 +207,18 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"igbinary": {
|
"igbinary": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "igbinary"
|
"source": "igbinary"
|
||||||
},
|
},
|
||||||
"imagick": {
|
"imagick": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "ext-imagick",
|
"source": "ext-imagick",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
@ -168,6 +227,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"imap": {
|
"imap": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -178,16 +242,29 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"inotify": {
|
"inotify": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "no",
|
||||||
|
"BSD": "wip",
|
||||||
|
"Darwin": "no"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "inotify"
|
"source": "inotify"
|
||||||
},
|
},
|
||||||
"intl": {
|
"intl": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "no",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
"icu"
|
"icu"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"ldap": {
|
"ldap": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -215,7 +292,21 @@
|
|||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "custom"
|
"arg-type": "custom"
|
||||||
},
|
},
|
||||||
|
"mcrypt": {
|
||||||
|
"type": "wip",
|
||||||
|
"support": {
|
||||||
|
"Windows": "no",
|
||||||
|
"BSD": "no",
|
||||||
|
"Darwin": "no",
|
||||||
|
"Linux": "no"
|
||||||
|
},
|
||||||
|
"notes": true
|
||||||
|
},
|
||||||
"memcache": {
|
"memcache": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "ext-memcache",
|
"source": "ext-memcache",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
@ -227,6 +318,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"memcached": {
|
"memcached": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip",
|
||||||
|
"Linux": "no"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "memcached",
|
"source": "memcached",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
@ -240,6 +336,12 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mongodb": {
|
"mongodb": {
|
||||||
|
"support": {
|
||||||
|
"Darwin": "no",
|
||||||
|
"BSD": "wip",
|
||||||
|
"Windows": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "mongodb",
|
"source": "mongodb",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
@ -264,11 +366,22 @@
|
|||||||
"zlib"
|
"zlib"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"oci8": {
|
||||||
|
"type": "wip",
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "no",
|
||||||
|
"Darwin": "no",
|
||||||
|
"Linux": "no"
|
||||||
|
},
|
||||||
|
"notes": true
|
||||||
|
},
|
||||||
"opcache": {
|
"opcache": {
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "custom"
|
"arg-type": "custom"
|
||||||
},
|
},
|
||||||
"openssl": {
|
"openssl": {
|
||||||
|
"notes": true,
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"arg-type-windows": "with",
|
"arg-type-windows": "with",
|
||||||
@ -281,6 +394,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"parallel": {
|
"parallel": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "parallel",
|
"source": "parallel",
|
||||||
"arg-type-windows": "with",
|
"arg-type-windows": "with",
|
||||||
@ -289,6 +406,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"password-argon2": {
|
"password-argon2": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -296,6 +418,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pcntl": {
|
"pcntl": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "no"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"unix-only": true
|
"unix-only": true
|
||||||
},
|
},
|
||||||
@ -311,6 +436,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pdo_pgsql": {
|
"pdo_pgsql": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"ext-depends": [
|
"ext-depends": [
|
||||||
@ -322,6 +451,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pdo_sqlite": {
|
"pdo_sqlite": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with",
|
"arg-type": "with",
|
||||||
"ext-depends": [
|
"ext-depends": [
|
||||||
@ -333,6 +465,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pdo_sqlsrv": {
|
"pdo_sqlsrv": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "pdo_sqlsrv",
|
"source": "pdo_sqlsrv",
|
||||||
"arg-type": "with",
|
"arg-type": "with",
|
||||||
@ -342,6 +478,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pgsql": {
|
"pgsql": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -355,19 +496,36 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"posix": {
|
"posix": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "no"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"unix-only": true
|
"unix-only": true
|
||||||
},
|
},
|
||||||
"protobuf": {
|
"protobuf": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "protobuf"
|
"source": "protobuf"
|
||||||
},
|
},
|
||||||
"rar": {
|
"rar": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip",
|
||||||
|
"Darwin": "partial"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "rar",
|
"source": "rar",
|
||||||
"cpp-extension": true
|
"cpp-extension": true
|
||||||
},
|
},
|
||||||
"readline": {
|
"readline": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -375,6 +533,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"redis": {
|
"redis": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "redis",
|
"source": "redis",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
@ -399,6 +561,9 @@
|
|||||||
"cpp-extension": true
|
"cpp-extension": true
|
||||||
},
|
},
|
||||||
"simplexml": {
|
"simplexml": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -409,6 +574,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"snappy": {
|
"snappy": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "ext-snappy",
|
"source": "ext-snappy",
|
||||||
"cpp-extension": true,
|
"cpp-extension": true,
|
||||||
@ -421,6 +590,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"soap": {
|
"soap": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -434,6 +606,10 @@
|
|||||||
"type": "builtin"
|
"type": "builtin"
|
||||||
},
|
},
|
||||||
"sodium": {
|
"sodium": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with",
|
"arg-type": "with",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -441,6 +617,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"sqlite3": {
|
"sqlite3": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"arg-type-windows": "with",
|
"arg-type-windows": "with",
|
||||||
@ -449,6 +628,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"sqlsrv": {
|
"sqlsrv": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "sqlsrv",
|
"source": "sqlsrv",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -460,6 +643,9 @@
|
|||||||
"cpp-extension": true
|
"cpp-extension": true
|
||||||
},
|
},
|
||||||
"ssh2": {
|
"ssh2": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "ext-ssh2",
|
"source": "ext-ssh2",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
@ -473,6 +659,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"swoole": {
|
"swoole": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "no",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "swoole",
|
"source": "swoole",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
@ -495,6 +686,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"swoole-hook-mysql": {
|
"swoole-hook-mysql": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "no",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "addon",
|
"type": "addon",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"ext-depends": [
|
"ext-depends": [
|
||||||
@ -507,6 +703,12 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"swoole-hook-pgsql": {
|
"swoole-hook-pgsql": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "no",
|
||||||
|
"BSD": "wip",
|
||||||
|
"Darwin": "partial"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "addon",
|
"type": "addon",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"ext-depends": [
|
"ext-depends": [
|
||||||
@ -515,6 +717,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"swoole-hook-sqlite": {
|
"swoole-hook-sqlite": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "no",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "addon",
|
"type": "addon",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"ext-depends": [
|
"ext-depends": [
|
||||||
@ -523,6 +730,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"swow": {
|
"swow": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "swow",
|
"source": "swow",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
@ -536,17 +748,32 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"sysvmsg": {
|
"sysvmsg": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "no",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"unix-only": true
|
"unix-only": true
|
||||||
},
|
},
|
||||||
"sysvsem": {
|
"sysvsem": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "no",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"unix-only": true
|
"unix-only": true
|
||||||
},
|
},
|
||||||
"sysvshm": {
|
"sysvshm": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin"
|
"type": "builtin"
|
||||||
},
|
},
|
||||||
"tidy": {
|
"tidy": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -557,6 +784,10 @@
|
|||||||
"type": "builtin"
|
"type": "builtin"
|
||||||
},
|
},
|
||||||
"uuid": {
|
"uuid": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "ext-uuid",
|
"source": "ext-uuid",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
@ -565,6 +796,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"uv": {
|
"uv": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "ext-uv",
|
"source": "ext-uv",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
@ -575,7 +810,22 @@
|
|||||||
"sockets"
|
"sockets"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"xdebug": {
|
||||||
|
"type": "builtin",
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "no",
|
||||||
|
"Darwin": "no",
|
||||||
|
"Linux": "no"
|
||||||
|
},
|
||||||
|
"notes": true
|
||||||
|
},
|
||||||
"xhprof": {
|
"xhprof": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "xhprof",
|
"source": "xhprof",
|
||||||
"ext-depends": [
|
"ext-depends": [
|
||||||
@ -583,6 +833,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"xlswriter": {
|
"xlswriter": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "xlswriter",
|
"source": "xlswriter",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
@ -592,6 +846,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"xml": {
|
"xml": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
|
"notes": true,
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"arg-type-windows": "with",
|
"arg-type-windows": "with",
|
||||||
@ -603,6 +861,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"xmlreader": {
|
"xmlreader": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -614,6 +875,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"xmlwriter": {
|
"xmlwriter": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -624,6 +888,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"xsl": {
|
"xsl": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
@ -635,6 +903,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"yac": {
|
"yac": {
|
||||||
|
"support": {
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "yac",
|
"source": "yac",
|
||||||
"arg-type-unix": "custom",
|
"arg-type-unix": "custom",
|
||||||
@ -643,6 +914,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"yaml": {
|
"yaml": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "yaml",
|
"source": "yaml",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
@ -651,6 +926,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"zip": {
|
"zip": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-prefix",
|
"arg-type": "with-prefix",
|
||||||
"arg-type-windows": "enable",
|
"arg-type-windows": "enable",
|
||||||
@ -667,6 +946,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"zstd": {
|
"zstd": {
|
||||||
|
"support": {
|
||||||
|
"Windows": "wip",
|
||||||
|
"BSD": "wip"
|
||||||
|
},
|
||||||
"type": "external",
|
"type": "external",
|
||||||
"source": "ext-zstd",
|
"source": "ext-zstd",
|
||||||
"arg-type": "custom",
|
"arg-type": "custom",
|
||||||
|
|||||||
@ -8,6 +8,7 @@ use SPC\command\BuildCliCommand;
|
|||||||
use SPC\command\BuildLibsCommand;
|
use SPC\command\BuildLibsCommand;
|
||||||
use SPC\command\DeleteDownloadCommand;
|
use SPC\command\DeleteDownloadCommand;
|
||||||
use SPC\command\dev\AllExtCommand;
|
use SPC\command\dev\AllExtCommand;
|
||||||
|
use SPC\command\dev\GenerateExtDocCommand;
|
||||||
use SPC\command\dev\PhpVerCommand;
|
use SPC\command\dev\PhpVerCommand;
|
||||||
use SPC\command\dev\SortConfigCommand;
|
use SPC\command\dev\SortConfigCommand;
|
||||||
use SPC\command\DoctorCommand;
|
use SPC\command\DoctorCommand;
|
||||||
@ -24,7 +25,7 @@ use Symfony\Component\Console\Application;
|
|||||||
*/
|
*/
|
||||||
final class ConsoleApplication extends Application
|
final class ConsoleApplication extends Application
|
||||||
{
|
{
|
||||||
public const VERSION = '2.2.1';
|
public const VERSION = '2.2.2';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@ -48,6 +49,7 @@ final class ConsoleApplication extends Application
|
|||||||
new AllExtCommand(),
|
new AllExtCommand(),
|
||||||
new PhpVerCommand(),
|
new PhpVerCommand(),
|
||||||
new SortConfigCommand(),
|
new SortConfigCommand(),
|
||||||
|
new GenerateExtDocCommand(),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
80
src/SPC/command/dev/GenerateExtDocCommand.php
Normal file
80
src/SPC/command/dev/GenerateExtDocCommand.php
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\command\dev;
|
||||||
|
|
||||||
|
use SPC\command\BaseCommand;
|
||||||
|
use SPC\store\FileSystem;
|
||||||
|
use SPC\util\ConfigValidator;
|
||||||
|
use Symfony\Component\Console\Attribute\AsCommand;
|
||||||
|
|
||||||
|
#[AsCommand('dev:gen-ext-docs', 'Generate extension list markdown', [], true)]
|
||||||
|
class GenerateExtDocCommand extends BaseCommand
|
||||||
|
{
|
||||||
|
protected bool $no_motd = true;
|
||||||
|
|
||||||
|
public function handle(): int
|
||||||
|
{
|
||||||
|
// Get ext.json
|
||||||
|
$exts = json_decode(FileSystem::readFile(ROOT_DIR . '/config/ext.json'), true);
|
||||||
|
ConfigValidator::validateExts($exts);
|
||||||
|
// Markdown table needs format, we need to calculate the max length of each column
|
||||||
|
$max_name = 0;
|
||||||
|
$max_linux = 5;
|
||||||
|
$max_macos = 5;
|
||||||
|
$max_freebsd = 7;
|
||||||
|
$max_windows = 7;
|
||||||
|
$md_lines = [];
|
||||||
|
foreach ($exts as $ext_name => $ext) {
|
||||||
|
// notes is optional
|
||||||
|
$name = ($ext['notes'] ?? false) === true ? "[{$ext_name}](./extension-notes#{$ext_name})" : $ext_name;
|
||||||
|
// calculate max length
|
||||||
|
$max_name = max($max_name, strlen($name));
|
||||||
|
|
||||||
|
// linux
|
||||||
|
$linux = match ($ext['support']['Linux'] ?? 'yes') {
|
||||||
|
'wip' => '',
|
||||||
|
default => $ext['support']['Linux'] ?? 'yes',
|
||||||
|
};
|
||||||
|
$max_linux = max($max_linux, strlen($linux));
|
||||||
|
|
||||||
|
// macos
|
||||||
|
$macos = match ($ext['support']['Darwin'] ?? 'yes') {
|
||||||
|
'wip' => '',
|
||||||
|
default => $ext['support']['Darwin'] ?? 'yes',
|
||||||
|
};
|
||||||
|
$max_macos = max($max_macos, strlen($macos));
|
||||||
|
|
||||||
|
// freebsd
|
||||||
|
$freebsd = match ($ext['support']['BSD'] ?? 'yes') {
|
||||||
|
'wip' => '',
|
||||||
|
default => $ext['support']['BSD'] ?? 'yes',
|
||||||
|
};
|
||||||
|
$max_freebsd = max($max_freebsd, strlen($freebsd));
|
||||||
|
|
||||||
|
// windows
|
||||||
|
$windows = match ($ext['support']['Windows'] ?? 'yes') {
|
||||||
|
'wip' => '',
|
||||||
|
default => $ext['support']['Windows'] ?? 'yes',
|
||||||
|
};
|
||||||
|
$max_windows = max($max_windows, strlen($windows));
|
||||||
|
$md_lines[] = [
|
||||||
|
$name,
|
||||||
|
$linux,
|
||||||
|
$macos,
|
||||||
|
$freebsd,
|
||||||
|
$windows,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// generate markdown
|
||||||
|
$md = '| ' . str_pad('Extension Name', $max_name) . ' | ' . str_pad('Linux', $max_linux) . ' | ' . str_pad('macOS', $max_macos) . ' | ' . str_pad('FreeBSD', $max_freebsd) . ' | ' . str_pad('Windows', $max_windows) . ' |' . PHP_EOL;
|
||||||
|
$md .= '| ' . str_repeat('-', $max_name) . ' | ' . str_repeat('-', $max_linux) . ' | ' . str_repeat('-', $max_macos) . ' | ' . str_repeat('-', $max_freebsd) . ' | ' . str_repeat('-', $max_windows) . ' |' . PHP_EOL;
|
||||||
|
foreach ($md_lines as $line) {
|
||||||
|
$md .= '| ' . str_pad($line[0], $max_name) . ' | ' . str_pad($line[1], $max_linux) . ' | ' . str_pad($line[2], $max_macos) . ' | ' . str_pad($line[3], $max_freebsd) . ' | ' . str_pad($line[4], $max_windows) . ' |' . PHP_EOL;
|
||||||
|
}
|
||||||
|
$this->output->writeln($md);
|
||||||
|
return static::SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user