This commit is contained in:
crazywhalecc
2026-04-19 11:49:55 +08:00
parent a175c5862d
commit a348e838d7
120 changed files with 6346 additions and 3391 deletions

View File

@@ -0,0 +1,6 @@
# 注解参考
<!-- TODO: 所有 v3 PHP 注解的完整参考。
#[Library]、#[Extension]、#[BuildFor]、#[BeforeStage]、#[AfterStage]、
#[PatchBeforeBuild]、#[CustomPhpConfigureArg]、#[AsCheckItem]、#[AsFixItem]。
每个注解:参数、类型、允许的 target、示例。 -->

View File

@@ -0,0 +1,5 @@
# 依赖注入
<!-- TODO: v3 中 PHP-DI 自动装配的工作方式。
ApplicationContext::get() 用法。注册自定义服务。
向命令类、构建类和阶段方法注入依赖。 -->

View File

@@ -0,0 +1,6 @@
# Vendor 模式
<!-- TODO: Vendor 模式是什么,适用场景。
安装:`composer require crazywhalecc/static-php-cli`
注册指向自定义包类的外部 Registry。
最小工作示例:一个 Library 类 + 一个配置 YAML + 运行 spc。 -->

View File

@@ -0,0 +1,6 @@
# 生命周期 Hook
<!-- TODO: Hook 执行顺序与方法签名的详细说明。
#[BeforeStage('lib-name', 'build')]、#[AfterStage(...)]、#[PatchBeforeBuild]。
不同包的 Hook 如何合并与排序。
常见模式:修补 config.m4、注入编译标志、安装后修复。 -->

View File

@@ -0,0 +1,6 @@
# 编写 Package 类
<!-- TODO: 编写 Library 类和 Extension 类的分步指南。
使用 #[Library]、#[Extension]、#[BuildFor] 的完整注释代码示例。
UnixAutoconfExecutor / UnixCmakeExecutor / WindowsCMakeExecutor 用法。
文件放置位置src/Package/Library/、src/Package/Extension/)与自动加载。 -->