Skip to content

[12.x] Prevent fatal errors when logging deprecations fails - #60907

Merged
taylorotwell merged 1 commit into
12.xfrom
12.x-deprecation-logging-fatal
Jul 27, 2026
Merged

[12.x] Prevent fatal errors when logging deprecations fails#60907
taylorotwell merged 1 commit into
12.xfrom
12.x-deprecation-logging-fatal

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Collaborator

This is a backport of #60893 to the 12.x branch. Reporting a deprecation should never be able to crash the application, but the logging attempt in HandleExceptions::handleDeprecationError() was only guarded against an Exception thrown while resolving the LogManager. Any Throwable raised while building or using the deprecations channel, such as an Error triggered when a deprecation fires while Monolog's Logger class is still mid-autoload on PHP 8.4, would fatal the process. The vulnerable code on 12.x is identical to what was fixed on 13.x, and 12.x supports the same PHP 8.4 and Monolog 3.x combinations, so the whole logging attempt is now wrapped so that any failure is ignored.

@taylorotwell
taylorotwell merged commit 78d12bd into 12.x Jul 27, 2026
73 checks passed
@taylorotwell
taylorotwell deleted the 12.x-deprecation-logging-fatal branch July 27, 2026 14:46
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.

2 participants