Skip to content

Show deprecation warnings when deprecation logging is configured#66

Draft
JoshSalway wants to merge 2 commits intolaravel:mainfrom
JoshSalway:fix/show-deprecation-warnings
Draft

Show deprecation warnings when deprecation logging is configured#66
JoshSalway wants to merge 2 commits intolaravel:mainfrom
JoshSalway:fix/show-deprecation-warnings

Conversation

@JoshSalway
Copy link
Copy Markdown

@JoshSalway JoshSalway commented Mar 22, 2026

Summary

When a developer has explicitly configured a deprecation log channel via logging.deprecations.channel, Pail should display those deprecation warnings in its output. Currently, PR #57 added a hardcoded filter that suppresses all PHP deprecation warnings unconditionally.

Fixes #63

Problem

PR #57 added filtering that removes all PHP deprecation warnings from Pail output. While this reduces noise by default, it also hides deprecations from developers who have explicitly opted into tracking them by setting logging.deprecations.channel in their config.

Solution

Check config('logging.deprecations.channel') before filtering. If the application has configured a deprecation channel, the developer wants to see these warnings, so Pail displays them. If no channel is configured (the default), deprecations remain filtered out.

Before/After

Before: All deprecation warnings are hidden from Pail output, regardless of configuration.

After:

  • Without logging.deprecations.channel set: deprecations are still filtered (default behavior preserved)
  • With logging.deprecations.channel set: deprecations appear in Pail output

Test Plan

  • Without logging.deprecations.channel set: verify deprecation warnings are still filtered
  • With logging.deprecations.channel set: verify deprecation warnings appear in output
  • Non-deprecation log messages always appear regardless of configuration

Previously, pail unconditionally filtered out all PHP deprecation
warnings. This made it impossible to see deprecation notices even when
the application had explicitly configured a deprecation log channel
via logging.deprecations.channel.

Now, deprecation warnings are only filtered when no deprecation channel
is configured. When the user has set up deprecation logging (indicating
they want to see deprecations), pail will display them.

Fixes laravel#63

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Thanks for submitting a PR!

Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

Verify that deprecation warnings are filtered when no deprecation
channel is configured, shown when a channel is configured, and that
non-deprecation warnings always pass through.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Not showing PHP deprecation warnings

1 participant