Skip to content

Fix DebuggerMiddleware crash on BinaryFileResponse#126

Merged
ganyicz merged 1 commit intomainfrom
filip/fix-debugger-middleware
Mar 11, 2026
Merged

Fix DebuggerMiddleware crash on BinaryFileResponse#126
ganyicz merged 1 commit intomainfrom
filip/fix-debugger-middleware

Conversation

@ganyicz
Copy link
Collaborator

@ganyicz ganyicz commented Mar 11, 2026

The scenario

Using Blaze in a project that serves BinaryFileResponse responses (e.g. Flux asset routes).

The problem

DebuggerMiddleware calls $response->status(), which doesn't exist on BinaryFileResponse.

The solution

Use $response->getStatusCode() instead — available on all response types.

Fixes #123

@ganyicz ganyicz merged commit 0ccfe81 into main Mar 11, 2026
4 checks passed
@ganyicz ganyicz deleted the filip/fix-debugger-middleware branch March 11, 2026 10:07
@github-actions
Copy link
Contributor

Benchmark Results

Attempt Blade Blaze Improvement
#1 353.75ms 16.76ms 95.3%
#2 357.87ms 16.87ms 95.3%
#3 348.19ms 16.63ms 95.2%
#4 355.04ms 16.79ms 95.3%
#5 352.89ms 17.26ms 95.1%
#6 353.37ms 16.91ms 95.2%
#7 356.34ms 17.14ms 95.2%
#8 * 363.03ms 17.32ms 95.2%
#9 356.53ms 17.04ms 95.2%
#10 348.23ms 17.11ms 95.1%
Snapshot 355.60ms 17.02ms 95.2%
Result 353.75ms (~) 16.91ms (~) 95.2% (~)

Median of 10 attempts (* = outlier, excluded from result), 5000 iterations x 10 rounds, 46.86s total

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.

Bug: DebuggerMiddleware crashes on BinaryFileResponse

1 participant