Skip to content

feat(File): view() should not call die() #48

@usernane

Description

@usernane

Problem Statement

The doNotUseClassResponse() method calls die() after outputting the file. This makes the code path untestable and is hostile to middleware/framework integration where the response lifecycle should be managed by the caller.

Proposed Solution

Remove the die() call. Let the caller decide whether to terminate the script. If needed, add a parameter to control this behavior.

Alternatives Considered

  • Adding a bool $terminate = true parameter to view()
  • Throwing an exception instead of dying

Breaking Change

No — removing die() only affects scripts that rely on implicit termination after view().

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions