PackageTrack
Sign in Get early access

bear/query-repository

AboutResource Query Responsibility Segregation (RQRS) is a caching framework for BEAR.Sunday that optimizes performance by separating query and command responsibilities. It features event-driven cache invalidation, dependency resolution, donut caching, CDN integration, and conditional requests.

1.16.2 618K downloads/mo #4982 most downloaded on Packagist bearsunday/BEAR.QueryRepository

What this package is like to depend on

Last release 1 months ago

29 Jun 2026

Release timing varies

gaps range from 9 days to 6 months

Rarely documented

notes for 11 of 84 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

85 releases · first in 2015

7 releases in the last 12 months

see the full history below

Release timeline

84 releases · Feb 2015 to Jun 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 85
  1. 1.16.2 29 Jun 2026
    Release notes

    Fixed

    • Remove unused ETag from invalidation tags: ETag was unnecessarily registered as a cache invalidation tag. No code path invalidates by ETag (only by URI tag and surrogate keys), so each content version produced a new, non-volatile tag Set that was never read or reclaimed. Under volatile-* eviction policies these Sets leaked memory indefinitely. (#180)
    Open source →
    Release notes

    Fixed

    • Remove unused ETag from invalidation tags: ETag was unnecessarily registered as a cache invalidation tag. No code path invalidates by ETag (only by URI tag and surrogate keys), so each content version produced a new, non-volatile tag Set that was never read or reclaimed. Under volatile-* eviction policies these Sets leaked memory indefinitely. (#180)
    Open source →
  2. 1.16.1 31 May 2026
    Release notes

    Fixed

    • Fix multi-embed cache dependency: a #[Cacheable] resource embedding more than one child kept only the last child's dependency, so purging an earlier child failed to invalidate the parent (stale cache). CacheDependency::depends() now accumulates child tags instead of overwriting, and the erroneous assertion that a parent had no prior tags has been removed.
    Open source →
    Release notes

    Fixed

    • Fix multi-embed cache dependency: a #[Cacheable] resource embedding more than one child kept only the last child's dependency, so purging an earlier child failed to invalidate the parent (stale cache). CacheDependency::depends() now accumulates child tags instead of overwriting, and the erroneous assertion that a parent had no prior tags has been removed.
    Open source →
  3. 1.16.0 16 May 2026
    Release notes

    Fixed

    • Resolve embed cache dependencies before HAL rendering: child resources' ETag headers are now collected before HalRenderer strips Request instances from the body, so the parent's Surrogate-Key reliably includes all embedded children (#174)
    • Include async embed children in dependency resolution: walk by AbstractRequest instead of the concrete Request, so AsyncRequest (and other AbstractRequest subclasses) are no longer silently skipped

    Changed

    • Cache dependency resolution moved from EtagSetter / DevEtagSetter into QueryRepository::put() (runs on HTTP 200 only, before persistence)
    • QueryRepository::__construct() now requires CacheDependencyInterface
    • EtagSetter::__construct() and DevEtagSetter::__construct() no longer accept CacheDependencyInterface
    • DI users via QueryRepositoryModule are unaffected; only callers that directly new these classes need to update their constructor calls

    Added

    • HAL embed cache dependency test (tests/CacheDependencyTest.php)
    • Non-Cacheable embed child test fixtures and continue path coverage
    Open source →
    Release notes

    Fixed

    • Resolve embed cache dependencies before HAL rendering: child resources' ETag headers are now collected before HalRenderer strips Request instances from the body, so the parent's Surrogate-Key reliably includes all embedded children (#174)
    • Include async embed children in dependency resolution: walk by AbstractRequest instead of the concrete Request, so AsyncRequest (and other AbstractRequest subclasses) are no longer silently skipped

    Changed

    • Cache dependency resolution moved from EtagSetter / DevEtagSetter into QueryRepository::put() (runs on HTTP 200 only, before persistence)
    • QueryRepository::__construct() now requires CacheDependencyInterface
    • EtagSetter::__construct() and DevEtagSetter::__construct() no longer accept CacheDependencyInterface
    • DI users via QueryRepositoryModule are unaffected; only callers that directly new these classes need to update their constructor calls

    Added

    • HAL embed cache dependency test (tests/CacheDependencyTest.php)
    • Non-Cacheable embed child test fixtures and continue path coverage
    Open source →
  4. 1.15.1 07 Feb 2026
    Release notes

    What's Changed

    Fixed

    • Replace deprecated DateTimeInterface::RFC7231 with Header::RFC7231 constant for PHP 8.5 compatibility (#173)
    • Centralize RFC 7231 date format in Header::RFC7231 used by all EtagSetter implementations

    Full Changelog: 1.15.0...1.15.1

    Open source →
  5. 1.15.0 02 Feb 2026
    Release notes

    What's Changed

    Added

    • Add ServerContextInterface for coroutine-safe request handling in Swoole/RoadRunner environments
    • Add GlobalServerContext as default implementation using $_SERVER superglobal
    • Add RepositoryLoggerInterface with reset() method for long-running process support

    Changed

    • Bind ServerContextInterface to GlobalServerContext in QueryRepositoryModule
    • Use ServerContextInterface in ResourceStorage instead of direct $_SERVER access

    Full Changelog: 1.14.0...1.15.0

    Open source →
    Release notes

    Added

    • Add ServerContextInterface for coroutine-safe request handling in Swoole/RoadRunner environments
    • Add GlobalServerContext as default implementation using $_SERVER superglobal
    • Add RepositoryLoggerInterface with reset() method for long-running process support

    Changed

    • Bind ServerContextInterface to GlobalServerContext in QueryRepositoryModule
    • Use ServerContextInterface in ResourceStorage instead of direct $_SERVER access
    Open source →
  6. 1.14.0 24 Jan 2026
    Release notes

    Added

    • LLM documentation (docs/llms.txt, docs/llms-full.txt) for AI-assisted development
    • JSON schema for RepositoryLogger output (docs/schemas/repository-log.json)
    • Cache dependency demos for AI log analysis
    • Cache dependency test coverage documentation

    Changed

    • RepositoryLogger output changed to JSON format for structured logging
    • Updated .gitattributes to exclude development files from release
    • Require ray/aop ^2.19.1 and ray/di ^2.20 for PHP 8.5 compatibility
    • Updated copyright year to 2026

    Fixed

    • UriTagTest typo in documentation
    Open source →
    Release notes

    Added

    • Add LLM documentation (docs/llms.txt, docs/llms-full.txt) for AI-assisted development
    • Add JSON schema for RepositoryLogger output (docs/schemas/repository-log.json)
    • Add cache dependency demos for AI log analysis (demo/run-dependency.php, demo/run-donut.php)
    • Add cache dependency test coverage documentation (tests/CACHE_DEPENDENCY_TESTS.md)
    • Add test resources for cache dependency patterns (ParentA, ParentB, ChildC)

    Changed

    • Change RepositoryLogger output to JSON format for structured logging
    • Update .gitattributes to exclude development files from release
    • Require ray/aop ^2.19.1 and ray/di ^2.20 for PHP 8.5 compatibility
    • Update copyright year to 2026

    Fixed

    • Fix UriTagTest typo in documentation
    Open source →
  7. 1.13.0 10 Nov 2025
    Release notes

    Changes

    Changed

    • PHP 8 Attributes Migration: Removed doctrine/annotations and doctrine/cache dependencies, migrated to native PHP 8 attributes
    • Minimum PHP Version: Updated requirement from PHP 8.1 to PHP 8.2
    • Development Tools: Updated PHP_CodeSniffer to 4.0, Doctrine Coding Standard to 14.0, Slevomat Coding Standard to 8.24, PHPUnit to 11.5
    • Performance Improvements: Set ResourceStorage to singleton scope, optimized readonly class declarations for PHP 8.2
    • Enhanced Redis: Improved marshaller configuration with deflate compression support
    • Cross-Platform: Normalized URI separators and path handling for Windows/macOS/Linux
    • Documentation: Improved cache attribute and interceptor documentation with usage examples
    • Dependencies: Updated Symfony Cache to ^7.3, ray/aop to ^2.16, ray/di to ^2.17.2, vimeo/psalm to 6.12

    Added

    • Migration Tools: Added rector-migrate.php for automated annotation-to-attribute migration
    • Migration Guide: Added ANNOTATION_TO_ATTRIBUTE.md with comprehensive migration instructions
    • PHP 8.4 & 8.5 Support: Added PHP 8.4 and 8.5 support in CI workflow
    • Documentation: Added CLAUDE.md with complete codebase architecture guide
    • Japanese Docs: Added README.ja.md

    Removed

    • doctrine/annotations (abandoned package)
    • doctrine/cache (abandoned package)
    • Sodium marshaller related code

    ⚠️ Migration Required

    Applications using annotations must migrate to PHP 8 attributes:

    # Preview changes
    vendor/bin/rector process src --config=vendor/bear/query-repository/rector-migrate.php --dry-run
    
    # Apply migration
    vendor/bin/rector process src --config=vendor/bear/query-repository/rector-migrate.php

    See ANNOTATION_TO_ATTRIBUTE.md for detailed migration guide.

    Why This Change?

    The doctrine/annotations package has been officially abandoned by its maintainers and will no longer receive updates or security patches. This change:

    • Eliminates security and compatibility risks from the abandoned package
    • Adopts native PHP 8 attributes as the modern standard
    • Improves performance (no runtime annotation parsing overhead)
    • Provides migration tooling for users to update their applications

    Why Not a Major Version Update?

    While this release removes doctrine/annotations, we consider it a minor version (1.13.0) rather than a major version (2.0.0) for the following reasons:

    No Public API Changes

    • All public interfaces, classes, and methods remain identical
    • The annotation-to-attribute migration is purely a syntax change
    • Existing code continues to work after applying the automated migration

    Automated Migration Available

    • We provide Rector configuration for one-command migration
    • The migration process is safe, tested, and reversible
    • Migration Guide includes comprehensive documentation and troubleshooting

    Semantic Versioning Perspective

    • Per semver, breaking changes are defined as incompatible API changes
    • While dependencies changed, the API contract remains stable
    • This follows the principle that if your code works on PHP 8.1+ with attributes, the upgrade path is clear and automated

    Version Strategy

    • Version 1.12.x continues to support annotations (requires doctrine/annotations)
    • Version 1.13.0+ uses native PHP 8 attributes only
    • Users can choose the appropriate version for their needs
    Open source →
    Release notes

    Added

    • Migration Tools: Added rector-migrate.php for automated annotation-to-attribute migration
    • Migration Guide: Added ANNOTATION_TO_ATTRIBUTE.md with comprehensive migration instructions
    • Add CLAUDE.md with comprehensive codebase architecture and development guide
    • Add marshaller configuration support for Redis with compression options (deflate)
    • Add MarshallerType enum for type-safe marshaller selection
    • Add support for RelayCluster in RedisDsnProvider
    • Add Japanese README (README.ja.md)
    • Add #[Override] PHP attribute across all applicable methods and classes
    • Add Memcached EtagPool module with TagAwareAdapter support
    • Add Redis DSN module (StorageRedisDsnModule) with provider implementation
    • Add TagsPool annotation and binding to QueryRepositoryModule
    • Add validation to ensure FastlyPurgeModule is installed when used
    • Add Dependabot configuration
    • Add PHP 8.4 support to CI workflow
    • Add PHP 8.5 support to CI workflow

    Changed

    • PHP 8 Attributes Migration: Removed doctrine/annotations and doctrine/cache dependencies, migrated to native PHP 8 attributes
    • Minimum PHP Version: Updated requirement from PHP 8.1 to PHP 8.2
    • Update development tools: PHP_CodeSniffer to 4.0, Doctrine Coding Standard to 14.0, Slevomat Coding Standard to 8.24, PHPUnit to 11.5
    • Optimize readonly class declarations for PHP 8.2 (class-level modifier)
    • Improve cache attribute and interceptor documentation with usage examples
    • Improve rector-migrate.php to support vendor installation by removing hardcoded paths
    • Update ANNOTATION_TO_ATTRIBUTE.md migration guide following Ray.AuraSqlModule pattern
    • Improve marshaller provider error handling with better exception messages
    • Enhance Memcached module with TagAwareAdapter support
    • Update Symfony Cache to support version ^7.3
    • Update symfony/polyfill-php83 dependency to ^v1.32.0
    • Update mobiledetect/mobiledetectlib to support version ^4.8
    • Update composer dependencies (madapaja/twig-module, phpunit/phpunit, predis/predis, twig/twig, symfony/process)
    • Update vimeo/psalm to version 6.12
    • Update ray/aop dependency to ^2.16
    • Update ray/di dependency to ^2.17.2
    • Set ResourceStorage to singleton scope for better performance
    • Refactor ResourceStorage with ProviderInterface for serialization support
    • Improve UriTag test coverage for consistent key generation across parameter order
    • Normalize URI separators in generated cache keys for cross-platform compatibility
    • Simplify ETag and surrogate key generation logic
    • Handle both forward slashes and backslashes in surrogate key generation
    • Sanitize ETags to replace reserved characters
    • Replace symlink with actual file for cross-platform compatibility
    • Enable package sorting in composer.json
    • Refactor CI workflow for expanded PHP version and OS coverage
    • Update copyright year to 2025

    Removed

    • Remove Sodium marshaller related code
    • Remove bear/fastly-module from production dependencies (moved to dev dependencies)
    • Remove unnecessary singleton scopes from bindings
    • Remove unused PSR cache annotations and RedisAdapter binding
    • Remove unused MemcachedAdapter bindings
    • Remove redundant assert statements from codebase
    • Remove unused dependencies from composer.json

    Deprecated

    • Deprecate StorageApcModuleTest
    • Deprecate StorageRedisModuleTest (use StorageRedisDsnModule instead)
    • Deprecate StorageRedisMemcachedModule
    • Deprecate BcModule
    • Deprecate NamespacedCacheProvider class
    • Deprecate ResourceStorageCacheableTrait

    Fixed

    • Fix type casting in headers
    • Fix path separator replacement for cross-platform compatibility (Windows/macOS/Linux)
    • Fix typo in deprecated notice
    • Fix README file extension issue
    Open source →
  8. 1.12.1 20 Jun 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 1.12.0...1.12.1

    Open source →
  9. 1.12.0 11 Jan 2025
    Release notes

    What's Changed

    • Fix type casting and update dependencies by @koriym in #159
    • Windows: Normalize URI separators in cache key generation by @koriym in #160

    Full Changelog: 1.11.1...1.12.0

    Open source →
  10. 1.11.1 06 Jan 2025
    Release notes

    Bug Fix

    The error that occurred when serializing the root object is fixed by making the singleton object that cannot be serialized.

    シリアライズできないオブジェクトをシングルトンにしていたことで、ルートオブジェクトのシリアライズでエラーが発生していたのを修正します。

    What's Changed

    • Update license copyright year(s) by @github-actions in #156
    • Remove unnecessary singleton scopes and update bindings by @koriym in #157
    • Update dependencies and enhance compatibility by @koriym in #158

    Full Changelog: 1.11.0...1.11.1

    Open source →
  11. 1.11.0 26 Nov 2024

    Nothing published for this version

  12. 1.10.1 01 Nov 2024

    Nothing published for this version

  13. 1.10.0 17 May 2024

    Nothing published for this version

  14. 1.9.9 no date
    Release notes

    (Previous releases not documented yet)

    Open source →
  15. 1.9.8 27 Mar 2024

    Nothing published for this version

  16. 1.9.7 26 Mar 2024

    Nothing published for this version

  17. 1.9.6 03 Sep 2023

    Nothing published for this version

  18. 1.9.5 18 Aug 2023

    Nothing published for this version

  19. 1.9.4 31 May 2023

    Nothing published for this version

  20. 1.9.3 09 Feb 2023

    Nothing published for this version

  21. 1.9.2 05 Feb 2023

    Nothing published for this version

  22. 1.9.1 06 Dec 2022

    Nothing published for this version

  23. 1.9.0 21 Nov 2022

    Nothing published for this version

  24. 1.8.6 13 Jul 2022

    Nothing published for this version

  25. 1.8.5 05 Jul 2022

    Nothing published for this version

  26. 1.8.4 05 Apr 2022

    Nothing published for this version

  27. 1.8.4-patch.1 16 Nov 2024 pre-release

    Nothing published for this version

  28. 1.8.3 26 Mar 2022

    Nothing published for this version

  29. 1.8.2 11 Nov 2021

    Nothing published for this version

  30. 1.8.1 10 Nov 2021

    Nothing published for this version

  31. 1.8.0 06 Nov 2021

    Nothing published for this version

  32. 1.7.1 17 Jul 2021

    Nothing published for this version

  33. 1.7.0 15 Jul 2021

    Nothing published for this version

  34. 1.6.13 02 May 2021

    Nothing published for this version

  35. 1.6.12 02 May 2021

    Nothing published for this version

  36. 1.6.11 31 Mar 2021

    Nothing published for this version

  37. 1.6.10 19 Jan 2021

    Nothing published for this version

  38. 1.6.9 28 Sep 2020

    Nothing published for this version

  39. 1.6.8 02 Jun 2020

    Nothing published for this version

  40. 1.6.7 15 May 2020

    Nothing published for this version

  41. 1.6.6 04 May 2020

    Nothing published for this version

  42. 1.6.5 27 Mar 2020

    Nothing published for this version

  43. 1.6.4 08 Aug 2019

    Nothing published for this version

  44. 1.6.3 31 Jan 2019

    Nothing published for this version

  45. 1.6.2 07 Nov 2018

    Nothing published for this version

  46. 1.6.1 23 Oct 2018

    Nothing published for this version

  47. 1.6.0 23 Oct 2018

    Nothing published for this version

  48. 1.5.6 30 Sep 2018

    Nothing published for this version

  49. 1.5.5 26 May 2018

    Nothing published for this version

  50. 1.5.4 26 May 2018

    Nothing published for this version

  51. 1.5.3 25 May 2018

    Nothing published for this version

  52. 1.5.2 24 May 2018

    Nothing published for this version

  53. 1.5.1 23 May 2018

    Nothing published for this version

  54. 1.5.0 15 May 2018

    Nothing published for this version

  55. 1.4.7 12 May 2018

    Nothing published for this version

  56. 1.4.6 12 May 2018

    Nothing published for this version

  57. 1.4.5 27 Mar 2018

    Nothing published for this version

  58. 1.4.4 19 Mar 2018

    Nothing published for this version

  59. 1.4.3 06 Feb 2018

    Nothing published for this version

  60. 1.4.2 13 Aug 2017

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive