Skip to content

Releases: bearsunday/BEAR.QueryRepository

1.16.2

Choose a tag to compare

@koriym koriym released this 29 Jun 07:28

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)

1.16.1

Choose a tag to compare

@koriym koriym released this 31 May 17:31
a4cd9e8

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.

1.16.0

Choose a tag to compare

@koriym koriym released this 16 May 08:19

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

1.15.1

Choose a tag to compare

@koriym koriym released this 07 Feb 01:48
41468fa

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

1.15.0

Choose a tag to compare

@koriym koriym released this 02 Feb 16:21
8e4ab37

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

1.14.0

Choose a tag to compare

@koriym koriym released this 24 Jan 06:07

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

1.13.0

Choose a tag to compare

@koriym koriym released this 10 Nov 09:31
3891ae2

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

1.12.1

Choose a tag to compare

@koriym koriym released this 20 Jun 03:17
9e7ca85

What's Changed

New Contributors

Full Changelog: 1.12.0...1.12.1

1.12.0

Choose a tag to compare

@koriym koriym released this 11 Jan 10:08
85688a0

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

image

1.11.1

Choose a tag to compare

@koriym koriym released this 06 Jan 15:40
7997435

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