Skip to content

Refactor using brick/varexporter#12

Merged
josbeir merged 1 commit intomainfrom
refactor/use-brick-varexporter
Jan 8, 2026
Merged

Refactor using brick/varexporter#12
josbeir merged 1 commit intomainfrom
refactor/use-brick-varexporter

Conversation

@josbeir
Copy link
Owner

@josbeir josbeir commented Jan 8, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 8, 2026 11:09
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.84%. Comparing base (9546b0e) to head (65cf2cb).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #12      +/-   ##
============================================
+ Coverage     95.74%   95.84%   +0.10%     
+ Complexity      335      316      -19     
============================================
  Files            26       26              
  Lines          1081     1035      -46     
============================================
- Hits           1035      992      -43     
+ Misses           46       43       -3     

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

@josbeir josbeir merged commit ea3dd33 into main Jan 8, 2026
14 checks passed
@josbeir josbeir deleted the refactor/use-brick-varexporter branch January 8, 2026 11:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the compiled cache serialization from custom var_export logic to use the brick/varexporter library, enabling support for arbitrary objects without requiring __set_state implementation.

Key changes:

  • Adds brick/varexporter dependency to handle more flexible object serialization
  • Removes ~110 lines of custom export code (exportString, exportValue, exportArray methods)
  • Updates tests to verify objects without __set_state can now be cached successfully

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
composer.json Adds brick/varexporter ^0.7.0 dependency
src/Service/CompiledCache.php Replaces custom export methods with VarExporter::export() calls, removes UnitEnum import
tests/TestCase/Service/CompiledCacheTest.php Updates test to verify objects without __set_state can be cached and properly round-trip
README.md Updates documentation to reflect new object serialization capabilities without __set_state requirement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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