Skip to content

Conversation

matbcvo
Copy link
Contributor

@matbcvo matbcvo commented Jul 17, 2025

Q A
Bug fix? (use the a.b branch)
New feature/enhancement? (use the a.x branch) ✔️
Deprecations? ✔️
BC breaks? (use the c.x branch)
Automated tests included?
Related user documentation PR URL mautic/user-documentation#...
Related developer documentation PR URL mautic/developer-documentation-new#...
Issue(s) addressed Fixes #...

Description

The package bandwidth-throttle/token-bucket is not used anywhere in the codebase. It was likely a leftover dependency.

It is blocking the upgrade to symfony/monolog-bridge 7.3, as explained in #15268. That version requires monolog/monolog ^3, which depends on psr/log ^2 || ^3. However, bandwidth-throttle/token-bucket requires malkusch/lock ^1, which only supports psr/log ^1, creating a conflict.

The removal is documented in UPGRADE-7.0.md.

After removing the unused package, the composer install test began failing. This was due to LogProcessor receiving a Monolog\LogRecord instance instead of an array. To resolve this, monolog/monolog was upgraded to ^3 and symfony/monolog-bridge to ^7.3. The LogProcessor was then refactored to accept a LogRecord object, and its corresponding unit test was updated to match the new behavior.


📋 Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)

@matbcvo matbcvo added dependencies Pull requests that update a dependency file composer Any bugs or PRs relating to composer labels Jul 17, 2025
Copy link

codecov bot commented Jul 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.40%. Comparing base (89cd36f) to head (17bbe25).
Report is 13 commits behind head on 7.x.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##                7.x   #15271   +/-   ##
=========================================
  Coverage     66.40%   66.40%           
  Complexity    35205    35205           
=========================================
  Files          2318     2318           
  Lines        141895   141895           
=========================================
+ Hits          94230    94231    +1     
+ Misses        47665    47664    -1     
Files with missing lines Coverage Δ
...dles/CoreBundle/Monolog/Handler/FileLogHandler.php 100.00% <100.00%> (ø)
app/bundles/CoreBundle/Monolog/LogProcessor.php 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@matbcvo matbcvo force-pushed the remove-unused-package branch from b37b4d7 to a75a04a Compare July 17, 2025 16:04
@matbcvo matbcvo force-pushed the remove-unused-package branch from 5245c21 to 349ca83 Compare July 17, 2025 16:47
@matbcvo matbcvo force-pushed the remove-unused-package branch from e2dc8cf to 17bbe25 Compare July 17, 2025 17:42
Copy link

@matbcvo matbcvo changed the title Remove unused package bandwidth-throttle/token-bucket Remove unused bandwidth-throttle/token-bucket package and upgrade symfony/monolog-bridge to 7.3 Jul 17, 2025
@matbcvo matbcvo added the enhancement Any improvement to an existing feature or functionality label Jul 17, 2025
@matbcvo matbcvo marked this pull request as ready for review July 17, 2025 18:01
@matbcvo matbcvo added this to the 7.0.0-alpha milestone Jul 17, 2025
@matbcvo matbcvo added the code-review-needed PR's that require a code review before merging label Jul 17, 2025
@matbcvo matbcvo moved this to 🧑🏻‍💻 Needs a code review in Open Source Fridays Jul 17, 2025
@matbcvo matbcvo requested a review from escopecz July 17, 2025 18:04
Copy link
Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

The code changes looks great! Thank you! 👍

@escopecz escopecz added code-review-passed PRs which have passed code review and removed code-review-needed PR's that require a code review before merging labels Jul 18, 2025
@escopecz escopecz merged commit aff080a into mautic:7.x Jul 18, 2025
47 of 49 checks passed
@github-project-automation github-project-automation bot moved this from 🧑🏻‍💻 Needs a code review to 🥳 Done in Open Source Fridays Jul 18, 2025
@matbcvo matbcvo deleted the remove-unused-package branch July 18, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-review-passed PRs which have passed code review composer Any bugs or PRs relating to composer dependencies Pull requests that update a dependency file enhancement Any improvement to an existing feature or functionality
Projects
Status: 🥳 Done
Development

Successfully merging this pull request may close these issues.

2 participants