Repository navigation
v0.9.0
The three decisions a 1.0 tag would have frozen, settled while they are still
cheap to settle. Two of them narrow the public surface, which is why this is a
minor: roave/backward-compatibility-check reports both, deliberately.
- Changed.
Operation::__construct()is@internal; the class stays
@api.Operationis the compiled read model a contract exposes — nothing
public validates a hand-built one (Contractis built from a document, the
validators are internal), so the constructor was a promise with no product
behind it. The shapes it accepts are the compiler's output, not a checked
input. - Changed.
Contract::MAX_DOCUMENT_BYTESand
Contract::MAX_MESSAGE_BODY_BYTESare gone, replaced by
Limits::DEFAULT_DOCUMENT_BYTES,Limits::DEFAULT_MESSAGE_BODY_BYTESand
Limits::DEFAULT_DOCUMENT_FILES. The values are unchanged. - Added.
Limits— the budgets a caller may set, accepted by
fromArray(),fromJson()andfromFile()as an optional last argument:
documentBytes,messageBodyBytes,documentFiles. A budget below 1
throws\InvalidArgumentException. Previously a response over 1 MiB could
not be validated at all, with no way to raise the ceiling. - Changed.
request.body.too_largeandresponse.body.too_largeare
documented for what they are: a policy refusal — the validator declined to
read that body — rather than a verdict that the message is invalid. A gate
rejecting onisValid()would otherwise reject traffic it never judged. The
codes and the two-stateValidationResultare unchanged; the budget is now
the caller's to raise. - Changed. The
CompiledParametershape declares its variance: read-only
for consumers, and open to new keys in a minor release.allowReservedis
documented as what it is — a hand-off to consumers that render query values,
which cannot derive it from the schema — rather than as an annotation
nobody reads.