Repository navigation
v0.10.0
-
Changed. Matching indexes routes by method, segment count and first
literal segment instead of scanning every operation and every one of its
servers on each request. On a thousand-operation document a validated request
went from 0.83 ms to 0.006 ms, and the cost no longer grows with the
document. Selection is unchanged by construction: each key is a property
matchPath()checks before anything else, and candidates are ordered by a
comparator that ends on the unique operation key, so the winner never
depended on the order they were collected in. -
Added. Two examples:
gate-a-request.php(the shape a PSR-15 middleware
takes, over a multi-file document) andbudgets.php(Limits, and why
*.body.too_largeis a refusal to read rather than a verdict). -
Documentation. Three divergences from the specification are now written
down rather than merely true: a percent-encoded delimiter inside a
pipeDelimited/spaceDelimitedvalue is folded into the delimiter, a Header
Object carryingname/inis ignored rather than refused, andexample
withexamplesare both kept instead of being refused as mutually exclusive.
No behaviour changed: the first agrees with how a PHP application reads the
same query, and changing it would break that agreement to gain agreement with
the text. -
Fixed. A YAML document under a kilobyte could exhaust memory and die with
a fatal error rather than anInvalidContract. Anchors and aliases expand
inside the parser, before any budget measures anything, and the byte budget
measures the file; the reference resolver's own budget counts only the nodes
it descends into, and it rightly does not descend into data — which is where
an alias is just as welcome. Nine levels of anchors in anenumturned 772
bytes into 387 million nodes. Documents are now measured by what they expand
into, at every entry point and shared across a multi-file graph. -
Added.
Limits::$documentNodes(default 5 000 000, constant
Limits::DEFAULT_DOCUMENT_NODES) — the budget above. It sits above what any
document withindocumentBytescan hold, so it refuses amplification without
refusing size. Counting stops at the budget, so an oversized document costs
the budget rather than its own size. -
Changed. The message-reading trait joined the mutation gate's coverage
map: it was in no#[Covers], and so produced no mutants at all — the body
reading loop, its byte-budget comparison included, was outside the gate. The
package's ownAGENTS.mdnames that as the symptom.