Releases
v2.0.0
Release v2.0.0 - PostcodeFormatter, FormatterRegistry improvements, PHPStan Level 10 + Strict Rules integration, tests, and bug fixes
Compare
Sorry, something went wrong.
No results found
Added
Input normalization for postal codes (handles hyphens, spaces).
FormatterRegistry supports overwriting existing formatters (withAdded()).
Comprehensive integration tests for postcode formatting, including edge cases.
PHPStan Level 10 + Strict Rules configuration for static analysis.
Changed
BC BREAK : FormatterRegistry::get() now throws UnknownCountryException instead of returning null.
Most formatters refactored to use PostcodeValidationTrait.
Improved exception messages and strict preg_match validation.
Fixed
Missing imports for functions (substr, str_starts_with, preg_match, etc.) in several formatters.
Correct handling of UnknownCountryException during lookups.
Tests
Full PHPUnit test suite for PostcodeFormatter and FormatterRegistry.
Integration tests for normalization and invalid input handling.
Integrated PHPStan static analysis with strict rules (Level 10)
You can’t perform that action at this time.