Repository navigation
Speak the standard SkirRPC protocol - #2
Merged
Merged
Conversation
Endpoints now accept every request form the upstream Skir service accepts:
a JSON object {method, request} answered in readable JSON, and the
colon-separated name:number:format:request form (also as a GET query
string) answered in dense JSON unless the format is readable. Methods are
looked up by number, or by name when the number is empty.
Removes the per-route and configured codecs (SkirCodec, SkirCodecs and the
skir-server.codec setting). Procedures are keyed by method number, so two
methods may share a name; calling an ambiguous name is rejected. Responses
that do not match the response type now fail with skir_invalid_response
(500) instead of skir_invalid_request.
CI checks out same-named sibling branches so cross-repo changes are tested
together.
Feature-branch checkouts otherwise report dev-<branch>, which no version constraint matches. The server now needs runtime 0.2 (ReadableJson), so require ^0.2.
This was referenced Nov 9, 2026
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.
Endpoints registered with
Route::skirRpc()now speak SkirRPC the way the upstream Skir service does. Any Skir client can call them:php-skir/client, or clients generated for TypeScript, Python, Go and the rest.Request forms (see
docs/protocol.md){"method": ..., "request": ...}:methodis a name or a number,requestmay be dense or readable. Answered in readable JSON.name:number:format:request: what upstream clients send. The number wins over the name; an empty number means lookup by name. Answered in dense JSON unless the format isreadable.GET: the colon-separated form as the query string. A bareGET(or?studio) still renders Studio when it's enabled.Breaking (0.2.0)
SkirCodec,SkirCodecs, the built-in codec classes, the third argument toRoute::skirRpc(), and theskir-server.codecconfig key. The wire format is chosen per request.?method=…&request=…GET form is gone.500 skir_invalid_responseinstead of422 skir_invalid_request.nullfor a non-optional struct request decodes to the default struct, like upstream.Test fixtures that relied on the old pass-through
standard JSONcodec now declare real request/response types.CI checks out same-named sibling branches. This PR is tested together with php-skir/runtime#2 and php-skir/client#2. Merge order: runtime#2 → client#2 → this. Then php-skir/.github#1.
Release: the server now requires
php-skir/runtime ^0.2(it usesReadableJson). Tag runtimev0.2.0before tagging client/serverv0.2.0.