Releases: stefanzweifel/php-swiss-cantons
Releases 路 stefanzweifel/php-swiss-cantons
v5.0.2
v5.0.1
v5.0.0
Breaking Changes
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
Added
Changed
- Replace Psalm with Phpstan (#45)
v4.4.0
v4.3.0
4.2.0
4.1.0
Changed
- Update dataset b7ce524b0978494fd0316fc2b1050cd1170dddbd
- Sort dataset by zipcode and name 3328e3db702efec94aec006266be7224d7e33598
4.0.0
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.
Changed
- Update Zipcodes Dataset to 2021 #38
3.1.0
3.0.0
Changed
- Update README with better examples on how to use the package
- 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 - Replace most of the internal doc blocks with Type Hints, Return Types and Property Types
- Internally, data sets are now always cast to arrays instead of objects
- Switch from Travis to GitHub Actions for testing
Removed
- Drop support for PHP 7.2
- Drop support for PHP 7.3
- Remove Code documentation folder
/docs