Skip to content

Document the 3.1 app lifecycle, the runtime events and the console boot - #143

Merged
armanist merged 3 commits into
stagingfrom
docs/3.1-app-lifecycle
Oct 21, 2026
Merged

armanist merged 3 commits into
stagingfrom
docs/3.1-app-lifecycle

Conversation

@armanist

Copy link
Copy Markdown
Collaborator

Documents the 3.1 app lifecycle as it is on the framework's master after quantum-php/framework#590 (#589) and quantum-php/framework#591 (#538).

What changed

  • packages/app/architecture.md: the factory boots the adapter with boot(); a stage can end a run with stop() and the web runtime sends the response in a closing stage; "Hooking into the boot" becomes "Hooking into the running app", with a helper-file example on web.send.before and console.command.before and why the boot fires no events; the new console boot order (core commands before the environment, your commands last); where the stages live.
  • packages/app/contracts.md: new AppInterface section (boot() / start(), creating an adapter does not boot it, no adapter catches exceptions); the run state on AppContext; getBootFailure() and WebContext::stop() removed from the runtime contexts; the pipeline rules (stop, closing stage); new "Lifecycle events" section with the seven runtime stages, their events, and which events fire for a matched route, OPTIONS, no route and a stage that throws.
  • packages/app/adapters.md: the console description and the lifecycle link.
  • cli/qt-command-line-tool.md: the boot steps in their new order; "When the boot fails" becomes "Commands without a working environment": on a missing or malformed .env, core:env, list and help run and every other command stops with the environment error; the app:doctor example is gone, since a project command can no longer run on a broken .env.
  • cli/console-commands.md: $requiresEnvironment and the new section link.
  • packages/event/overview.md, usage.md, architecture.md: the framework's own events are the request and command events, not boot events.
  • packages/debugger/overview.md, architecture.md: the new stage namespaces.
  • advanced-features/request-lifecycle.md: one sentence pointing to the runtime events.

Changed paths

  • v3.0/packages/app/architecture.md
  • v3.0/packages/app/contracts.md
  • v3.0/packages/app/adapters.md
  • v3.0/cli/qt-command-line-tool.md
  • v3.0/cli/console-commands.md
  • v3.0/packages/event/overview.md
  • v3.0/packages/event/usage.md
  • v3.0/packages/event/architecture.md
  • v3.0/packages/debugger/overview.md
  • v3.0/packages/debugger/architecture.md
  • v3.0/advanced-features/request-lifecycle.md

SUMMARY.md: no change.

@armanist
armanist merged commit c482329 into staging Oct 21, 2026
1 check was pending
@armanist
armanist deleted the docs/3.1-app-lifecycle branch October 21, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant