Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[HttpKernel][WebProfilerBundle] Check logs priority name for both WARNING and warning#64310

Merged
nicolas-grekas merged 1 commit into
symfony:6.4symfony/symfony:6.4from
MatTheCat:profiler_warning_countMatTheCat/symfony:profiler_warning_countCopy head branch name to clipboard
May 20, 2026
Merged

[HttpKernel][WebProfilerBundle] Check logs priority name for both WARNING and warning#64310
nicolas-grekas merged 1 commit into
symfony:6.4symfony/symfony:6.4from
MatTheCat:profiler_warning_countMatTheCat/symfony:profiler_warning_countCopy head branch name to clipboard

Conversation

@MatTheCat
Copy link
Copy Markdown
Contributor

@MatTheCat MatTheCat commented May 20, 2026

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues N/A
License MIT

The LoggerDataCollector matches logs’ priorityName against WARNING to count them, but this value comes from Monolog\Level::getName(), meaning it is uppercase.

Meanwhile, the HttpKernel logger uses Psr\Log\LogLevel constants which are lowercased. That means the warning count is always zero when using it.

This PR checks against both cases to fix this.

Copy link
Copy Markdown
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

Is it possible to add a regression test?

Comment thread src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php Outdated
@MatTheCat MatTheCat force-pushed the profiler_warning_count branch from bb332ba to 5025620 Compare May 20, 2026 14:01
@MatTheCat
Copy link
Copy Markdown
Contributor Author

@GromNaN thanks for the review I have addressed your feedback.

@MatTheCat MatTheCat force-pushed the profiler_warning_count branch from 5025620 to 75f2743 Compare May 20, 2026 14:30
@MatTheCat MatTheCat changed the title [HttpKernel] Include PSR-3 log level in warning count [HttpKernel][WebProfilerBundle] Check logs priority name for both WARNING and warning May 20, 2026
@MatTheCat
Copy link
Copy Markdown
Contributor Author

Updated the comparisons in the profiler template as well.

@nicolas-grekas
Copy link
Copy Markdown
Member

Thank you @MatTheCat.

@nicolas-grekas nicolas-grekas merged commit 968dd09 into symfony:6.4 May 20, 2026
10 of 13 checks passed
@MatTheCat MatTheCat deleted the profiler_warning_count branch May 20, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.