Skip to content

Conversation

@Aliance
Copy link
Contributor

@Aliance Aliance commented Jan 14, 2026

PSR-3 was written before PHP introduced the Throwable interface. At that time, Exception was the only error-related base type available.

In modern PHP versions, both Exception and Error implement Throwable, and it is common practice for logging libraries to accept any Throwable when logging failures.

This PR adds an Errata section to PSR-3 clarifying that references to Exception in the specification - specifically the exception context key - should be interpreted as allowing any Throwable instance.

The main specification text is intentionally left unchanged. This errata is meant to:

  • reflect modern PHP language semantics;
  • improve clarity for implementors;
  • increase awareness without introducing breaking changes.

Per FIG process, this change is intended to go through the errata vote.

@Seldaek please, take a look once again if possible

Related pr: #1345

Copy link
Contributor

@Seldaek Seldaek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@Aliance
Copy link
Contributor Author

Aliance commented Jan 15, 2026

@Jean85 can you take a look, please?

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.

3 participants