import{_ase,cast,o,a1asi}from"./chunks/framework.gjrnbxUT.js";constf=JSON.parse('{"title":"Contributing","description":"","frontmatter":{},"headers":[],"relativePath":"en/contributing/index.md","filePath":"en/contributing/index.md"}'),n={name:"en/contributing/index.md"},a=i('<h1id="contributing"tabindex="-1">Contributing<aclass="header-anchor"href="#contributing"aria-label="Permalink to "Contributing""></a></h1><p>Thankyouforbeinghere,thisprojectwelcomesyourcontributions!</p><h2id="contribution-guide"tabindex="-1">ContributionGuide<aclass="header-anchor"href="#contribution-guide"aria-label="Permalinkto"ContributionGuide""></a></h2><p>Ifyouhavecodeordocumentationtocontribute,here'swhatyouneedtoknowfirst.</p><ol><li>Whattypeofcodeareyoucontributing?(newextensions,bugfixes,securityissues,projectframeworkoptimizations,documentation)</li><li>Ifyoucontributenewfilesornewsnippets,isyourcodecheckedby<code>php-cs-fixer</code>and<code>phpstan</code>?</li><li>Haveyoufullyreadthe<ahref="./../develop/">DeveloperGuide</a>beforecontributingcode?</li></ol><p>Ifyoucananswertheabovequestionsandhavemadechangestothecode,youcaninitiateaPullRequestintheprojectGitHubrepositoryintime.Afterthecodereviewiscompleted,thecodecanbemodifiedaccordingtothesuggestion,ordirectlymergedintothemainbranch.</p><h2id="contribution-type"tabindex="-1">ContributionType<aclass="header-anchor"href="#contribution-type"aria-label="Permalinkto"ContributionType""></a></h2><p>ThemainpurposeofthisprojectistocompilestaticallylinkedPHPbinaries,andthecommandlineprocessingfunctioniswrittenbasedon<code>symfony/console</code>.Beforedevelopment,ifyouarenotfamiliarwithit,Checkoutthe<ahref="https://symfony.com/doc/current/components/console.html"target="_blank"rel="noreferrer">symfony/consoledocumentation</a>first.</p><h3id="security-update"tabindex="-1">SecurityUpdate<aclass="header-anchor"href="#security-update"aria-label="Permalinkto"SecurityUpdate""></a></h3><p>BecausethisprojectisbasicallyaPHPprojectrunninglocally,generallyspeaking,therewillbenoremoteattacks.Butifyoufindsuchaproblem,please**DONOTsubmitaPRorIssueintheGitHubrepository,Youneedtocontacttheprojectmaintainer(crazywhalecc)via<ahref="mailto:admin@zhamao.me"target="_blank"rel="noreferrer">mail</a>.</p><h3id="fix-bugs"tabindex="-1">FixBugs<aclass="header-anchor"href="#fix-bugs"aria-label="Permalinkto"FixBugs""></a></h3><p>Fixingbugsgenerallydoesnotinvolvemodificationoftheprojectstructureandframework,soifyoucanlocatethewrongcodeandfixitdirectly,pleasesubmitaPRdirectly.</p><h3id="new-extensions"tabindex="-1">NewExtensions<aclass="header-anchor"href="#new-extensions"aria-label="Permalinkto"NewExtensions""></a></h3><p>Foraddinganewextension,youneedtounderstandsomebasicstructureoftheprojectandhowtoaddanewextensionaccordingtotheexistinglogic.Itwillbecoveredindetailinthenextsectiononthispage.Ingeneral,youwillneed:</p><ol><li>EvaluatewhethertheextensioncanbecompiledinlineintoPHP.</li><li>Evaluatewhethertheextension'sdependentlibraries(ifany)canbecompiledstatically.</li><li>Writelibrarycompilecommandsondifferentplatforms.</li><li>Verifythattheextensionanditsdependenciesarecompatiblewithexistingextensionsanddependencies.</li><li>Verifythattheextensionworksnormallyin<code>cli</code>,<code>micro</code>,<code>fpm</code>,<code>embed</code>SAPIs.</li><li>Writedocumentationandaddyourextension.</li></ol><h3id="project-framework-optimization"tabindex="-1">ProjectFrameworkOptimization<aclass="header-anchor"href="#project-framework-optimization"aria-label="Permalinkto"ProjectFrameworkOptimization""></a></h3><p>Ifyouarealreadyfamiliarwith