Skip to content
Merged

V3 docs #1119

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions docs/.vitepress/sidebar.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,39 @@ export default {
],
'/en/develop/': [
{
text: 'Developer Guide',
text: 'Overview',
items: [
{ text: 'Get Started', link: '/en/develop/' },
{ text: 'Project Structure', link: '/en/develop/structure' },
{ text: 'PHP Source Modifications', link: '/en/develop/php-src-changes' },
],
},
{
text: 'Concepts',
text: 'Configuration Reference',
items: [
{ text: 'Registry', link: '/en/develop/registry' },
{ text: 'Package Model', link: '/en/develop/package-model' },
{ text: 'Registry & Plugin System', link: '/en/develop/registry' },
{ text: 'Build Lifecycle', link: '/en/develop/build-lifecycle' },
{ text: 'Artifact Model', link: '/en/develop/artifact-model' },
{ text: 'craft.yml', link: '/en/develop/craft-yml' },
],
},
{
text: 'Modules',
text: 'Build System',
items: [
{ text: 'Doctor', link: '/en/develop/doctor-module' },
{ text: 'Source', link: '/en/develop/source-module' },
{ text: 'craft.yml', link: '/en/develop/craft-yml' },
{ text: 'Build Lifecycle', link: '/en/develop/build-lifecycle' },
{ text: 'Compilation Tools', link: '/en/develop/system-build-tools' },
{ text: 'Doctor', link: '/en/develop/doctor-module' },
{ text: 'PHP Source Modifications', link: '/en/develop/php-src-changes' },
],
},
{
text: 'Vendor Mode',
text: 'Extending StaticPHP',
items: [
{ text: 'Introduction', link: '/en/develop/vendor-mode/' },
{ text: 'Writing Package Classes', link: '/en/develop/vendor-mode/package-classes' },
{ text: 'Annotations Reference', link: '/en/develop/vendor-mode/annotations' },
{ text: 'Dependency Injection', link: '/en/develop/vendor-mode/dependency-injection' },
{ text: 'Lifecycle Hooks', link: '/en/develop/vendor-mode/lifecycle-hooks' },
{ text: 'Introduction', link: '/en/develop/extending/' },
{ text: 'Writing Package Classes', link: '/en/develop/extending/package-classes' },
{ text: 'Annotations Reference', link: '/en/develop/extending/annotations' },
{ text: 'Lifecycle Hooks', link: '/en/develop/extending/lifecycle-hooks' },
{ text: 'Dependency Injection', link: '/en/develop/extending/dependency-injection' },
{ text: 'Custom Artifact', link: '/en/develop/extending/custom-artifact' },
],
},
],
Expand Down
31 changes: 16 additions & 15 deletions docs/.vitepress/sidebar.zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,39 @@ export default {
],
'/zh/develop/': [
{
text: '开发者指南',
text: '概览',
items: [
{ text: '开发简介', link: '/zh/develop/' },
{ text: '项目结构', link: '/zh/develop/structure' },
{ text: '对 PHP 源码的修改', link: '/zh/develop/php-src-changes' },
],
},
{
text: '核心概念',
text: '配置参考',
items: [
{ text: 'Registry', link: '/zh/develop/registry' },
{ text: 'Package 模型', link: '/zh/develop/package-model' },
{ text: 'Registry 与插件系统', link: '/zh/develop/registry' },
{ text: '构建生命周期', link: '/zh/develop/build-lifecycle' },
{ text: 'Artifact 模型', link: '/zh/develop/artifact-model' },
{ text: 'craft.yml 配置', link: '/zh/develop/craft-yml' },
],
},
{
text: '模块',
text: '构建系统',
items: [
{ text: 'Doctor 环境检查', link: '/zh/develop/doctor-module' },
{ text: '资源模块', link: '/zh/develop/source-module' },
{ text: 'craft.yml 配置', link: '/zh/develop/craft-yml' },
{ text: '构建生命周期', link: '/zh/develop/build-lifecycle' },
{ text: '编译工具', link: '/zh/develop/system-build-tools' },
{ text: 'Doctor 环境检查', link: '/zh/develop/doctor-module' },
{ text: '对 PHP 源码的修改', link: '/zh/develop/php-src-changes' },
],
},
{
text: 'Vendor 模式',
text: '扩展 StaticPHP',
items: [
{ text: '简介', link: '/zh/develop/vendor-mode/' },
{ text: '编写 Package 类', link: '/zh/develop/vendor-mode/package-classes' },
{ text: '注解参考', link: '/zh/develop/vendor-mode/annotations' },
{ text: '依赖注入', link: '/zh/develop/vendor-mode/dependency-injection' },
{ text: '生命周期 Hook', link: '/zh/develop/vendor-mode/lifecycle-hooks' },
{ text: '简介', link: '/zh/develop/extending/' },
{ text: '编写 Package 类', link: '/zh/develop/extending/package-classes' },
{ text: '注解参考', link: '/zh/develop/extending/annotations' },
{ text: '生命周期 Hook', link: '/zh/develop/extending/lifecycle-hooks' },
{ text: '依赖注入', link: '/zh/develop/extending/dependency-injection' },
{ text: '自定义 Artifact', link: '/zh/develop/extending/custom-artifact' },
],
},
],
Expand Down
88 changes: 88 additions & 0 deletions docs/deps-craft-yml.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
```yaml
# PHP version to build (default: 8.5)
php-version: 8.5
# [REQUIRED] Static PHP extensions to build (list or comma-separated are both accepted)
extensions: bcmath,fileinfo,phar,zlib,sodium,posix,pcntl
# Extra packages to build (list or comma-separated are both accepted)
packages: [ ]
# [REQUIRED] Build SAPIs (list or comma-separated are both accepted)
# Available: cli, micro, fpm, embed, frankenphp, cgi, all
sapi: cli,micro,fpm
# Show full console output (default: false)
debug: false
# Before build, remove all old build files and sources (default: false)
clean-build: false
# Build options (same as `build:php` command options, all options are optional)
build-options:
# Build with all suggested packages (libraries and extensions) as well (default: false)
with-suggests: false
# Build extra shared extensions (comma-separated string)
build-shared: ""
# Build without stripping the binary (default: false)
no-strip: false
# Disable Opcache JIT (default: false)
disable-opcache-jit: false
# Enable thread-safe (ZTS) support (default: false)
enable-zts: false
# Disable smoke test, or for specific SAPIs comma-separated (default: false)
no-smoke-test: false
# PHP configuration options (same as --with-config-file-path)
with-config-file-path: ""
# PHP configuration options (same as --with-config-file-scan-dir)
with-config-file-scan-dir: ""
# Hardcoded INI options for cli and micro SAPI (e.g. "memory_limit=4G", list accepted)
with-hardcoded-ini: [ ]
# Pretend micro SAPI as cli SAPI to avoid some frameworks to limit the usage of micro SAPI
with-micro-fake-cli: false
# Additional patch point injection files (e.g. "path/to/patch.php", list accepted)
with-added-patch: [ ]
# Ignore micro extension tests (if you are using micro SAPI, default: false)
without-micro-ext-test: false
# UPX pack the binary (default: false)
with-upx-pack: false
# Set the micro.exe program icon (only for Windows, default: "")
with-micro-logo: ""
# Set micro SAPI as win32 mode, without this, micro SAPI will be compiled as a console application (only for Windows, default: false)
enable-micro-win32: false
# Path to a folder to be embedded in FrankenPHP (frankenphp SAPI only)
with-frankenphp-app: ""

# Build options for shared extensions (list or comma-separated are both accepted)
shared-extensions: [ ]

# Download options
download-options:
# Number of parallel downloads (default: 1)
parallel: 1
# Retries count for downloading sources (default: 0)
retry: 0
# Prefer source downloads when both source and binary are available (default: false)
prefer-source: false
# Prefer binary downloads when both source and binary are available (default: false)
prefer-binary: false
# Only download source artifacts, skip binary artifacts (default: false)
source-only: false
# Only download binary artifacts, skip source artifacts (default: false)
binary-only: false
# Ignore download cache for specified packages, comma separated (default: false)
ignore-cache: false
# Do not use alternative mirror download sources (default: false)
no-alt: false
# Do not clone shallowly repositories when downloading sources (default: false)
no-shallow-clone: false
# Use custom url for specified sources, format: "{source-name}:{url}" (e.g. "php-src:https://example.com/php-8.4.0.tar.gz")
custom-url: [ ]
# Use custom git repo for specified sources, format: "{source-name}:{branch}:{url}" (e.g. "php-src:master:https://github.com/php/php-src.git")
custom-git: [ ]
# Use custom local source path, format: "{source-name}:{path}" (e.g. "php-src:/path/to/php-src")
custom-local: [ ]

craft-options:
doctor: true
download: true

# Extra environment variables
extra-env:
# e.g. Use github token to avoid rate limit
GITHUB_TOKEN: your-github-token
```
Loading