Repository navigation
Audit fixes (2026-09) - #3
Merged
Merged
Conversation
…cast Implement Illuminate\Contracts\Cache\LockProvider on EphpmStore, backed by a new ephpm_kv_setnx-based EphpmLock modelled on Laravel's MemcachedLock. Acquisition is atomic (setnx under the KV per-shard lock); release is best-effort because the SAPI has no compare-and-delete/CAS — documented in code and README, with TTL as the crashed-owner backstop. Register the cache Repository through the cache manager ($app['cache']->repository($store)) instead of `new Repository($store)`, so the event dispatcher is attached and CacheHit/CacheMissed/KeyWritten events fire. Fix the shared incrBy bug: SapiKvOps cast `(int) ephpm_kv_incr_by(...)`, turning the "not an integer" false into 0 and masking the error the KvOpsInterface contract documents as throwing. Capture the raw result and throw on false. Add setnx to KvOpsInterface with SapiKvOps + InMemoryKvOps implementations, and tests for the lock lifecycle, setnx, cache-event dispatch, and the increment throw path. Bump README current-release references to v0.10.2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audited KV/cache fixes for cache-laravel. Adopts
ephpm_kv_setnxwhere it was missing (atomicadd()/NX/locks), stops reporting OOM writes as success, fixes theincrByfalse->0 cast across the copied KvOps, and refreshes docs/CI. Every behavioral change has a test (agent ran the suite green in WSL PHP 8.5).