NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #5730 most downloaded on Packagist
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.
Latest stable
1.20.0
Last release 11 days ago
11 Nov 2026
Release timing varies
gaps range from 8 days to 5 months
Nearly every release is documented
notes for 54 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
91 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
…run, and a #[CacheableResponse] page under the deprecated MobileEtagModule fails the same way. Request each #[Cacheable] resource once in development…
#[DependsOn(uri: ...)] tags a stored resource with the URI it names, expanded from the onGet() arguments when on onGet() or from the public properties of each instance in the body when on a row class, so invalidating that URI also invalidates the resource and every page that embeds it. Tag array rows with UriTagInterface::fromAssoc(); a declaration that cannot expand fails the GET with BEAR\QueryRepository\Exception\DependsOnNotExpandable.LogWriterInterface an application adds with MultiBinder::newInstance($this, LogWriterInterface::class)->addBinding(). Bind the added class as well (ray-di/Ray.Compiler#148).durationMs of cache_hit, cache_miss and invalidate; the etag of save_etag) with "x-volatile": true, so stree --snapshot --schema-dir=docs/schemas/context renders them as [volatile] (semantic-logger 0.11.1 or later).ray/di 2.23 or later.#[Cacheable] body that does not serialize fails the request in every environment (cache_error{operation: write}), unless the response sets Cache-Control: no-store or private itself and so is not stored; a write whose refresh builds such a body fails after the write has run, and a #[CacheableResponse] page under the deprecated MobileEtagModule fails the same way. Request each #[Cacheable] resource once in development before deploying.#[Cacheable] response without a lifetime, and a class-level #[CacheableResponse] response, carry Cache-Control: max-age=0 instead of max-age=31536000 unless they declare a max-age or no-store; a CDN still follows s-maxage. Declare a lifetime for data that changes without a write.#[Purge]/#[Refresh] whose URI template leaves out a required onGet() parameter now throws TemplateLacksRequiredParameter before the write runs. Add the parameter, or its snake_case name, to the template.{?id*}, ?id={ids*}) of a #[Purge]/#[Refresh] invalidates one URI per element, and an empty list invalidates nothing. To keep the old URI, drop the * from ?id={ids*}, and give {?id*} the last element instead of the list.CacheVersionModule version (or clear your pools) and a rebuilt injector. A browser that holds a response sent with max-age=31536000 keeps using it until it expires.BodySerializationErrorHandlerInterface, ThrowSerializationError, SkipSerializationError and Exception\BodySerializationNotAllowedException, added in 1.19.0. Remove a binding of the interface, and catch the exception serialize() throws instead.put_skipped reason unserializable and its class field.#[Cacheable(type: 'view')] entry or a partial ETag whose body does not serialize no longer runs the pre-write cleanup and its CDN purge on every request (#264).#[CacheableResponse] or #[DonutCache] page renders also invalidates the stored template, so its purge rebuilds the page.onGet() parameter in snake_case (user_id for $userId) refreshes the cache instead of throwing UnmatchedQuery or skipping the refresh (#275).StorageMemcachedEtagModule keeps ETags in the Memcached servers it is given and no longer changes the servers of StorageMemcachedModule. Check that those servers are reachable before deploying; ETags, and depending on install order cached resources, start empty there.Stringable query value, such as a ULID object, is part of the cache key and URI tag, so different values no longer share one entry and a #[Purge]/#[Refresh] written with the string reaches it.#[Purge]/#[Refresh] on a write of a resource that is not #[Cacheable], called directly on an object taken from the injector, builds its URIs from the body and arguments instead of throwing a TypeError.UriTagInterface, a #[CacheableResponse] or #[DonutCache] page now carries its own URI tag and its holes' tags in that format, the one a purge sends; they were in the default format, so a purge could miss the page.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Behaviour change: the refresh after a write (RefreshSameCommand/DonutCommandInterceptor) is a GET on a new resource instance, no longer onGet() re-run
RefreshSameCommand/DonutCommandInterceptor) is a GET on a new resource instance, no longer onGet() re-run on the written object. The write's response keeps its own code, headers, body and query; a client that read the refreshed representation from it must GET it. A #[Refresh]/#[Purge] URI template expands from the write's own body and query. State a write leaves on the resource object is not seen by the refresh; keep written data in storage.CacheVersionModule version, or clear your own pools: entries refreshed by an earlier version can hold the write's state.201 or 204 write now refreshes its #[Cacheable] entry; it was left empty (put_skipped{error-code}).#[CacheableResponse] page written with a 201 no longer stores and serves the write's code, Location header and body.ETag/Last-Modified/Cache-Control), and a refreshed entry no longer carries write-only body keys or the write's URI method.A purge-reach release. Purging a URI without its optional query now also reaches its query variants and the pages that embed them, and a #[Cacheable]
A purge-reach release. Purging a URI without its optional query now also reaches its query variants and the pages that embed them, and a #[Cacheable] parent now depends on a child that carries only a Surrogate-Key.
CacheVersionModule version, or clear the pools if you bind your own cache adapter. Entries stored by earlier versions carry no group tag, so a purge of the bare URI would not reach their query variants.
CacheVersionModuleのバージョンを上げてください。 独自のキャッシュアダプターを束縛している場合は、プールをクリアしてください。以前のバージョンが保存したエントリはグループタグを持たないため、クエリなしのURIを無効化しても、クエリだけが異なるキャッシュに届きません。QueryRepository, DonutRepository, ResourceStorage and CacheInterceptor take new constructor dependencies, so scripts compiled with 1.18.0 and injectors serialized by BEAR.Package 1.23 or earlier no longer fit.
injectorを作り直してください。 QueryRepository、DonutRepository、ResourceStorage、CacheInterceptorのコンストラクタが変わったため、1.18.0でコンパイルしたスクリプトや、BEAR.Package 1.23以前がシリアライズしたinjectorは使えません。PurgerInterface must split its argument on spaces. purge() now passes two tags in one call. The Fastly purger (bear/fastly-module) already does.
独自のPurgerInterfaceは、引数を空白で分割してください。 purge()は1回の呼び出しで2つのタグを渡します。Fastly用のpurger(bear/fastly-module)は分割しています。string $lang = 'ja', for example), and a #[Cacheable] parent is dropped when a child that carries only a Surrogate-Key changes. Watch the cache hit rate after deploying.
無効化の範囲が広がります。 書き込みは、既定値を持つ引数だけが異なるすべてのキャッシュ(例:string $lang = 'ja'を持つエンティティの全言語)を無効化します。Surrogate-Keyだけを持つ子が変わると、#[Cacheable]の親も無効化されます。デプロイ後はキャッシュヒット率を確認してください。Exception\CacheStoreException instead of Exception\CacheStoreFailure. The class is renamed with no alias, and its message no longer repeats the cause's; read the cause from getPrevious().
Exception\CacheStoreFailureを捕捉しているコードは、Exception\CacheStoreExceptionに変えてください。 別名は残していません。メッセージは原因のメッセージを繰り返さなくなったので、原因はgetPrevious()で取り出してください。app://self/articles now also drops app://self/articles?page=2; a page that embeds it is dropped, or recomposed when it renders it as a hole (#255, #257).?page=1) reaches only that URI. A required key has to be spelled the way the GET spelled it (?user_id=1 vs ?userId=1); the automatic purge after a write spells it as the parameter does (userId), so it does not reach entries a GET stored with ?user_id=1.Surrogate-Key added to every variant only so that one purge reaches them all is no longer needed in the server-side pools, nor at the CDN for donut pages. Variants that differ in a required parameter, and #[Cacheable] resources at the CDN, still need one.dependency_skipped: a cached parent says why it left an embedded child out of its dependencies (#258).serialize() refuses (a PDO connection, a closure, an HTTP client, a DOM node) no longer fails every request in production: ProdQueryRepositoryModule binds SkipSerializationError, so the response goes out uncached, without CDN lifetime headers, and is logged as put_skipped{reason: unserializable} with the failing class. The default binding, ThrowSerializationError, still fails the request, now naming the resource URI. Bind your own BodySerializationErrorHandlerInterface to report the failure and return (#259).save_etag now follows the entry's save (#261).See CHANGELOG.md for the full list, and the "Invalidate by URI" section of the cache manual for what a purge reaches.
serialize() refuses (a closure, a PDO connection, an HTTP client, a DOM node) - a #[Cacheable] entry, or under MobileEtagModule also a #[CacheableResponse] page - now runs through BodySerializationErrorHandlerInterface instead of failing every request from EtagSetter/MobileEtagSetter: QueryRepositoryModule binds the default ThrowSerializationError, which fails the request with a BEAR\QueryRepository\Exception\BodySerializationNotAllowedException whose message is the URI, serialize()'s own exception chained; ProdQueryRepositoryModule binds SkipSerializationError instead, so the response goes out uncached (CDN-facing headers stripped, Cache-Control loses s-maxage/public and gains private, nothing stored, no pre-write purge unless an entry was stored before) and a put_skipped{reason: unserializable} event records the URI and the failing class. An application can bind its own handler, e.g. one that reports and returns (#259).BodySerializationErrorHandlerInterface only runs where the ETag computation itself serializes the body: EtagSetter's value path, and MobileEtagSetter for a #[Cacheable] entry or a #[CacheableResponse] page. A #[DonutCache] page stores its template without computing an ETag. Under EtagSetter a #[Cacheable(type: 'view')] entry (the rendered view is hashed instead) and a partial ETag (#[HttpCache(etag: [...])]) never reach it, nor does anything under DevEtagModule (URI-derived ETag); there the pool's marshaller still refuses the entry (saved: false), and no ETag is kept for it (see Fixed, #261), but the pre-write cleanup still runs on every such request (#264).#[Cacheable] put or a donut page write) logs dependency_skipped for each top-level embedded child it leaves out of its dependencies, so a parent with no depends_on says why; docs/reading-the-log.md explains the reason. A child moved into a nested array, replaced or unset is not seen and not logged.CacheVersionModule version (an app that binds its own cache adapter rather than this package's Storage*Modules must clear its pools instead): entries stored by an earlier version carry no group tag (see Fixed), and a page recomposed from an earlier version's donut template can still lack it in its CDN Surrogate-Key header and its If-None-Match validator, so a bare purge would not reach those.QueryRepository, DonutRepository, ResourceStorage and CacheInterceptor take new required constructor dependencies (CacheDependency an optional one), so neither the scripts compiled with 1.18.0 (BEAR.Package reuses them while its compile marker matches the app and context) nor an injector serialized with it (BEAR.Package 1.23 and earlier cache one) fits the new constructors.RefreshSameCommand/DonutCommandInterceptor) drops default-valued onGet() parameters from the URI it purges, so it reaches every variant even when the write request supplies one: a write to app://self/articles purges every page of the list, and with onGet(int $id, string $lang = 'ja') a write to ?id=1 purges the entries of every language for that id and the pages that embed them.purge() now hands the PurgerInterface two tags in one call, the URI's own tag and its group tag, separated by a space, as invalidateTags() with several tags already did. A custom purger has to split the string on spaces, as the bundled Fastly purger does; one that sends the whole string as a single key matches no response's key.onGet() does not declare, purging the bare or required-only URI now suffices in the server-side pools and, for #[CacheableResponse]/#[DonutCache] pages, at the CDN; a shared Surrogate-Key added to each such variant only for that purpose is no longer needed there. Variants that differ in a required parameter, and the CDN copies of #[Cacheable] resources, still need one.#[Cacheable] parent takes a top-level embedded child that carries a Surrogate-Key but no ETag as a dependency, as a donut page already did. A #[DonutCache] child (which never gets an ETag) or a non-cached child naming its data with its own Surrogate-Key now invalidates the parent; before, a change to it left the parent stale until the parent's TTL. The parent's Surrogate-Key carries those tags, so the parent is invalidated more often.Exception\CacheStoreFailure is renamed to Exception\CacheStoreException. It no longer copies its cause's message; the cause is the previous exception, and the degrade warning names the cause.MobileEtagModule: it varies only the ETag, and a cached state keeps the ETag of the device that stored it. To cache per device, use X_VARY.?page=2, or a query onGet() does not declare at all), which it used to leave stale (#255). Each cache entry is additionally tagged with a group tag - its URI with every default-valued onGet() parameter dropped - and purge() invalidates that tag too. This covers #[Cacheable] value entries and #[CacheableResponse]/#[DonutCache] pages, their If-None-Match validators and, for the donut pages, the CDN Surrogate-Key header, including after ResourceDonut::refresh().Surrogate-Key header too, so a bare purge of the child reaches the parent (#257): a #[Cacheable] parent or a data dependency of a donut page drops the parent's entry, and a hole recomposes the page.#[Purge(uri: 'app://self/articles?page=1')]) is not coarsened and invalidates only that exact URI's tag; write it without the parameter to reach every variant. A required key keeps the spelling the request used (?user_id=1, which BEAR.Resource binds to $userId), so a purge URI aimed at a GET reaches its entries only when it spells each required key the way that GET did: purge('?user_id=1') reaches entries stored by ?user_id=1&page=2, purge('?userId=1') does not. The automatic purge after a write names the key as the parameter does (userId), so it does not reach entries a GET stored with the snake_case key.#[Cacheable] GET still invalidates only its own URI's tag, so an error on the bare URI leaves the cached query variants in place.Surrogate-Key header, so a hole cached by its ETag alone, such as a plain #[Cacheable] child, could be purged once but not again. A recomposed page now keeps every hole's tags, as the first write does.#[Cacheable(type: 'view')] response whose rendering sets Cache-Control to private or no-store was stored, because the check ran before rendering; it is now checked on the rendered response and not stored.save_value, save_view or a donut page's save_donut_view) is now saved first and its ETag only once it is stored, so in the log save_etag follows the entry's save and is absent after a saved: false.Surrogate-Key with a doubled, leading or trailing space split into an empty tag, which the pool rejects, so the entry, its ETag or a donut page's template was not stored: a direct write threw, and under an interceptor the write degraded to a warning. Empty keys are now dropped, and each is stored under the remaining keys.A cache-correctness release. A response that marks itself private is no longer stored for every visitor, #[DonutCache] holes with query strings render
A cache-correctness release. A response that marks itself private is no longer stored for every visitor, #[DonutCache] holes with query strings render correctly, and a failed render no longer caches an empty page. Symfony 8 is supported on PHP 8.4+.
CacheVersionModule version, or clear the pools if you bind your own cache adapter. Entries written by earlier versions may hold per-user content, and during a rolling deploy an older version shows raw [le2:...] placeholders.Cache-Control: private or no-store is not stored server-side. This includes a $headers property default. To keep it stored while sending no-store to the client, declare #[HttpCache(noStore: true)].ResourceDonut::FORMAT is private. Use ResourceDonut::placeholder().koriym/semantic-logger ^0.11, bear/resource ^1.22.4, ray/psr-cache-module ^1.6, psr/log ^2.0. Apps on psr/log 1.x stay on 1.17.1.log document shape, and a diagnostic's kind is now code.@internal. Static analysis that enforces @internal reports an app that references them; reference the attributes, interfaces and modules instead.If you use BEAR.EventSourcing, use 0.2.0 or later.
#[HttpCache(noStore: true)] and #[NoHttpCache] no longer send a contradictory no-store, max-age=… (#243).#[DonutCache] hole whose URI has two or more query parameters no longer leaks a raw placeholder (#232).#[Embed] hole.#[DonutCache]/#[CacheableResponse] page that reads a cached embedded child in onGet() is purged together with that child.See CHANGELOG.md for the full list of changes.
Let an agent set it up: install the bear-observe skill, then ask it to "look at the log".
It installs the observation context, proves the wiring, runs one request and reads the tree.
composer require --dev bear/event-sourcing
mkdir -p .claude/skills && cp -r vendor/bear/event-sourcing/skills/bear-observe .claude/skills/
To wire it by hand, see the Observability section of the cache manual.
CacheVersionModule version (an app that binds its own cache adapter rather than this package's Storage*Modules must clear its pools instead): entries written by earlier versions may hold per-user content, and an earlier version reading this version's donut cache shows raw [le2:...] placeholders during a rolling deploy.#[Cacheable]/#[CacheableResponse]/#[DonutCache] response whose own code, including a $headers property default, sets Cache-Control to private or no-store is not stored server-side. To keep server-side caching with a client-facing no-store, declare #[HttpCache(noStore: true)] instead.ResourceDonut::FORMAT is no longer public; use ResourceDonut::placeholder().koriym/semantic-logger ^0.11. Written logs use its log document shape, and diagnostic kind is now code.bear/resource ^1.22.4.psr/log ^2.0 || ^3.0: 1.17.0 declared psr/log 1.x but PoolErrorLogger failed to load under it. Applications on psr/log 1.x stay on 1.17.1, which fixes that.symfony/cache 8 (PHP 8.4 or later), and requires ray/psr-cache-module ^1.6, which supports it.ResourceDonut::refresh(): a hole that throws while an already-cached #[DonutCache] page is recomposed now degrades to a fresh render instead of failing the request directly from the refresh, the same way a cache-store failure already does. A hole that keeps throwing still fails the request, now from the fresh render instead of the refresh.CacheDependency::depends() no longer unsets the child's own Surrogate-Key header after copying it into the parent: a child that is both read by the parent and later rendered as a hole keeps its own key for its own independent cache entry.KeepMutationsAndFailures no longer keeps a session only because it contains a semantic_logger_error diagnostic; a session is kept for a mutation, a failed effect or the sample.@internal; reference the attributes, interfaces and modules instead.Cache-Control contains no-store (e.g. #[HttpCache(noStore: true)] or #[NoHttpCache]) no longer gets a max-age appended, so the client header is not a contradictory no-store, max-age=… (#243).LogFileWriter: two sessions flushed in the same microsecond no longer overwrite each other. The timestamped filename now carries a random suffix, so both survive (#221).#[DonutCache] page embedding an #[Embed] hole whose URI carried two or more query parameters leaked a raw [le:...] placeholder to the client and could throw ParameterException on the next request - fixed by moving new placeholders to a [le2:...] marker (#232).#[DonutCache]/#[CacheableResponse] page - a hole's own resource or the page's own template - no longer stores an empty template that is served to every later visitor; the failure now surfaces to the caller instead of being swallowed into an empty page.onGet() alone: previously such a request answered 200 with an unresolved #[Embed] hole still in its body and no view, rather than the composed page.#[DonutCache]/#[CacheableResponse] page that onGet() already read into the body is no longer re-executed when the page renders it as a hole; both now come from the same single execution (#226).ResourceBodyEvaluator no longer crashes materializing an embedded child whose jsonSerialize() does not answer the memoized ResourceObject (the shape BEAR\Async\AsyncRequest overrides it to): such a child is now left unmaterialized instead of asserting. Async support itself remains out of scope.#[DonutCache]/#[CacheableResponse] page whose onGet() reads an embedded child's value now carries that child's tags, so purging the child also drops the page's stored template instead of leaving it stale. A hole the page only renders still just recomposes on purge.DonutRenderer: a second cache MISS of the same page in one long-running container (Swoole, RoadRunner) now renders that hole's fresh content; it previously could replay the first MISS's stale view.A fix for applications on psr/log 1.x.
A fix for applications on psr/log 1.x.
PoolErrorLogger, which StorageRedisDsnModule and StorageMemcachedModule bind, failed to load with a fatal error under psr/log 1.x, which 1.17.0 declares as supported. Every application on psr/log 1.x that uses Redis or Memcached storage was affected.
1.18.0 requires psr/log 2.0 or later, so 1.17.1 is the version for applications that are still on psr/log 1.x.
PoolErrorLogger, which StorageRedisDsnModule and StorageMemcachedModule bind, no longer fails to load with a fatal error under psr/log 1.x, which 1.17.0 declares as supported.Cache observability rebuilt on [Koriym.SemanticLogger](https://github.com/koriym/Koriym.SemanticLogger) (#178): typed, schema-validated open/event/clo
RepositoryLoggerInterface messages. Off by default - install DevQueryRepositoryLogModule (dev) or ProdQueryRepositoryLogModule (prod) to record. See docs/reading-the-log.md, docs/why-the-log-records-everything.md, docs/what-the-log-proves.md (Japanese translations included).cache_policy (#186), cache_error, pool_error, put_skipped, pre_write_cleanup, cdn_headers, conditional_request, invalidate (tri-state cdn, plus durationMs), command (source field), semantic_logger_error (core). Schemas in docs/schemas/context/.saved, tags, requestedTtl (save_etag), durationMs on the cache_hit/cache_miss close.#[CacheLog] qualifier resolves the cache logger. SafeSemanticLogger/SessionStoreInterface/ProcessSession keep it safe across a serialized injector (#179). TopLevelAwareInterface lets a custom logger opt into manual-call scope rooting.put()/putStatic()/putDonut()/purge()/invalidateTags() calls now open manual_store/manual_purge/manual_invalidate scopes.LogSinkInterface/ShutdownFlush, LogWriterInterface (LogFileWriter/LogStreamWriter/PsrLogWriter), ConcurrentRuntimeInterface/HostRuntime (refuses to arm under RoadRunner/a Swoole coroutine). Detection is not exhaustive: FrankenPHP worker mode, ReactPHP, Amp, a long-lived CLI consumer, and a Swoole worker whose logger is built outside a coroutine must bind their own ConcurrentRuntimeInterface/SessionStoreInterface/LogSinkInterface.ProdQueryRepositoryLogModule: buffers a session and applies RetentionPolicyInterface/KeepMutationsAndFailures at flush.DevQueryRepositoryLogModule: writes one file per request plus latest.json for vendor/bin/stree.demo/run-degraded.php and DemoLogCoverageTest: the demos now cover every context, schema enum value and command source, and self-validate against docs/schemas/context.UriScopedHttpCacheInterface::isNotModifiedFor() / ScopedValidatorInterface::hasEtagFor(): opt-in ETag scoped to the requested URI (#197, #201). Entries written before this version cannot be scoped: each client pays one full (non-304) response after the upgrade, once.QueryRepository/ResourceStorage boundary.docs/reading-the-log.md is now stated per parent declaration (#188).RepositoryLogger, RepositoryLoggerInterface, StructuredRepositoryLoggerInterface, NullRepositoryLogger: bound for BC but receive no internal events.update parameter of #[Cacheable]: it has no effect.docs/schemas/repository-log.json (superseded by per-context schemas in docs/schemas/context/).BEAR\QueryRepository\Log\NullSemanticLogger (koriym/semantic-logger 0.9 ships its own).skills/bear-cache-log/: folded into bear-observe.SemanticLoggerInterface/#[CacheLog] instead of RepositoryLoggerInterface::log().SaveDonutContext/SaveDonutViewContext: sMaxAge field renamed to requestedTtl.SaveEtagContext/SaveDonutViewContext: surrogateKeys field renamed to tags.command_result instead of vanishing from the log.assert() in ResourceStorage::saveDonut() (it threw after saved: false was already logged).pre_write_cleanup marker) instead of inferred from tag correlation.r marker to the ETag, so an unchanged recomposition still revalidates via If-None-Match.koriym/semantic-logger.#[CacheLog] binds to NullSemanticLogger unless a log module is installed.Exception\CacheStoreFailure now marks the cache-failure boundary. An unreadable ETag pool answers the conditional request in full instead of failing it, and a donut write the store refuses now serves the rendered page instead of a 500.invalidate.cdn: failed, then the purge exception propagates instead of being swallowed - a CDN outage can no longer look like a successful purge.#[Refresh] no longer double-writes its own #[Cacheable] destination after a regenerating GET.ResourceDonut::FOMRAT → FORMAT, EtagSetter::getEtagByEitireView() → getEtagByEntireView(), and the misspelled parameters $httpCacche → $httpCache (EtagSetter::getEtagByPartialBody()), $concheControlMaxAge → $cacheControlMaxAge (HeaderSetter::__invoke()) - a named-argument caller has to follow.saveView() required a 200-only validator, and DonutRepository/ResourceDonut did not restore the stored status code (#206, #207). Behaviour change: a #[CacheableResponse]/#[DonutCache] page answering 2xx or 3xx is now served with that status instead of crashing or degrading to 200 - a redirect that was reachable only once now persists until its cache entry is invalidated, so such a page needs the surrogate keys that invalidate it.onPost on a #[Cacheable] class ran with no interceptor at all, silently dropping #[Refresh]/#[Purge] (#212, #214).onPost on a #[Cacheable]/donut class missing an onGet-required parameter threw UnmatchedQuery uncaught - a regression from #214 above (#219, #220).#[RefreshCache] or a method-level #[CacheableResponse]; both now bind DonutCommandInterceptor. DonutCacheModule also missed onPost in its write matcher.DevEtagSetter/MobileEtagSetter set a validator on a non-200 response, where EtagSetter always skipped it; CdnCacheControlHeaderSetterInterface likewise now applies to 200 only.If-None-Match token containing a PSR-6 reserved character reached the ETag pool as a cache key and threw a 500; such tokens (and *) are now dropped and the request answered in full.Last-Modified even for byte-identical content; Age is now derived from storedAt instead of Last-Modified.putStatic()/putDonut() logged a negative lifetime verbatim while storage clamped what it stored.cache_error{operation: write}.Surrogate-Key lost embed dependency tracking and kept serving purged children.Surrogate-Key header when a resource is written twice in one request.ResourceStorage::saveEtag() used a hard-coded new UriTag() instead of the injected UriTagInterface.Surrogate-Key was untagged and unreachable by purge(); it now rebuilds on its first purge. Entries written before this version need a rewrite or a cache clear to become reachable.#[Cacheable] value entry with no renderer previously degraded every store to a warning and left the cache empty; it is now stored without rendering. The ETag validator falls back from the view to the body, a stored value entry no longer carries the renderer's Content-Type, and a custom EtagSetterInterface now receives $ro->view === null on the value path and must read the body instead.serialize() (a Closure, for instance) is a separate, known limitation: the write's serialize() Exception propagates uncaught rather than degrading to CacheStoreFailure (#208's rule: only the store's own failure is swallowed). Keep such values out of a value entry's body, or catch Exception at the call site.CliHttpCache::isNotModifiedFor() ignored the CLI request form's If-None-Match argument.MatchQuery threw for an onGet parameter with a default value that a write's query omitted.CDN-Cache-Control directives are now comma-separated per RFC 9213 (were space-separated).AkamaiModule, a #[CacheableResponse] page lost its embedded children's invalidation tags (ResourceStorageInterface::saveDonutView() gained an optional $tags parameter).MobileEtagSetter serialized the raw body and threw on any #[Embed]; it now hashes the materialized copy the way EtagSetter does.Remove unused ETag from invalidation tags: ETag was unnecessarily registered as a cache invalidation tag. No code path invalidates by ETag (only by UR
volatile-* eviction policies these Sets leaked memory indefinitely. (#180)Fix multi-embed cache dependency: a #[Cacheable] resource embedding more than one child kept only the last child's dependency, so purging an earlier c
#[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.Resolve embed cache dependencies before HAL rendering: child resources' ETag headers are now collected before HalRenderer strips Request instances fro
HalRenderer strips Request instances from the body, so the parent's Surrogate-Key reliably includes all embedded children (#174)AbstractRequest instead of the concrete Request, so AsyncRequest (and other AbstractRequest subclasses) are no longer silently skippedEtagSetter / DevEtagSetter into QueryRepository::put() (runs on HTTP 200 only, before persistence)QueryRepository::__construct() now requires CacheDependencyInterfaceEtagSetter::__construct() and DevEtagSetter::__construct() no longer accept CacheDependencyInterfaceQueryRepositoryModule are unaffected; only callers that directly new these classes need to update their constructor callstests/CacheDependencyTest.php)continue path coverageReplace deprecated DateTimeInterface::RFC7231 with Header::RFC7231 constant for PHP 8.5 compatibility
DateTimeInterface::RFC7231 with Header::RFC7231 constant for PHP 8.5 compatibility (#173)Header::RFC7231 used by all EtagSetter implementationsFull Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.15.0...1.15.1
Add ServerContextInterface for coroutine-safe request handling in Swoole/RoadRunner environments
ServerContextInterface for coroutine-safe request handling in Swoole/RoadRunner environmentsGlobalServerContext as default implementation using $_SERVER superglobalRepositoryLoggerInterface with reset() method for long-running process supportServerContextInterface to GlobalServerContext in QueryRepositoryModuleServerContextInterface in ResourceStorage instead of direct $_SERVER accessFull Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.14.0...1.15.0
LLM documentation (docs/llms.txt, docs/llms-full.txt) for AI-assisted development
docs/llms.txt, docs/llms-full.txt) for AI-assisted developmentdocs/schemas/repository-log.json).gitattributes to exclude development files from releaseray/aop ^2.19.1 and ray/di ^2.20 for PHP 8.5 compatibilitydocs/llms.txt, docs/llms-full.txt) for AI-assisted developmentdocs/schemas/repository-log.json)demo/run-dependency.php, demo/run-donut.php)tests/CACHE_DEPENDENCY_TESTS.md).gitattributes to exclude development files from releaseray/aop ^2.19.1 and ray/di ^2.20 for PHP 8.5 compatibilityPer semver, breaking changes are defined as incompatible API changes
doctrine/annotations and doctrine/cache dependencies, migrated to native PHP 8 attributesResourceStorage to singleton scope, optimized readonly class declarations for PHP 8.2rector-migrate.php for automated annotation-to-attribute migrationANNOTATION_TO_ATTRIBUTE.md with comprehensive migration instructionsCLAUDE.md with complete codebase architecture guideREADME.ja.mddoctrine/annotations (abandoned package)doctrine/cache (abandoned package)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.
The doctrine/annotations package has been officially abandoned by its maintainers and will no longer receive updates or security patches. This change:
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
Automated Migration Available
Semantic Versioning Perspective
Version Strategy
rector-migrate.php for automated annotation-to-attribute migrationANNOTATION_TO_ATTRIBUTE.md with comprehensive migration instructionsMarshallerType enum for type-safe marshaller selectionRelayCluster in RedisDsnProvider#[Override] PHP attribute across all applicable methods and classesStorageRedisDsnModule) with provider implementationdoctrine/annotations and doctrine/cache dependencies, migrated to native PHP 8 attributesrector-migrate.php to support vendor installation by removing hardcoded pathsANNOTATION_TO_ATTRIBUTE.md migration guide following Ray.AuraSqlModule patternsymfony/polyfill-php83 dependency to ^v1.32.0mobiledetect/mobiledetectlib to support version ^4.8madapaja/twig-module, phpunit/phpunit, predis/predis, twig/twig, symfony/process)vimeo/psalm to version 6.12ray/aop dependency to ^2.16ray/di dependency to ^2.17.2ResourceStorage to singleton scope for better performanceResourceStorage with ProviderInterface for serialization supportbear/fastly-module from production dependencies (moved to dev dependencies)assert statements from codebaseStorageApcModuleTestStorageRedisModuleTest (use StorageRedisDsnModule instead)StorageRedisMemcachedModuleBcModuleNamespacedCacheProvider classResourceStorageCacheableTraitFix: Correct README file extension by @suzumaze in https://github.com/bearsunday/BEAR.QueryRepository/pull/162
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.12.0...1.12.1
Fix type casting and update dependencies by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/159
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.11.1...1.12.0
The error that occurred when serializing the root object is fixed by making the singleton object that cannot be serialized.
The error that occurred when serializing the root object is fixed by making the singleton object that cannot be serialized.
シリアライズできないオブジェクトをシングルトンにしていたことで、ルートオブジェクトのシリアライズでエラーが発生していたのを修正します。
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.11.0...1.11.1
Introduce StorageRedisDsnModule by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/144
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.10.1...1.11.0
Update dependabot.yml by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/138
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.10.0...1.10.1
Fix Memcached adapter bind by @apple-x-co in https://github.com/bearsunday/BEAR.QueryRepository/pull/136
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.9.8...1.10.0
(Previous releases not documented yet)
(Previous releases not documented yet)
Fixed issue where tests were failing due to bear/fastly-module version by @jingu in https://github.com/bearsunday/BEAR.QueryRepository/pull/135
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.9.7...1.9.8
Added feature to purge the fastly cache by @jingu in https://github.com/bearsunday/BEAR.QueryRepository/pull/125
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.9.6...1.9.7
Bump dependency version by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/132
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.9.5...1.9.6
Change RedisAdapter by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/131
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.9.4...1.9.5
Add IS_REPEATABLE by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/130
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.9.3...1.9.4
Fix deprecated annotation autoload by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/129
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.9.2...1.9.3
Update license copyright year(s) by @github-actions in https://github.com/bearsunday/BEAR.QueryRepository/pull/126
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.9.1...1.9.2
Inject through interface by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/124
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.9.0...1.9.1
PHP 7.4 reached EOL yesterday (28 Nov 2022) and this package will also support PHP 8.0 and above. https://www.php.net/eol.php
PHP 7.4 reached EOL yesterday (28 Nov 2022) and this package will also support PHP 8.0 and above. https://www.php.net/eol.php
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.8.6...1.9.0
Avoid put cache when resource returns error code by @jingu in https://github.com/bearsunday/BEAR.QueryRepository/pull/115
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.8.5...1.8.6
PHP 8.2 Support by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/111
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.8.4...1.8.5
Support doctrine/cache v1 by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/110
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.8.3...1.8.4
This latest release for PHP 7.3.
This latest release for PHP 7.3.
It was made so that composer updates can be done on PHP 7.3 projects without problems. This release confirms that as of November 2024, it is possible to run composer create-projcet bear/skeleton on PHP 7.3 to install new projects.
This release is not intended to be practical, but to demonstrate the availability of BEAR.Sunday.
PHP 8.1 support by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/106
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.8.2...1.8.3
Fix QueryRepository serializable test by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/104
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.8.1...1.8.2
Bind etag cache pool by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/pull/103
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.8.0...1.8.1
Fix PHP 8.1 deprecation warnings with unserializable symfony cache component support by @koriym in https://github.com/bearsunday/BEAR.QueryRepository/…
Full Changelog: https://github.com/bearsunday/BEAR.QueryRepository/compare/1.7.1...1.8.0
<img src="https://user-images.githubusercontent.com/529021/140614518-c61e9db6-4c5c-4293-af33-1bdecb41739e.png" width="200">
Keep shared cache engine (memchached/redis) module compatible #93
There is no change in the user code regarding the configuration of the shared cache engine.
Change the cache engine from doctrine/cache to PSR6 (symfony/cache) #92
Remove CommandIneterceptor binding with POST method #90
Fix bug
Remove annotation binding (support php8) #89
Fix bug
Nothing published for this version
Make it works without annotation reader
Thanks for reporting the issue @amashigeseiji!
Thanks for reporting the issue @amashigeseiji!
FIx #74 (Save storage without ResouceObject class)
Thanks, @jingu!
Fix the error reporting issue #73
Expiry class accepts "$never" second (default 1 year) #71
Expiry class accepts "$never" second (default 1 year) #71Thanks, @momospnr @jingu
Thanks, @kalibora
Nothing published for this version
Nothing published for this version
Nothing published for this version
@Purge / @Reflesh is valid when no error (400/500) occured #63
@Purge / @Reflesh is valid when no error (400/500) occured #63Thanks, @jingu !
Fix the minor bug regarding@Cacheble with no @HttpCache. https://github.com/bearsunday/BEAR.QueryRepository/commit/cabfbb04a5f0e3efe6ef0af1c26fbbde83c
@Cacheble with no @HttpCache. https://github.com/bearsunday/BEAR.QueryRepository/commit/cabfbb04a5f0e3efe6ef0af1c26fbbde83cac483Add HttpCacheInterface::transfer() interceptor #54, #57
HttpCacheInterface and use BEAR.Sunda's HttpCacheInterface. #55Vary header #53expiry_at attribute in Cacheable annotation #52max-age attribute in Cache-Control header #51Nothing published for this version
[FIX] serialization for resource request
Save resource request as resource object in QueryRepository
[fix] enable multiple @Purge or @Fresh in single method
Save resource URI to repository #48
[update] faster annotation reader #46
The APC cache was name-spaced, Therefore you can run multiple BEAR.Sunday app at same web server.
StorageApcModule #45The APC cache was name-spaced, Therefore you can run multiple BEAR.Sunday app at same web server.
<?php
namespace BEAR\HelloWorld\Module;
use BEAR\QueryRepository\StorageApcModule;
use BEAR\Package\Context\ProdModule as PackageProdModule;
use Ray\Di\AbstractModule;
use Ray\Di\Scope;
class ProdModule extends AbstractModule
{
/**
* {@inheritdoc}
*/
protected function configure()
{
// override APC-only cache for @Cacheable cahe (the default is APC+File chain cache in prod context.)
$this->install(new StorageApcModule);
// Install default ProdModule
$this->install(new PackageProdModule);
}
}
Thanks Mugima-san for the feedback !
One column per quarter.