Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased¶
Added¶
CharsetProcessorInterface- Service contract for charset processingCharsetProcessor- Service implementation with fluent APICallableAdapterTrait- Common functionality for callable adaptersChainOfResponsibilityTrait- Generic Chain of Responsibility pattern- Transcoder management methods:
registerTranscoder(),unregisterTranscoder(),queueTranscoders(),resetTranscoders() - Detector management methods:
registerDetector(),unregisterDetector(),queueDetectors(),resetDetectors() - Encoding management methods:
addEncodings(),removeEncodings(),getEncodings(),resetEncodings() - Fluent API support - all management methods return
$thisfor method chaining - Support for multiple independent processor instances with different configurations
- Service architecture documentation
- Example file demonstrating service usage
Changed¶
- Refactored code to use traits for better maintainability and DRY principles
- Extracted common functionality from
CallableDetectorandCallableTranscoderintoCallableAdapterTrait - Extracted common Chain of Responsibility logic from
DetectorChainandTranscoderChainintoChainOfResponsibilityTrait - Moved traits to dedicated
Traits/directory - Reduced code duplication by ~80 lines across 4 classes
- Improved type safety with generic trait annotations (
@template T) - Refactored
CharsetHelperto act as a static facade delegating toCharsetProcessor - All business logic moved from
CharsetHelpertoCharsetProcessorservice CharsetHelpernow uses lazy initialization for the processor instance- 100% backward compatible
1.0.0 - 2026-01-20¶
Added¶
- Initial release of CharsetHelper
- Chain of Responsibility pattern for extensible transcoding
- Multiple fallback strategies (UConverter → iconv → mbstring)
- Automatic encoding detection
- Double-encoding repair functionality
- Recursive conversion for arrays and objects
- Safe JSON encoding/decoding
- Custom transcoder and detector registration
- Comprehensive test suite with 90%+ coverage
- Performance benchmarks
- Full documentation