Conversation
Documents the ExecutionContext facade and what a background cold launch means for your code: the runtime boots but the interactive boot is held back, so no start route, no screen, no queue worker. Covers the lock state check, a background command example, all eleven facade methods, Android differences and how to fake the context in tests. Also adds a short section to the queue worker page explaining why the worker doesn't start during a background wake. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.
Adds a docs page for the
ExecutionContextfacade under Digging Deeper.The thing it's really there to explain is that iOS will cold-launch the whole app into the background to run scheduled work, with nobody looking at the screen. NativePHP splits its boot for this: the runtime always comes up so your command can run, but the interactive boot (start URL, first screen, web view, queue worker) is held back until the app is genuinely on screen. That catches people out, so the page says it plainly and gives them
isHeadless()to check.Covers the five common checks, the device-lock check and why it matters most in background work, a worked background command, all eleven facade methods, the Android differences, and how to fake the context in tests.
Also adds a short section to the queue worker page saying why the worker doesn't start during a background wake and what happens to jobs you dispatch there.
Method list was checked against
src/Facades/ExecutionContext.phpin the mobile repo and matches.Worth a look:
Background Tasks pluginlink points at../plugins/core/background-tasks, same convention as the other core plugin links. Those resolve to the plugin marketplace, so it depends on that plugin being listed there.🤖 Generated with Claude Code