[13.x] Fix HandleExceptions fatal when static::$app is null during Octane request marshaling#60439
Merged
taylorotwell merged 1 commit intoJun 8, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When using Laravel Octane with FrankenPHP and
symfony/http-foundation8.1, all JSON requests return empty HTTP 500 responses with no logged errors.Root cause (two combined bugs):
Symfony 8.1 added PHP 8.4 property
sethooks onRequest::$requestand other public properties that fireE_USER_DEPRECATEDon direct assignment. FrankenPHP'smarshalRequest()assigns to this property during request setup — before the Octane sandbox app is fully initialized.When the deprecation fires,
HandleExceptions::shouldIgnoreDeprecationErrors()callsstatic::$app->hasBeenBootstrapped()— but in Octane's transitional state,static::$appcan benull, causing a fatal "Call to member function on null", which results in a silent empty HTTP 500.Fix
Add a
nullguard before calling any method onstatic::$app:Why it doesn't break existing features
$appisnull— a state where logging deprecations is impossible anyway.HandleExceptionsTesttests pass unchanged.Benefit to end users
Octane + FrankenPHP users running
symfony/http-foundation8.1 can send JSON requests without getting silent HTTP 500 errors.Closes #60365