Skip to content

Commit

Permalink
3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
inxilpro committed Feb 18, 2022
1 parent 6c218cd commit c15043d
Showing 1 changed file with 50 additions and 45 deletions.
95 changes: 50 additions & 45 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,34 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [3.1.0] - 2022-02-18

### Changed

- Added support for PHP 8 and Laravel 9
- Added support for PHP 8 and Laravel 9

### Added

- Add 'orFail' variants of country and administrative area methods
- Added `Macroable` to entities
- Add 'orFail' variants of country and administrative area methods
- Added `Macroable` to entities

## [3.0.0]

### Changed

- Dropped support for older PHP and Laravel versions
- Switched to PHP 7.4 syntax (more usage of type hints)
- Switched to GitHub actions for CI
- Implemented Get a Changelog standard
- Dropped support for older PHP and Laravel versions
- Switched to PHP 7.4 syntax (more usage of type hints)
- Switched to GitHub actions for CI
- Implemented Get a Changelog standard

### Added

- Added support for accessing values as attributes (i.e. `$country->country_code` as well as `$country->getCountryCode()`)
- Added additional tests
- Added support for accessing values as attributes (i.e. `$country->country_code` as well as `$country->getCountryCode()`)
- Added additional tests

### Fixed

- Updated the collection methods to support Laravel's new `pop($count)` method signature
- Updated the collection methods to support Laravel's new `pop($count)` method signature

## 2.2.1 and before

Expand All @@ -42,47 +44,50 @@ release notes below:

This release adds Laravel 7 support and also is more permissive in its validators:

- If we don't have a known list of administrative areas for a country, we just allow any value
- If a country does not require an administrative area, we allow an empty string
- If a country does not require a postal code, we allow an empty string
- If we don't have a known list of administrative areas for a country, we just allow any value
- If a country does not require an administrative area, we allow an empty string
- If a country does not require a postal code, we allow an empty string

