Conversation
Author
|
已补充脱敏的 Linux amd64 AOT 实跑证据,包含锁定版本、完整编译数量、ELF/动态库/coverage 校验、三组产物 SHA-256、Workerman 启动记录、验证码/登录/用户信息/权限拒绝/中立插件路径,以及普通 PHP 对照和复现命令: |
Tinywan
pushed a commit
that referenced
this pull request
Sep 17, 2026
TypePHP 编译产物以严格类型模式调用内置函数,实参不再经 coercive 模式做 __toString 宽松转换,而 webman `Config::loadFromDir()` 与 `Route::load()` 把 RecursiveDirectoryIterator 产出的 SplFileInfo 直接交给 is_dir()/substr()/ pathinfo()/include,编译后启动即抛 `is_dir(): Argument #1 ($filename) must be of type string, SplFileInfo given`。 新增 STRINGABLE_ARG_SOURCES 与 generateStringableArgSources(),把这些迭代器 实参统一改写为 `$file->getPathname()` 并忽略 vendor 原版,取值语义不变。 需要按缩进消歧的同名语句只在行首 \n 锚定:行尾锚定在 CRLF 源上永不命中 (分号与 \n 之间还夹着 \r),LF/CRLF 两种行尾因此都能命中。PackageCommand 同步登记 stringable-arg 分组,补丁产物写入 build-manifest.json 的 stringable_arg_hashes。补充单元测试覆盖五处改写点,并断言 read() 与 loadAnnotationRoutes() 中同名不同缩进的字符串实参不被误伤。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
SaiAdmin 及其随附依赖包含一批 TypePHP v0.8 当前无法直接编译或运行的动态写法。这个 PR 复用现有 doctor、Docker builder、TypePHP 编译和 portable-dir 打包链,增加一个失败关闭的 SaiAdmin Linux amd64 profile,不另建编译器或同功能插件。
使用方式
主要改动
app、support和所有plugin/*/app服务端业务 PHP。.typephp/build/生成版本和源码结构受约束的兼容副本,不修改普通 PHP 源码或项目 vendor。source-coverage.json,阻止业务 PHP 漏编译、静默排除或泄漏进 portable-dir。验证
git diff --check:通过当前边界