π¨ Breaking Changes
This release contains breaking changes to the ResponseBatchInterface:
Method Signature Changes
filter()now returnsstaticinstead ofarrayfor better fluent interface supportgetSuccessfulResults()renamed togetResponses()and returnsResponseInterface[]getFailedResults()renamed togetExceptions()and returnsClientExceptionInterface[]
Migration Guide
Before (v2.x):
$batch = $client->batch($requests);
$results = $batch->getSuccessfulResults(); // BatchItemInterface[]
$failures = $batch->getFailedResults(); // BatchItemInterface[]
$filtered = $batch->filter($predicate); // BatchItemInterface[]After (v3.x):
$batch = $client->batch($requests);
$responses = $batch->getResponses(); // ResponseInterface[]
$exceptions = $batch->getExceptions(); // ClientExceptionInterface[]
$filtered = $batch->filter($predicate); // static (same type as $batch)Benefits
- β Better type safety with specific return types
- β
More semantic method names (
getResponsesvsgetSuccessfulResults) - β
Fluent interface support with
filter()returningstatic - β Direct access to responses and exceptions without wrapping
π€ Generated with Claude Code