Yar: add protocol chapter, PIE installation and richer examples - #5814
Closed
laruence wants to merge 1 commit into
Closed
Yar: add protocol chapter, PIE installation and richer examples#5814laruence wants to merge 1 commit into
laruence wants to merge 1 commit into
Conversation
…ations - add a "The Yar Protocol" chapter describing the 82-byte binary header and body layout, with a plain-PHP client example, and place it before the installation chapter - document the YAR_ERR_FORBIDDEN constant (registered by the extension for failed authentication) - add examples to Yar_Client::call and explain the __call magic-method relationship - Yar_Concurrent_Client: explain the parallel-call design (independent calls only, total waiting time bounded by the slowest call), why only HTTP(S) is supported, the callinfo array layout, and the fallbacks when no callback/error_callback is set - use a meaningful example URI (http://api.example.com/operator.php) instead of placeholder hostnames
laruence
force-pushed
the
yar-docs-2026-08-29
branch
from
August 29, 2026 14:37
cffe21c to
ac95ae5
Compare
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.
Summary
Follow-up on the Yar documentation rework (#5804): this makes the manual cover the wire protocol, offer the modern PIE installation path, and ship substantially more complete examples and usage notes.
Changes
1. A new "The Yar Protocol" chapter (placed before the installation chapter)
YAR_ERR_FORBIDDENconstant, which the extension registers for failed server authentication but was missing from the manual2. PIE installation
pie install laruence/yar, including the--enable-msgpackvariant) and building from source3. More complete examples and usage notes
Yar_Client::call()previously had no examples section at all; it now shows the magic-method form, the explicit form, and whencall()itself is neededYar_Concurrent_Clientnow explains the design (batch several independent calls; the total waiting time drops to the slowest single call), why only HTTP(S) is supported (calls are dispatched through curl's multi-handle interface, which the socket transport does not implement), thecallinfoarray layout, and what happens when no callback/error callback is set (return value printed / PHP warning raised)http://api.example.com/operator.phpinstead of placeholder hostnamesValidation
docbook-cson the fullreference/yar/directory: 31 files scanned, no violationsdoc-base/configure.php --with-partial=book.yarvalidates cleanlyphd(PHP chunked XHTML package) without errors