v0.6.0
A minor rather than a patch: a pair of targets the unifier used to accept is
now refused. Composer's caret treats that as breaking on 0.x, and it is —
though what those targets produced was a double that logged an argument value
neither contract declares.
- Conflicting parameter defaults across unified contracts rejected the
target instead of quietly becomingnull.Understudy::for(A::class, B::class)where both declaretag(string $name, int $weight = 5)and
= 7rendered= nulland widened the type toint|nullto make that
legal — so an omitted argument was logged as a value neither contract
declares, andverify(fn () => $double->tag('alpha', 5))did not match the
callAwould have made. That is the failurerenderDefault()'s own
docblock says the unifier refuses; now it does, the way the by-reference
conflict beside it already did. A default declared in one target and absent
or required in another is not a conflict and keeps working. Fixes #91. - A stub armed with
-0.0was invisible to a call made with0.0. The
dispatch index keyed a literal first argument byserialize(), which is not
isomorphic to===:-0.0 === 0.0is true andd:-0;is notd:0;. The
index is only consulted from the second expectation on a method, so an
unrelated second stub changed the first one's behaviour. Fixes #92. DispatchIndexPropertyTestgains a second property for identity, over
literals of every scalar type — the existing one drawsintonly, so no
float, let alone a signed zero, was ever reached. The pairs a key can get
wrong in either direction are namedExamples()rather than left to the
random phase: both signed zeros,0against0.0and'0',''against
nullandfalse,1againsttrue, andNAN, which matches no call
including itself.- The parity matrix gained
ForeignCapture: somebody else's zero-argument
capture()written inside a specification. Both analysers must report it,
and one of them did not —understudy-psalmdecided a capture by the method
name and an empty argument list, because its issue hook is handed no resolved
receiver, and swallowed the diagnostic. Fixed in that package (#18) and
pinned here, which is what the matrix exists for. perf/README.mdrecords that the figures were re-verified for the v0.5.0
tag and left unchanged: three runs a side at the commit they were taken from
and on the release candidate, with our movement inside the competitors'.