All notable changes to pod-point/countries
will be documented in this file.
- Fix the memoization and the
getSymbol
method in the CurrencyHelper (#55).
- SWP-2788 Introduce memoization for efficiency during use on mass
- Introduced a history for finds in the
CountryHelper
so that we don't perform the same lookup many times - Introduced a caching layer for
NumberFormatters
used in theCurrencyHelper
to avoid creating many unnecessary instances when used on mass
- Introduced a history for finds in the
- Major release to support PHP 7.3+ and Laravel 7.x+
- Illuminate packages 6.* -> 7.* or 8.*
- league/iso3166 2.x -> 3.x
- PHPUnit 8.x -> 8.x or 9.x
- Implement Laravel Auto-Discovery
- Moved
config/
a level up following best practices. - Moved
CountriesServiceProvider.php
a level up following best practices. - Removed php-coveralls
- Moved from Travis CI to Github Actions
- This package can no longer support PHP7.2 - if using PHP7.2 please use version 4.*.
- SWP-2788 Introduce memoization for efficiency during use on mass
- Introduced a history for finds in the
CountryHelper
so that we don't perform the same lookup many times - Introduced a caching layer for
NumberFormatters
used in theCurrencyHelper
to avoid creating many unnecessary instances when used on mass
- Introduced a history for finds in the
- Implement Laravel Auto-Discovery
- Moved
config/
a level up following best practices. - Moved
CountriesServiceProvider.php
a level up following best practices. - Removed php-coveralls
- Moved from Travis CI to Github Actions
- Major release to support PHP 7.2 and Laravel 6.x
- Illuminate packages 5.* -> 6.*
- PHPUnit 7.x -> 8.x
- Guzzle 6.x -> 7.x
- Removal of satooshi/php-coveralls in favour of php-coveralls/php-coveralls
- This package can no longer support PHP7.1 - if using PHP7.1 please use version 3.*.
- SWP-2788 Introduce memoization for efficiency during use on mass
- Introduced a history for finds in the
CountryHelper
so that we don't perform the same lookup many times - Introduced a caching layer for
NumberFormatters
used in theCurrencyHelper
to avoid creating many unnecessary instances when used on mass
- Introduced a history for finds in the
- Minor modernisations
- Moved from Travis CI to Github Actions
getSystemLocale
inLocalizedHelper
now returns the fallback locale if the given one is not found. This created issues with some tests because NumberFormatter becomes system dependent if null is given.
- Add
CountryHelper
facade withgetCountryCodeFromLocale
andfindByLocale
functions. - Improve
CurrencyHelper
facade with a new functiontoStandardFormat
. It returns the typical currency format and can also show a specified number of decimals.
- Add
formatToMinorUnitWhenApplicable
method: formats currency with pence when the rate is less than 1.00.
- SWP-1718 - Revert “Republic of Ireland” to have its locale set to ie instead of en
- Fix locale for supported countries (should only be
en
orno
for now) - Renaming wrongly named test files.
- Improve test coverage.
- Improve ViewComposer tests.
- Leverage
mpociot/vat-calculator
in order to bring VAT resolution support - Exposing it through a Facade too
- Improve service provider
- Better type hinting
- Update readme
- Update Ireland details
- Add EUR as currency code
- IE as country code
- Reverting the order when merging countries so that the name in our config is the one that is going to be used.
- PHP NumberFormatter will round up with 2 decimals only by default.
- Sometimes we can display up to 6 decimals of the monetary unit (ex:
£0.106544
) especially for energy prices like£0.106544 per kWh
. - If a regular float like
19.99
with only 2 decimals is given, it will still be formatted as usual£19.99
.
- SWP-36 Adding to format from cents helper method with the new
toFormatFromInt
andmoneyFormatFromInt
helpers method.
- Adding new abstract
LocalizedHelper
that will have the logic to retrieve a locale in aNumberFormatter
format - Changing the currency helper so that it extends the localized helper
- Adding new number helper that allows us to format a number in the right locale
- renaming
format
totoFormat
for consistency in theNumberHelper
- Changing the style from
DECIMAL
toDEFAULT_STYLE
- Support of currency conversion service
- Helpers to format money given the currency and locale
- Helper to get the currency symbol given the currency code and locale
- Namespace was update to
PodPoint\I18n
- Add GB system locale
- Add Norway and UK timezones
- Add system locale to NO
- Added country helper
- Add ISO country information to existing country config
- Adding the extension linked to the countries in
countries-partial
config files - Renaming the index 'extension' to 'tld'
- Adding locale informations in config file
contries-partials.php
, and a new view composer that prepares values for language switchers - Adding language field into configuration files for the languages switchers
- Add country code constants
- Add country code view composer
- Fix to country with no dialling code:
null
value where no dialling code
- Added dialling codes
- This is a breaking change from v1.0.* as config arrays have been restructured to include dialling codes.
- Support Laravel 5.1 and 5.2
- Initial release