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.
TBD
v5.0.2 - 2024-05-27
- Add NotUniqueCantonException (#50)
v5.0.1 - 2024-05-26
- Add Github Actions Workflow to update City dataset automatically (#48)
- Ignore Versoix VD in dataset (#49)
v5.0.0 - 2024-05-26
Public
- The signature of
getByZipcode()
changed. The method now returns an array of possible Cantons instead of the first Canton that matched. (Some zipcodes can belong to multiple cantons. For example 1290) - A new
getByZipcodeAndCity()
method has been added that accepts a zipcode and optionally a city name to drill down the search further.
Internal
ZipcodeSearch
-class has been renamed toCitySearch
zipcodes.json
has been renamed tocities.json
- Replace Psalm with Phpstan (#45)
v4.4.0 - 2023-10-16
- Add Support for PHP 8.3 (#44)
v4.3.0 - 2023-04-16
4.2.0 - 2022-10-29
- Support for PHP 8.2 (#40)
4.1.0 - 2021-10-24
- Update dataset b7ce524b0978494fd0316fc2b1050cd1170dddbd
- Sort dataset by zipcode and name 3328e3db702efec94aec006266be7224d7e33598
4.0.0 - 2021-04-25
Note: The public API of the package didn't change, but the zipcodes dataset now uses data from the Swiss Post (instead of the Swiss cadastral system website). The detection of the canton for a zipcode still works the same as before.
If you've been using zipcodes.json
directly, please see #38 for details.
- Update Zipcodes Dataset to 2021 #38
3.1.0 - 2020-11-01
- Add Support for PHP 8 #36
3.0.0 - 2020-02-22
- Replace most of the internal doc blocks with Type Hints, Return Type and Property Types
- Internally, data sets are now always cast to arrays instead of objects
- Update README with better examples on how to use the package
- Switch from Travis to GitHub Actions for testing
- Passing an invalid language to
Canton@setLanguage
now throwsInvalidLanguageException
- If a Canton can't be found either by abbreviation, name or zipcode
CantonException
is thrown
- Drop support for PHP 7.2
- Drop support for PHP 7.3
- Remove Code documentation folder
/docs
2.1.0 - 2020-02-19
- Drop support for PHP 7.0
- Drop support for PHP 7.1
- Remove Liechtenstein Zipcodes from Dataset #27, #31
- Remove duplicate zipcode for "Le Locle" #28, #29
- Fix Typo for "Fribourg"
- Fix silly typo (appreviation => abbreviation) which causes breaking changes (#21)
- Add a new
Cantons
class to generate a list of all Swiss Cantons (#18)
- Fix wrong translations (#16)
- Fix an issue where lower case Canton abbreviations throws an error #11
- Fix an issue where Zipcodes passed as a Strings throws an error #12
- Remove
tightenco/collect
as a dependency and switch to good oldarray_filter
- Add
getByZipcode
- Add Changelog
- Update Readme
- Testing Release