Repository navigation
Audit fixes (2026-09) - #3
Merged
Merged
Conversation
…inel
- SETNX and SET ... NX now route to ephpm_kv_setnx(): SETNX returns 1/0,
SET ... NX returns OK/nil. XX/GET/KEEPTTL/EXAT/PXAT stay unsupported.
- Plain SET/SETEX/PSETEX now raise Predis\Response\ServerException
('OOM ...', error type OOM) when the SAPI refuses the write, instead of
returning a false OK/null — matching what the RESP wire surfaces.
- SapiKvOps::incrBy no longer collapses the false "not an integer" sentinel
to 0 via (int) false; it throws RuntimeException, matching InMemoryKvOps
and the KvOpsInterface contract.
- InMemoryKvOps gains setnx() and a simulateOom() test hook.
- Tests added for NX wiring, SETNX, OOM throws, and the incrBy sentinel
(new SapiKvOpsTest driven by global ephpm_kv_* stubs).
- README: honest supported-commands/modifier tables, OOM+NX semantics,
Predis 3 incompatibility note (NodeConnectionInterface drift), version
bump to v0.10.2. Predis constraint left at ^2.2 (Predis 3 diverges).
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 predis-connection. 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).