Show deprecation warnings when deprecation logging is configured#66
Draft
JoshSalway wants to merge 2 commits intolaravel:mainfrom
Draft
Show deprecation warnings when deprecation logging is configured#66JoshSalway wants to merge 2 commits intolaravel:mainfrom
JoshSalway wants to merge 2 commits intolaravel:mainfrom
Conversation
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>
|
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>
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.
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.channelin 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:
logging.deprecations.channelset: deprecations are still filtered (default behavior preserved)logging.deprecations.channelset: deprecations appear in Pail outputTest Plan
logging.deprecations.channelset: verify deprecation warnings are still filteredlogging.deprecations.channelset: verify deprecation warnings appear in output