Skip to content

Spec 0.4: RSA keys of 2048 bits or more, shutdown tests, proxy deployment docs - #72

Merged
FZambia merged 1 commit into
masterfrom
spec-0-4
Nov 5, 2026
Merged

FZambia merged 1 commit into
masterfrom
spec-0-4

Conversation

@FZambia

@FZambia FZambia commented Nov 5, 2026

Copy link
Copy Markdown
Member

phpcent following spec 0.4 (centrifugal/gocent#27).

  • Key::rsa refuses keys under 2048 bits with InvalidRequestException when the key is made, as Key::ecdsa refuses another curve. fromPem goes through it, so connection, subscription and API tokens and JWKS are all covered. Tested with a 1024-bit key as an OpenSSL key, a PEM string and through fromPem.
  • Shutdown tests from spec section 15, for what PHP has: a call in progress when close() runs still gets its reply, and later calls and batches throw ClosedException; a broadcast being retried stops at its next attempt. Concurrent closes and auto-batching don't apply to phpcent.
  • Fix: when onAttemptError closed the client, broadcastWithRetry threw a bare ClosedException and lost the outcomes of earlier attempts. Now the next attempt fails with ClosedException like any attempt no retry can fix, so each channel keeps its outcome, as in gocent.
  • The proxy docs and README name the ways to keep proxy endpoints internal: a network of their own, a secret header from the proxy's static_headers, TLS.
  • README, CHANGELOG and MIGRATING.md now say spec 0.4. The version stays 7.0.0, unreleased.

composer check passes, and so does the PRO integration suite (PHPCENT_TEST_PRO=1 composer test-integration).

…rity docs

Refuse an RSA key of fewer than 2048 bits when the key is made, with
InvalidRequestException, as an ECDSA key on another curve is: connection,
subscription and API tokens and JWKS all take their keys from Key.

A broadcast being retried when the client closes now fails its next attempt
with ClosedException, so the exception keeps every channel's outcome, instead
of throwing a bare ClosedException after the wait. Test close() during a call,
calls and batches after it, close() called again, and the retry stopping.

Name the ways to keep proxy endpoints reachable by Centrifugo only: a network
of their own, a secret header from the proxy's static_headers, TLS. The docs
now say spec 0.4.
@FZambia
FZambia merged commit a0e9172 into master Nov 5, 2026
13 checks passed
@FZambia
FZambia deleted the spec-0-4 branch November 5, 2026 16:56
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