This patch release adds comprehensive integration tests and Tutorial 16, providing complete documentation and testing for all v0.5.2 features (Python SDK v0.76.0 parity).
Added NewFeaturesIntegrationTest with 6 comprehensive test cases:
- Server-Side Tool Handling: Verifies
server_tool_useblocks are properly recognized and skipped - Authentication Flexibility: Tests custom headers, OAuth2, Bearer tokens
- Stream Resource Cleanup: Validates automatic stream closure via
__destruct() - Binary Streaming: Confirms
postStreamBinary()method availability - Mixed Tool Types: Tests client-side and server-side tools working together
- Error Messages: Validates helpful authentication error messages
Test Results:
✅ 318 tests passing
✅ 890 assertions
✅ 1 test skipped (requires custom auth)A comprehensive 60-minute tutorial covering all new v0.5.2 capabilities:
Topics Covered:
-
Server-Side Tools
- Understanding
server_tool_usevstool_useblocks - No handler function required for server tools
- Automatic handling in tool runners
- Code execution and bash examples
- Understanding
-
Authentication Flexibility
- OAuth2 Bearer token authentication
- Custom
x-api-keyheaders for proxies - Azure AD / Enterprise SSO integration
- API gateway patterns
- Dynamic token refresh
- Environment-based configuration
-
Enhanced Stream Management
- Automatic cleanup via
__destruct() - Idempotent
close()method - Best practices for resource management
- Try-finally patterns
- Automatic cleanup via
-
Binary Request Streaming
postStreamBinary()method usage- Custom Content-Type support
- Advanced binary upload scenarios
Files:
- 📖
tutorials/16-v052-features/README.md- Complete guide (400+ lines) - 💻
tutorials/16-v052-features/v052_features.php- Runnable example
- tutorials/README.md: Added Tutorial 16 to the learning path
- examples/README.md: Enhanced with new example references:
server_side_tools.php- Server-side tool execution guideauthentication_flexibility.php- Flexible auth patterns
tests/Integration/NewFeaturesIntegrationTest.php
tutorials/16-v052-features/README.md
tutorials/16-v052-features/v052_features.phpcomposer.json (version bump)
CHANGELOG.md (v0.5.3 entry)
tutorials/README.md (Tutorial 16 added)
examples/README.md (new examples documented)composer update claude-php/claude-php-sdkcomposer require claude-php/claude-php-sdk:^0.5.3php tutorials/16-v052-features/v052_features.phpcomposer test -- tests/Integration/NewFeaturesIntegrationTest.php# Server-side tools
php examples/server_side_tools.php
# Authentication flexibility
php examples/authentication_flexibility.phpNew to the SDK? Follow the tutorial series:
- Start with Tutorial 0 - Introduction to Agentic AI
- Progress through Tutorials 1-15 for foundational knowledge
- Complete with Tutorial 16 for latest features
Experienced users? Jump directly to:
- Tutorial 16 - Learn v0.5.2 features
- Server-Side Tools Example
- Authentication Patterns
This release documents these previously released features:
✅ Server-Side Tools - Tools executed by Claude's API, not your code
✅ Authentication Flexibility - OAuth2, Bearer tokens, custom headers
✅ Stream Cleanup - Automatic resource management
✅ Binary Streaming - Advanced binary data handling
All tests pass with comprehensive coverage:
# Run all tests
composer test
# Run only integration tests
composer test -- tests/Integration/
# Run unit tests
composer test -- tests/Unit/- Total Tests: 318 (100% passing)
- Total Assertions: 890
- Tutorials: 16 progressive tutorials
- Examples: 82+ comprehensive examples
- Test Coverage: Unit, Integration, and Feature tests
No bug fixes in this release - focused on documentation and testing.
None - this is a fully backward-compatible patch release.
This release achieves complete feature parity with the Python SDK v0.76.0, ensuring PHP developers have access to all the latest Claude API capabilities.
See CHANGELOG.md for complete version history.
- Documentation: README.md
- Tutorial Series: tutorials/README.md
- Examples: examples/README.md
- Python SDK v0.76.0: Release Notes
Previous Release: v0.5.2 - Python SDK v0.76.0 Feature Parity
Repository: claude-php/Claude-PHP-SDK