Skip to content

Audit fixes (2026-09) - #3

Merged
luthermonson merged 1 commit into
mainfrom
fix/audit-2026-09
Sep 11, 2026
Merged

luthermonson merged 1 commit into
mainfrom
fix/audit-2026-09

Conversation

@luthermonson

Copy link
Copy Markdown
Contributor

Audited KV/cache fixes for predis-connection. Adopts ephpm_kv_setnx where it was missing (atomic add()/NX/locks), stops reporting OOM writes as success, fixes the incrBy false->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).

…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).
@luthermonson
luthermonson merged commit 57054fc into main Sep 11, 2026
3 checks passed
@luthermonson
luthermonson deleted the fix/audit-2026-09 branch September 11, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant