Repository navigation
π Digistore24 API Client v2.0.0
Major Release - Complete rewrite with PHP 8.4 property hooks, modern architecture, and extensive quality improvements.
π Highlights
PHP 8.4 Property Hooks
Automatic validation on property assignment - no more boilerplate constructors:
$buyer = new BuyerData();
$buyer->email = 'test@example.com'; // β
Auto-validated
$buyer->country = 'de'; // β
Auto-uppercased to 'DE'Cleaner API Calls
Methods with optional parameters no longer require explicit Request objects:
// v1.x - Always needed Request object
$products = $ds24->products->list(new ListProductsRequest());
// v2.0 - Much cleaner!
$products = $ds24->products->list();Enterprise-Grade Quality
- β 1,130 passing unit tests (100% success rate)
- β PHPStan Level 9 (maximum strictness) - 0 errors
- β 98% code coverage (lines), 99% functions, 100% classes
- β 85%+ mutation score (test quality validation)
- β PSR-12 compliant (0 code style violations)
Complete API Coverage
- β 122 endpoints fully implemented
- β 12 resource categories (Affiliates, Products, Purchases, etc.)
- β Comprehensive documentation for every endpoint
π₯ Breaking Changes
1. Namespace Change
// OLD
use GoSuccess\Digistore24\Digistore24;
// NEW
use GoSuccess\Digistore24\Api\Digistore24;2. Constructor Signature
// OLD
$ds24 = new Digistore24(apiKey: 'YOUR-KEY');
// NEW
$config = new Configuration(apiKey: 'YOUR-KEY');
$ds24 = new Digistore24($config);3. PHP Version Requirement
- Minimum PHP 8.4.0 (required for property hooks)
π Full migration guide: See MIGRATION.md
β¨ What's New
Architecture & Quality
- ποΈ Resource-based architecture with clean separation of concerns
- π― Type-safe - Full type hints, enums, and strict typing throughout
- π Automatic retry - Built-in exponential backoff for failed requests
- π¦ Rate limiting - Graceful handling of API rate limits
- π Fully documented - Comprehensive PHPDoc with examples
Developer Experience
- β GitHub Actions CI/CD - Automated testing, static analysis, code style checks
- β PHPStan Level 9 - Maximum type safety with baseline tracking
- β PHP CS Fixer - PSR-12 + PHP 8.4 rules enforced
- β Infection - Mutation testing for test quality validation
- β Dependabot - Automated dependency updates
Documentation
- π 122 endpoint docs organized in 29 categories
- π Migration guide with find-replace instructions
- π§ͺ Testing guide with coverage setup
- π οΈ Developer setup with IDE configuration
- π Changelog with complete version history
- π Security policy with vulnerability reporting
New Features
- π Optional Request parameters - 39+ methods across 27 Resources
- π¨ 15 typed DTOs with property hooks (BuyerData, PaymentPlanData, etc.)
- π§ Configuration object - Centralized config with validation
- β‘ Lazy loading - Resources initialized on-demand
π¦ Installation
# Fresh install
composer require gosuccess/digistore24-api
# Upgrade from v1.x
composer remove gosuccess/php-ds24-api-wrapper
composer require gosuccess/digistore24-apiπ― Quick Start
use GoSuccess\Digistore24\Api\Digistore24;
use GoSuccess\Digistore24\Api\Client\Configuration;
// Initialize
$config = new Configuration(apiKey: 'YOUR-API-KEY');
$ds24 = new Digistore24($config);
// Simple calls (no Request object needed)
$products = $ds24->products->list();
$userInfo = $ds24->users->getInfo();
$ping = $ds24->monitoring->ping();
// Advanced calls (with Request object for filters)
$purchases = $ds24->purchases->list(
new ListPurchasesRequest(
fromDate: new DateTime('-7 days'),
toDate: new DateTime('now')
)
);π Quality Metrics
| Metric | Value | Status |
|---|---|---|
| Unit Tests | 1,130 passing | β 100% |
| Assertions | 2,227 | β |
| Code Coverage | Lines ~98%, Functions ~99% | β |
| Mutation Score | 85%+ MSI | β |
| PHPStan | Level 9 (max) | β 0 errors |
| Code Style | PSR-12 | β 0 violations |
| Endpoints | 122 implemented | β 100% |
π§ Infrastructure
GitHub Actions Workflows
- β Tests - PHPUnit with coverage reporting
- β Static Analysis - PHPStan Level 9
- β Code Style - PHP CS Fixer with PSR-12
Composer Scripts
composer test # Run all tests
composer test:coverage # Coverage report
composer analyse # PHPStan analysis
composer cs:check # Code style check
composer cs:fix # Auto-fix code style
composer check # All quality checksDependency Management
- π€ Dependabot - Weekly Composer updates, monthly GitHub Actions
- π¦ Automated PRs - Security and version updates
π οΈ API Resources
| Resource | Endpoints | Documentation |
|---|---|---|
| Affiliates | 8 | Commission management |
| Billing | 3 | Invoicing & payments |
| Buyers | 8 | Customer information |
| Buy URLs | 3 | Order form management |
| Countries | 2 | Country & currency data |
| IPNs | 3 | Webhook management |
| Monitoring | 1 | Health checks |
| Products | 59 | Product management |
| Purchases | 24 | Order information |
| Rebilling | 4 | Subscription management |
| Users | 3 | Authentication & settings |
| Vouchers | 6 | Discount codes |
Total: 122 endpoints across 12 resource categories
π Documentation
- π README.md - Complete usage guide
- π MIGRATION.md - v1.x β v2.0 upgrade guide
- π§ͺ TESTING.md - Test setup & coverage
- π οΈ DEVELOPER_SETUP.md - IDE configuration
- π CHANGELOG.md - Version history
- π€ CONTRIBUTING.md - Contribution guidelines
- π SECURITY.md - Security policy
π Thank You
Special thanks to all contributors who helped make v2.0 possible! This release represents months of refactoring, testing, and quality improvements.
π Found a Bug?
Report issues: https://github.com/GoSuccessHQ/digistore24-api/issues
π License
MIT License - see LICENSE
Full Changelog: https://github.com/GoSuccessHQ/digistore24-api/blob/main/docs/CHANGELOG.md