Feat/register phpinfo entries - #2578
Conversation
|
@dunglas I think we should revert the last commit and make not passing the |
|
For watcher, this is because of e-dant/watcher#102 |
33a4a54 to
f1f8ca5
Compare
f1f8ca5 to
f06d146
Compare
|
@dunglas I'm not sure if we really should rename |
|
I'm not sure either but this sounds more idiomatic to me. People who will call this function will do it in Go, it in PHP. |
|
Alright, I'm okay with it like this either way. |
|
Reminder to self: cli registration logic is now split between <= 8.5 and >= 8.6. Needs a rebase. |
…_entries # Conflicts: # cli.go # cli_test.go # frankenphp.c
|
Cli registration now works in both paths (<=8.5 and >=8,.6). Last commit is technically unrelated to the branch, I just got tired of the tests failing locally due to my ini settings. |
There was a problem hiding this comment.
🟡 Changes recommended
The primary Caddy-version behavior lacks direct integration coverage, and minor documentation issues remain.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds FrankenPHP, Caddy, Go toolchain, and linked-module metadata to phpinfo() across server and CLI modes.
Changes:
- Registers and renders sorted PHP info entries.
- Reports versions for Caddy, Mercure, watcher, Brotli, and Go modules.
- Extends CLI lifecycle and metadata tests.
File summaries
| File | Description |
|---|---|
worker_test.go |
Enables displayed HTML errors. |
watcher.go |
Registers watcher metadata. |
types_test.go |
Tests module-entry generation. |
testdata/command-detached.php |
Adds detached-process fixture. |
server_test.go |
Enables displayed errors. |
mercure.go |
Registers Mercure metadata. |
go.mod |
Promotes x/sys to direct dependency. |
frankenphp.h |
Declares PHP info arrays. |
frankenphp.go |
Builds and manages metadata entries. |
frankenphp.c |
Renders metadata and registers CLI module. |
frankenphp_test.go |
Tests rendered metadata. |
emulate_php_cli.c |
Enables text-mode CLI phpinfo. |
cli.go |
Initializes metadata for CLI execution. |
cli_test.go |
Expands CLI behavior coverage. |
cli_linux_test.go |
Tests detached Linux children. |
caddy/caddy.go |
Registers Caddy version. |
caddy/br.go |
Registers Brotli metadata. |
Review details
- Files reviewed: 17/17 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| caddy.RegisterModule(&FrankenPHPAdmin{}) | ||
|
|
||
| // Report Caddy version in phpinfo() | ||
| simpleVersion, fullVersion := caddy.Version() |
closes #2576
Edit: the entries are sorted now.
@dunglas I know you've worked on the watcher-go library before, perhaps you could expose a proper version number instead?