(The 2.0.0 release had a bug that failed to allow admin areas when we don't have data.)

### 1.0.0

This is the first stable release, with lots of breaking changes since 0.5.*

- Minimum supported Laravel version is now `5.7` and the minimum supported PHP version is now `7.1.3`
- `Galahad\LaravelAddressing\ServiceProvider` has been moved to `Galahad\LaravelAddressing\Support\AddressingServiceProvider`, so if you were manually registering the service provider, please update
your `app.php` config file.
- `Galahad\LaravelAddressing\Facades\Addressing` has been moved to `Galahad\LaravelAddressing\Support\Facades\Addressing`, so if you were manually registering the service provider, please update
your `app.php` config file.
- The previously-deprecated `Galahad\LaravelAddressing\AddressFacade` has been removed
- All custom repository classes (`AddressFormatRepository`, `AdministrativeAreaRepository`, `CountryRepository`) have been removed. Instead, countries are accessed via the facade
or `LaravelAddressing` class, and everything else is loaded via its parent.
- Most custom methods have been removed from `CountryCollection` and `AdministrativeAreaCollection` (`getCountryCode()`, etc) in favor of just calling `getCountry()` on the collection and then
accessing the Country entity directly.
- `LaravelAddressing::getCountryList()` has been removed in favor of `countries()->toSelectArray()`
- `Country::getAdministrativeAreasList()` has been removed in favor of `administrativeAreas()->toSelectArray()`
- `Entity\Country` no longer extends `CommerceGuys\Addressing\Country` (which is now a `final` class), and instead provides a similar/decorated API
- `Entity\AdministrativeArea` no longer extends `CommerceGuys\Addressing\Subdivision\Subdivision`, and instead extends `Entity\Subdivision` and provides a similar/decorated API
- Administrative areas are no longer keyed by compound codes (i.e. `US-PA`) and instead by their country-specific codes (i.e. `PA`)
- `Galahad\LaravelAddressing\Controller` has been split up into separate controllers. If you're extending this, please see the `Support/Http/` directory.
- `$country->getPostalCodePattern()` has been removed in favor of `$country->addressFormat()->getPostalCodePattern()`
- All validation logic has been refactored. The API is the same as long as you were using string-based validations (i.e. `'country_input' => 'country_code'`). If not, see `src/Support/Validation/` for
details.
- The `/{country}/administrative-areas` HTTP endpoint no longer returns an `expected_length` value and `country` has been renamed to `country_code`
- The config `addressing.route.prefix` has been renamed `addressing.routes.prefix` and `addressing.routes.enabled` has been added
- The `UnknownCountryException` is no longer thrown, and `NULL` is returned instead

[Unreleased]: https://github.com/glhd/laravel-addressing/compare/2.2.1...HEAD
This is the first stable release, with lots of breaking changes since 0.5.\*

- Minimum supported Laravel version is now `5.7` and the minimum supported PHP version is now `7.1.3`
- `Galahad\LaravelAddressing\ServiceProvider` has been moved to `Galahad\LaravelAddressing\Support\AddressingServiceProvider`, so if you were manually registering the service provider, please update
your `app.php` config file.
- `Galahad\LaravelAddressing\Facades\Addressing` has been moved to `Galahad\LaravelAddressing\Support\Facades\Addressing`, so if you were manually registering the service provider, please update
your `app.php` config file.
- The previously-deprecated `Galahad\LaravelAddressing\AddressFacade` has been removed
- All custom repository classes (`AddressFormatRepository`, `AdministrativeAreaRepository`, `CountryRepository`) have been removed. Instead, countries are accessed via the facade
or `LaravelAddressing` class, and everything else is loaded via its parent.
- Most custom methods have been removed from `CountryCollection` and `AdministrativeAreaCollection` (`getCountryCode()`, etc) in favor of just calling `getCountry()` on the collection and then
accessing the Country entity directly.
- `LaravelAddressing::getCountryList()` has been removed in favor of `countries()->toSelectArray()`
- `Country::getAdministrativeAreasList()` has been removed in favor of `administrativeAreas()->toSelectArray()`
- `Entity\Country` no longer extends `CommerceGuys\Addressing\Country` (which is now a `final` class), and instead provides a similar/decorated API
- `Entity\AdministrativeArea` no longer extends `CommerceGuys\Addressing\Subdivision\Subdivision`, and instead extends `Entity\Subdivision` and provides a similar/decorated API
- Administrative areas are no longer keyed by compound codes (i.e. `US-PA`) and instead by their country-specific codes (i.e. `PA`)
- `Galahad\LaravelAddressing\Controller` has been split up into separate controllers. If you're extending this, please see the `Support/Http/` directory.
- `$country->getPostalCodePattern()` has been removed in favor of `$country->addressFormat()->getPostalCodePattern()`
- All validation logic has been refactored. The API is the same as long as you were using string-based validations (i.e. `'country_input' => 'country_code'`). If not, see `src/Support/Validation/` for
details.
- The `/{country}/administrative-areas` HTTP endpoint no longer returns an `expected_length` value and `country` has been renamed to `country_code`
- The config `addressing.route.prefix` has been renamed `addressing.routes.prefix` and `addressing.routes.enabled` has been added
- The `UnknownCountryException` is no longer thrown, and `NULL` is returned instead

[Unreleased]: https://github.com/glhd/laravel-addressing/compare/3.1.0...HEAD

[3.1.0]: https://github.com/glhd/laravel-addressing/compare/3.0.0...3.1.0

[3.0.0]: https://github.com/glhd/laravel-addressing/compare/2.2.1...3.0.0

## Keep a Changelog Format

- `Added` for new features
- `Changed` for changes in existing functionality
- `Deprecated` for soon-to-be removed features
- `Removed` for now removed features
- `Fixed` for any bug fixes
- `Security` in case of vulnerabilities
- `Added` for new features
- `Changed` for changes in existing functionality
- `Deprecated` for soon-to-be removed features
- `Removed` for now removed features
- `Fixed` for any bug fixes
- `Security` in case of vulnerabilities

0 comments on commit c15043d

Please sign in to comment.