Skip to content

Use closure in PurgeOn::if#116

Draft
Brajk19 wants to merge 30 commits into
sofascore:2.xfrom
Brajk19:closure-if
Draft

Use closure in PurgeOn::if#116
Brajk19 wants to merge 30 commits into
sofascore:2.xfrom
Brajk19:closure-if

Conversation

@Brajk19

@Brajk19 Brajk19 commented Oct 26, 2025

Copy link
Copy Markdown
Member

Add support for using closure in PurgeOn::if for php 8.5+

opis/closure is used for serializing/deserializing closures. its an optional dependency.

@Brajk19 Brajk19 self-assigned this Oct 26, 2025
@codecov

codecov Bot commented Oct 26, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.42%. Comparing base (5421e0c) to head (1687dee).

Files with missing lines Patch % Lines
src/Attribute/PurgeOn.php 50.00% 1 Missing ⚠️
src/Cache/PropertyResolver/AssociationResolver.php 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x     #116      +/-   ##
============================================
- Coverage     97.48%   97.42%   -0.07%     
- Complexity      518      537      +19     
============================================
  Files            69       69              
  Lines          1431     1473      +42     
============================================
+ Hits           1395     1435      +40     
- Misses           36       38       +2     
Flag Coverage Δ
8.1 97.14% <87.50%> (-0.34%) ⬇️
8.2 97.08% <87.50%> (-0.34%) ⬇️
8.3 96.87% <87.50%> (-0.33%) ⬇️
8.4 96.87% <87.50%> (-0.33%) ⬇️
8.5 97.14% <95.83%> (-0.06%) ⬇️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@HypeMC HypeMC changed the base branch from 1.x to 2.x December 15, 2025 19:18
Comment on lines +77 to +78
// TODO support closures
throw new \RuntimeException('Cannot create inverse subscription with closures');

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

will be implemented in following PR because this one is already big

@Brajk19 Brajk19 requested a review from HypeMC June 11, 2026 19:37
@Brajk19 Brajk19 marked this pull request as ready for review June 11, 2026 19:37
@Brajk19 Brajk19 marked this pull request as draft June 17, 2026 09:20
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.

1 participant