Skip to content

Add the debug buffer limits to the logging and mailer config - #207

Merged
armanist merged 1 commit into
quantum-php:masterfrom
armanist:config/debug-buffer-limits
Oct 23, 2026
Merged

armanist merged 1 commit into
quantum-php:masterfrom
armanist:config/debug-buffer-limits

Conversation

@armanist

@armanist armanist commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • Added 'message' => ['limit' => 1000] to shared/config/logging.php: in debug mode the web app keeps only the last limit log messages in memory for the debug toolbar; 0 keeps every message.
  • Added 'transport_log_limit' => 1000 to shared/config/mailer.php: the number of transport log lines the mailer keeps (the SMTP exchange in debug mode and the errors of failed sends); 0 keeps every line.
  • Added an Added entry to the 3.1.0 changelog.

Why

quantum-php/framework#593 (merged in quantum-php/framework#594) bounds the debug data kept in memory with these two settings, each read from its own package's config. Both default to 1000 in the framework, so nothing breaks without them, but a project could not see or change them unless they are in its config files.

Breaking changes

None. Config and changelog only; the values match the framework defaults.

Testing

Checked against the framework's master with #594: vendor/bin/phpunit, composer cs:check, composer phpstan and composer rector:check pass. CI runs them on PHP 8.0, 8.1 and 8.2.

Summary by CodeRabbit

  • New Features
    • Added configurable in-memory limits for retained log messages and mail transport log lines, both defaulting to 1,000.
    • In debug mode, set either limit to 0 to retain all applicable entries.
  • Documentation
    • Recorded the new logging and mailer settings in the 3.1.0 changelog.

logging.message.limit and mailer.transport_log_limit (framework #593), both 1000, so a project can see and change how many log messages and transport log lines are kept in memory.
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4bc5a502-c3dd-4362-800f-6562005837d9
📥 Commits

Reviewing files that changed from the base of the PR and between 6db87d9 and 61853ee.

📒 Files selected for processing: 3
  • CHANGELOG.md
  • shared/config/logging.php
  • shared/config/mailer.php

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The project configuration adds limits for retained log messages and mailer transport log lines, both defaulting to 1000. The changelog records the settings.

Changes: Log limit settings

Layer / File(s) Summary
Configure log limits
shared/config/logging.php, shared/config/mailer.php, CHANGELOG.md
The logging configuration adds message.limit, and the mailer configuration adds transport_log_limit. Both default to 1000. The comments describe the limits and the behavior when set to 0. The changelog lists both settings.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related issues

  • quantum-php/framework issue 593: The issue defines limits for the debug logger and mailer transport log. This change adds the corresponding configuration keys with defaults of 1000.
Merge Risk: ⚪ Minimal · up to 61853

The configuration change is effective and introduces no established merge-blocking behavior or operational risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding debug buffer limits to the logging and mailer configuration.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • 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.

@armanist armanist added the config Configuration package and loading label Oct 23, 2026
@armanist armanist self-assigned this Oct 23, 2026
@armanist armanist added this to the 3.1.0 milestone Oct 23, 2026
@armanist
armanist merged commit 770edd8 into quantum-php:master Oct 23, 2026
5 checks passed
@armanist
armanist deleted the config/debug-buffer-limits branch October 23, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration package and loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant