Skip to content

feat(repository): add stream() for memory-bounded iteration over large collections#145

Merged
clementtalleu merged 1 commit into
clementtalleu:mainfrom
guillaumedelre:feature/issue-144
May 7, 2026
Merged

feat(repository): add stream() for memory-bounded iteration over large collections#145
clementtalleu merged 1 commit into
clementtalleu:mainfrom
guillaumedelre:feature/issue-144

Conversation

@guillaumedelre
Copy link
Copy Markdown
Contributor

Ref: #144

Introduces stream() on AbstractObjectRepository and RedisObjectManager, yielding objects in configurable batches without loading the full collection into memory.

  • RepositoryInterface: add stream(criteria, orderBy, batchSize) signature
  • AbstractObjectRepository: implement stream(); findAll() delegates to it
  • RedisObjectManagerInterface/RedisObjectManager: add stream() with automatic identity map clearing between batches
  • Tests: functional coverage for Hash and Json formats (criteria, orderBy, empty collection, small batchSize, exact batch multiple, manager variant with identity map verification)
  • docs/advanced_usage.md: document both forms and their constraints
  • README.md: add Unique Constraints and Streaming sections, update feature list
  • style: apply php-cs-fixer to pre-existing violations in tests/

…e collections

Introduces stream() on AbstractObjectRepository and RedisObjectManager,
yielding objects in configurable batches without loading the full
collection into memory.

- RepositoryInterface: add stream(criteria, orderBy, batchSize) signature
- AbstractObjectRepository: implement stream(); findAll() delegates to it
- RedisObjectManagerInterface/RedisObjectManager: add stream() with
  automatic identity map clearing between batches
- Tests: functional coverage for Hash and Json formats (criteria, orderBy,
  empty collection, small batchSize, exact batch multiple, manager variant
  with identity map verification)
- docs/advanced_usage.md: document both forms and their constraints
- README.md: add Unique Constraints and Streaming sections, update feature list
- style: apply php-cs-fixer to pre-existing violations in tests/
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.47%. Comparing base (3dbfb4c) to head (1cef385).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #145      +/-   ##
============================================
+ Coverage     87.43%   87.47%   +0.03%     
- Complexity      949      951       +2     
============================================
  Files            70       70              
  Lines          2221     2228       +7     
============================================
+ Hits           1942     1949       +7     
  Misses          279      279              

☔ View full report in Codecov by Sentry.
📢 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.

@clementtalleu clementtalleu merged commit 3c6b698 into clementtalleu:main May 7, 2026
3 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.

3 participants