2025-08-31 05:45:13 +00:00
import { _ as i , c as a , o as n , ah as l } from "./chunks/framework.Bhsyh9kO.js" ; const c = JSON . parse ( '{"title":"craft.yml 配置","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/develop/craft-yml.md","filePath":"zh/develop/craft-yml.md"}' ) , t = { name : "zh/develop/craft-yml.md" } ; function p ( e , s , h , k , r , d ) { return n ( ) , a ( "div" , null , [ ... s [ 0 ] || ( s [ 0 ] = [ l ( ` <h1 id="craft-yml-配置" tabindex="-1">craft.yml 配置 <a class="header-anchor" href="#craft-yml-配置" aria-label="Permalink to “craft.yml 配置”"> </a></h1><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># PHP version to build (default: 8.4)</span></span>
2025-05-20 02:08:00 +00:00
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > php - version < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > 8 . 4 < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # [ REQUIRED ] Static PHP extensions to build ( list or comma - separated are both accepted ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > extensions < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 3 2 F 6 2 ; - - s h i k i - d a r k : # 9 E C B F F ; " > b c m a t h , f i l e i n f o , p h a r , z l i b , s o d i u m , p o s i x , p c n t l < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Extra libraries to build ( list or comma - separated are both accepted ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > libs < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : [ ] < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # [ REQUIRED ] Build SAPIs ( list or comma - separated are both accepted ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > sapi < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 3 2 F 6 2 ; - - s h i k i - d a r k : # 9 E C B F F ; " > c l i , m i c r o , f p m < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Show full console output ( default : false ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > debug < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > f a l s e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Build options ( same as \ ` build \` command options, all options are optional)</span></span>
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > build - options < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Before build , remove all old build files and sources ( default : false ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > with - clean < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > f a l s e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Build with all suggested libraries ( default : false ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > with - suggested - libs < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > f a l s e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Build with all suggested extensions ( default : false ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > with - suggested - exts < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > f a l s e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Build extra shared extensions ( list or comma - separated are both accepted ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > build - shared < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : [ ] < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Build without stripping the binary ( default : false ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > no - strip < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > f a l s e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Disable Opcache JIT ( default : false ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > disable - opcache - jit < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > f a l s e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # PHP configuration options ( same as -- with - config - file - path ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > with - config - file - path < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 3 2 F 6 2 ; - - s h i k i - d a r k : # 9 E C B F F ; " > & q u o t ; & q u o t ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # PHP configuration options ( same as -- with - config - file - scan - dir ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > with - config - file - scan - dir < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 3 2 F 6 2 ; - - s h i k i - d a r k : # 9 E C B F F ; " > & q u o t ; & q u o t ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Hardcoded INI options for cli and micro SAPI ( e . g . & quot ; memory _limit = 4 G & quot ; , list accepted ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > with - hardcoded - ini < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : [ ] < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Pretend micro SAPI as cli SAPI to avoid some frameworks to limit the usage of micro SAPI < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > with - micro - fake - cli < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > f a l s e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Additional patch point injection files ( e . g . & quot ; path / to / patch . php & quot ; , list accepted ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > with - added - patch < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : [ ] < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Ignore micro extension tests ( if you are using micro SAPI , default : false ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > without - micro - ext - test < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > f a l s e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # UPX pack the binary ( default : false ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > with - upx - pack < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > f a l s e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Set the micro . exe program icon ( only for Windows , default : & quot ; & quot ; ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > with - micro - logo < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 3 2 F 6 2 ; - - s h i k i - d a r k : # 9 E C B F F ; " > & q u o t ; & q u o t ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Set micro SAPI as win32 mode , without this , micro SAPI will be compiled as a console application ( only for Windows , default : false ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > enable - micro - win32 < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > f a l s e < / s p a n > < / s p a n >
< span class = "line" > < / s p a n >
2025-06-18 07:08:23 +00:00
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Build options for shared extensions ( list or comma - separated are both accepted ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > shared - extensions < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : [ ] < / s p a n > < / s p a n >
< span class = "line" > < / s p a n >
2025-05-20 02:08:00 +00:00
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Download options < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > download - options < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Use custom url for specified sources , format : & quot ; { source - name } : { url } & quot ; ( e . g . & quot ; php - src : https : //example.com/php-8.4.0.tar.gz")</span></span>
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > custom - url < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : [ ] < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Use custom git repo for specified sources , format : & quot ; { source - name } : { branch } : { url } & quot ; ( e . g . & quot ; php - src : master : https : //github.com/php/php-src.git")</span></span>
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > custom - git < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : [ ] < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Retries count for downloading sources ( default : 5 ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > retry < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > 5 < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Use pre - built libraries if available ( default : false ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > prefer - pre - built < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > t r u e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Do not download from alternative sources ( default : false ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > no - alt < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > f a l s e < / s p a n > < / s p a n >
< span class = "line" > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > craft - options < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > doctor < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > t r u e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > download < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > t r u e < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > build < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > t r u e < / s p a n > < / s p a n >
< span class = "line" > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # Extra environment variables < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > extra - env < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > # e . g . Use github token to avoid rate limit < / s p a n > < / s p a n >
2025-08-31 05:45:13 +00:00
< span class = "line" > < span style = "--shiki-light:#22863A;--shiki-dark:#85E89D;" > GITHUB _TOKEN < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 3 2 F 6 2 ; - - s h i k i - d a r k : # 9 E C B F F ; " > y o u r - g i t h u b - t o k e n < / s p a n > < / s p a n > < / c o d e > < / p r e > < / d i v > ` , 2 ) ] ) ] ) } c o n s t E = i ( t , [ [ " r e n d e r " , p ] ] ) ; e x p o r t { c a s _ _ p a g e D a t a , E a s d e f a u l t } ;