Skip to content

Refactor ConsoleAppAdapter termination flow away from stop() #473

Description

@armanist

Summary

Refactor console execution flow so ordinary command termination no longer depends on stop() and StopExecutionException.

Goals

  • preserve ConsoleAppAdapter::start(): ?int
  • preserve meaningful non-zero exit codes
  • replace exception-driven ordinary console exits with explicit return flow

In scope

  • src/App/Adapters/ConsoleAppAdapter.php
  • console-related helpers or stages using stop()
  • console adapter tests
  • command execution flow where exit codes are produced

Why console is separate

Console semantics differ from web:

  • web usually just returns 0
  • console exit codes are part of the command contract
  • scripts, CI, and schedulers depend on non-zero failures

Acceptance criteria

  • ordinary command flow is explicit and return-based
  • exit codes remain meaningful
  • ConsoleAppAdapter no longer depends on StopExecutionException for ordinary exits

Validation

  • console adapter tests
  • command tests
  • manual verification of success and failure exit codes if needed

Activity

  1. added this to the 3.0.0 milestone on Apr 28, 2026
  2. self-assigned this
    on Apr 29, 2026
  3. added a commit that references this issue on Apr 29, 2026
  4. added a commit that references this issue on Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions