Repository navigation
docs: explain how to publish Mercure updates from php-cli - #2718
Merged
Merged
Conversation
dunglas
marked this pull request as ready for review
October 16, 2026 12:05
alexandre-daubois
approved these changes
Oct 16, 2026
dunglas
added a commit
that referenced
this pull request
Oct 16, 2026
Registers `frankenphp_log()` and the `FRANKENPHP_LOG_LEVEL_*` constants in the `frankenphp-cli` module, so code shared between web requests and commands can log the same way. - `ExecuteScriptCLI()` accepts the `WithLogger` and `WithContext` options (variadic, existing callers still compile). - `frankenphp php-cli` passes Caddy's default logger, so CLI entries have the same format and `logger` name as the server's, written to stderr. The `Caddyfile` isn't loaded, so its `log` directives don't apply. `mercure_publish()` stays unavailable in CLI, see #2718.
henderkes
approved these changes
Oct 18, 2026
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.
mercure_publish()doesn't exist infrankenphp php-cli: the CLI process doesn't load Caddy, so there is no hub to publish to. Commands (cron jobs, queue consumers) must use the POST endpoint of the hub instead.This documents it, warns against detecting
mercure_publish()while building the container or warming caches (Symfony, Laravel and others do this in CLI, which freezesfalseinto the cache and disables the function in the web server too), and states that thepublisherblock is what enables the POST endpoint.