Skip to content

v2.0.0-beta1

Pre-release
Pre-release
Compare
Choose a tag to compare
@bojanz bojanz released this 18 Apr 20:03

Major changes

  • Dropped PHP 7 support, started using PHP 8 language features.
  • Added address line 3 to the address data model.
  • Subdivisions are now keyed by ISO code when one is available. See the "Updating data" section for more information.
  • Address formats and subdivisions are no longer auto-generated from Google's dataset, allowing us to accept community changes and bug reports.
  • Updated address formats / subdivisions for 20 countries:
    • The "additional name" field is now visible for countries that use patronymics.
    • Defined subdivisions for Costa Rica (CR), Estonia (EE) and Zimbabwe (ZW).
    • Rebuilt subdivisions for Bahamas (BS) and Philippines (PH).
    • Additional localities defined for South Korea (KR) and Chile (CL).
  • Country list (and translations) updated to CLDR v43.

Updating data

The library now ships with a SubdivisionUpdater.

It can be used in two ways:
a) Call SubdivisionUpdater::updateValue($countryCode, $value) to update an address's administrativeArea in a postLoad() event or equivalent place.

b) Use SubdivisionUpdater::getUpdateMap() to get the full list of updates, and use it to generate update queries for your data.