-
Notifications
You must be signed in to change notification settings - Fork 0
v4.0.0 - Complete Library Redesign #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Consistent method naming with verb-first pattern (get*, create*, update*, delete*) - RFC 5849 compliant OAuth 1.0a implementation with secure authentication - Production-grade testing with comprehensive edge cases and security hardening
- Split test suites: unit/integration (CI uses only fast units) - Make all classes consistently final - Fix PHPDoc compatibility and deprecations
- Replace array parameters with positional parameters for all methods - Rename all methods to consistent verb-first pattern (getArtist, listReleases, etc.) - Rename classes: DiscogsApiClient -> DiscogsClient, ClientFactory -> DiscogsClientFactory - Add ConfigCache for performance optimization - Enhance authentication with proper OAuth 1.0a and personal token support - Update all tests and documentation for new API design
…e UPGRADE.md for consistent emoji usage
…md for detailed instructions
- Remove redundant test-unit script from composer.json - Remove flaky timing assertion from rate limiting test to prevent random failures on slower systems
- Update artist example from The Beatles to Billie Eilish - Streamline integration test execution in CI to use composer scripts - Improve documentation for running integration tests locally
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR represents a complete architectural redesign (v4.0.0) of the PHP Discogs API client library with comprehensive breaking changes. The redesign focuses on developer experience, type safety, and a minimal code footprint (~750 lines, 2 core classes). The PR removes old test fixtures and introduces a comprehensive unit test suite with 2000+ lines of tests covering security, edge cases, and production scenarios.
Key Changes:
- Complete rewrite with breaking API changes (class/method renaming, clean parameter API)
- Comprehensive unit test suite with 100% coverage goal
- Enhanced security with RFC 5849 OAuth 1.0a implementation
- Removal of legacy test fixtures in favor of mock-based testing
Reviewed changes
Copilot reviewed 51 out of 52 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/UnitTestCase.php | Base test class with common helper methods for assertions |
| tests/Unit/SecurityTest.php | Security-focused tests for ReDoS protection and cryptographic nonce generation |
| tests/Unit/ProductionRealisticTest.php | Production edge case tests (502/503 errors, timeouts, SSL issues) |
| tests/Unit/OAuthHelperTest.php | OAuth helper tests covering request/access tokens and error handling |
| tests/Unit/HeaderSecurityTest.php | Tests preventing authorization header override attacks |
| tests/Unit/DiscogsClientTest.php | Comprehensive client tests with 1900+ lines covering all methods and edge cases |
| tests/Unit/DiscogsClientFactoryTest.php | Factory pattern tests for client creation with various auth methods |
| tests/fixtures/*.json | Deleted old fixture files, replaced with mock-based testing approach |
| .gitignore | Added coverage.xml and *.clover to ignore list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
v4.0.0 - Complete Library Redesign with Clean Parameter API
This release represents a fundamental architectural overhaul, prioritizing developer experience, type safety, and minimal code footprint.
Breaking Changes
Migration Required
All method calls must be updated. See CHANGELOG.md and UPGRADE.md for detailed migration guide.
Features
Documentation