Skip to content

Remove implicit output buffering from CliApplication - #2

Merged
dermatthes merged 2 commits into
mainfrom
fix/remove-output-buffering
Sep 30, 2026
Merged

dermatthes merged 2 commits into
mainfrom
fix/remove-output-buffering

Conversation

@dermatthes

Copy link
Copy Markdown
Contributor

Summary

  • remove ob_start() / ob_get_clean() / ob_end_clean() from CliApplication::run()
  • write command output directly instead of returning captured output
  • adapt CliDispatcher, documentation and example usage
  • add PHPSpec regression coverage that verifies the action executes at the caller's existing output-buffer level

Rationale

CliApplication introduced output buffering on 2026-09-27 to make the existing echo-based dispatcher output available as a return string. That global buffering side effect is undesirable for an embeddable CLI library; output ownership remains with the caller.

Compatibility

This intentionally changes CliApplication::run() from string to void. Exceptions still propagate unchanged.

@dermatthes
dermatthes merged commit b9f4af6 into main Sep 30, 2026
2 checks passed
@dermatthes
dermatthes deleted the fix/remove-output-buffering branch September 30, 2026 08:42
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