Skip to content

fix: log exceptions in context as structured arrays - #20

Merged
roxblnfk merged 1 commit into
1.xfrom
fix/throwable-context
Oct 9, 2026
Merged

roxblnfk merged 1 commit into
1.xfrom
fix/throwable-context

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

What was changed

  • DefaultProcessor::createDefault() tries ThrowableProcessor before StringableProcessor. Exceptions and errors in the log context now reach RoadRunner as structured data (class, message, code, file, line, trace), as the README describes. Every \Throwable is also \Stringable, so before this change it was sent as its __toString() text.
  • That also holds for exceptions with a custom __toString(). Other \Stringable objects are still converted to strings.
  • README: the built-in processors are listed in the order they are tried, and the generic log() example passes the exception object itself.

Checklist

  • Tested
    • Unit tests added; the previously skipped test passes
    • Testo, psalm, cs:diff and Infection (MSI 96%) run locally on PHP 8.4

Every `\Throwable` is also `\Stringable`, so with `StringableProcessor` first the default processor reduced exceptions to their string form and `ThrowableProcessor` never ran.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk requested a review from a team October 9, 2026 20:18
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 79a10deb-61a3-4701-9ffd-39f466c418e4

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@roxblnfk
roxblnfk merged commit d7d301d into 1.x Oct 9, 2026
15 checks passed
@roxblnfk
roxblnfk deleted the fix/throwable-context branch October 9, 2026 20:23
@github-actions github-actions Bot mentioned this pull request Oct 9, 2026
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