Skip to content

Releases: pralhadstha/Zipcoder-php

v1.0.1

05 Apr 11:51
v1.0.1
28b252e

Choose a tag to compare

Zipcoder PHP v1.0.1

Maintenance release with CI/CD setup and developer experience improvements.

What's Changed

  • GitHub Actions CI: Added test workflow running PHPUnit, PHPStan, and Pint across PHP 8.2, 8.3, and 8.4
  • Tests badge: Added workflow status badge to README
  • Composer scripts: Added test, analyse, format, and check-style script shortcuts
  • README updated

No Breaking Changes

No code changes — all 67 tests and 168 assertions continue to pass. PHPStan level 9 clean.

Full Changelog: v1.0.0...v1.0.1

v1.0.0 - Initial Release

05 Apr 11:48
v1.0.0
36280b1

Choose a tag to compare

Zipcoder PHP v1.0.0

The first stable release of Zipcoder PHP, a production-ready library to convert postal codes and zip codes into structured addresses using multiple geocoding APIs with automatic fallback.

Highlights

  • 5 built-in postal code providers — GeoNames, Zippopotamus, Zipcodestack, Zipcodebase, and JpPostalCode
  • Automatic fallback — Chain of Responsibility pattern tries providers in order until one succeeds
  • PSR-16 caching — decorator wraps any provider to cache results and reduce API calls
  • Zero-dependency HTTP client — built-in PSR-18 curl client, or bring your own (Guzzle, Symfony, etc.)
  • Normalized results — every provider returns the same Address structure regardless of the underlying API
  • 100+ countries — worldwide postal code coverage with Japan-specific multilingual support (EN/JA/Kana)
  • Extensible — implement the Provider interface to add any postal code API
  • PHP 8.2+ — readonly classes, constructor promotion, strict types throughout
  • PHPStan level 9 — fully statically analyzed with zero errors
  • 67 unit tests, 168 assertions — comprehensive test coverage with mocked HTTP (no real API calls)

Supported Providers

Provider Countries Auth Required Free Tier
GeoNames 100+ Free username 10,000/day
Zippopotamus ~60 None Unlimited
Zipcodestack 210+ API key 300/month
Zipcodebase 100+ API key 10,000/month
JpPostalCode Japan None Unlimited

Installation

composer require pralhadstha/zipcoder-php

For production with Guzzle:

composer require pralhadstha/zipcoder-php guzzlehttp/guzzle

Laravel Integration

For Laravel projects, use the companion package with auto-discovery, Facade, publishable config, and built-in caching:

composer require pralhadstha/zipcoder-laravel

See pralhadstha/zipcoder-laravel for full documentation.

Links