v3.0.0 - Complete HTTP Batch Guzzle Implementation
π HTTP Batch Guzzle v3.0.0
π¨ Breaking Changes
This major release implements the new http-batch-contract v3.0 with significant API improvements:
Method Signature Changes
filter()now returnsstaticinstead ofarrayfor fluent interface supportgetSuccessfulResults()βgetResponses()returningResponseInterface[]getFailedResults()βgetExceptions()returningClientExceptionInterface[]
Migration Guide
Before (v1.x):
$batch = $client->sendRequestBatch($requests);
$results = $batch->getSuccessfulResults(); // BatchItemInterface[]
$failures = $batch->getFailedResults(); // BatchItemInterface[]
$filtered = $batch->filter($predicate); // BatchItemInterface[]After (v3.x):
$batch = $client->sendRequestBatch($requests);
$responses = $batch->getResponses(); // ResponseInterface[]
$exceptions = $batch->getExceptions(); // ClientExceptionInterface[]
$filtered = $batch->filter($predicate); // static (same type as $batch)β¨ Quality Improvements
Test Coverage Excellence
- 31 comprehensive tests with 71 assertions
- 94.19% line coverage and 90.91% method coverage
- Complete unit tests for
BatchItemandResponseBatchclasses - Eliminated risky tests with proper
#[UsesClass]attributes
Code Quality Enhancements
- Improved type safety with
assert()for better error handling - Fixed array indexing issues in filtered results
- Modern PHP practices and cleaner code structure
- Enhanced error messages and exception handling
Dependencies
- Requires:
friendsofouro/http-batch-contract: ^3.0 - Provides:
friendsofouro/http-batch-implementation: ^3.0 - Compatible with: PHP 8.4+, Guzzle 7.10+
π Migration Required
This release contains breaking changes. Please update your code to use the new method names and return types. See the migration guide above for details.
For detailed contract changes, see: http-batch-contract v3.0.0
π€ Generated with Claude Code