Skip to content

Conversation

@Brajk19
Copy link
Member

@Brajk19 Brajk19 commented Jan 25, 2025

Currently if we have invalid PurgeOn with missing route params like this:

#[Route('/{foo}/{bar}')]
#[PurgeOn(Entity:class, routeParams: ['bar' => 'bar'])]

When this PurgeOn is triggered, MissingMandatoryParametersException will be thrown with message
Some mandatory parameters are missing ("foo", "bar") to generate a URL for route "foo".

Because of this exception, transaction will be rollbacked and all changes are lost.
We can detect these invalid PurgeOns during cache warmup when they are parsed.

@Brajk19 Brajk19 requested a review from HypeMC January 25, 2025 17:31
@Brajk19 Brajk19 self-assigned this Jan 25, 2025
@codecov
Copy link

codecov bot commented Jan 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.94%. Comparing base (979b79c) to head (791b30b).
Report is 1 commits behind head on 1.x.

Additional details and impacted files
@@             Coverage Diff              @@
##                1.x      #90      +/-   ##
============================================
+ Coverage     96.92%   96.94%   +0.02%     
- Complexity      485      487       +2     
============================================
  Files            62       62              
  Lines          1429     1442      +13     
============================================
+ Hits           1385     1398      +13     
  Misses           44       44              
Flag Coverage Δ
8.1 96.94% <100.00%> (+0.02%) ⬆️
8.2 96.87% <100.00%> (+0.02%) ⬆️
8.3 96.87% <100.00%> (+0.02%) ⬆️
8.4 96.87% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

HypeMC
HypeMC previously approved these changes Jan 25, 2025
Co-authored-by: HypeMC <2445045+HypeMC@users.noreply.github.com>
@HypeMC HypeMC merged commit 66e5378 into sofascore:1.x Jan 25, 2025
40 checks passed
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.

2 participants