Skip to content

Commit

Permalink
Merge branch 'release/v9.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Omranic committed Jan 8, 2023
2 parents b012697 + 7a8dc1b commit e432598
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -2,8 +2,8 @@ dist: bionic
language: php

php:
- 8.0
- 8.1
- 8.2

env:
global:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](CONTRIBUTING.md).


## [v9.0.0] - 2023-01-09
- Drop PHP v8.0 support and update composer dependencies
- Replace strlen with mb_strlen

## [v8.1.2] - 2022-12-30
- pl: ISO 3166-2 subdivision codes fixed (#225)

Expand Down Expand Up @@ -172,6 +176,7 @@ This project adheres to [Semantic Versioning](CONTRIBUTING.md).
## v1.0.0 - 2016-08-20
- Tag first release.

[v9.0.0]: https://github.com/rinvex/countries/compare/v8.1.2...v9.0.0
[v8.1.2]: https://github.com/rinvex/countries/compare/v8.1.1...v8.1.2
[v8.1.1]: https://github.com/rinvex/countries/compare/v8.1.0...v8.1.1
[v8.1.0]: https://github.com/rinvex/countries/compare/v8.0.0...v8.1.0
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -43,10 +43,10 @@
}
],
"require": {
"php": "^8.0.0"
"php": "^8.1.0"
},
"require-dev": {
"codedungeon/phpunit-result-printer": "^0.31.0",
"codedungeon/phpunit-result-printer": "^0.32.0",
"phpunit/phpunit": "^9.5.0"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions src/Providers/CountryServiceProvider.php
Expand Up @@ -16,12 +16,12 @@ public function boot()
{
// Add country validation rule
Validator::extend('country', function ($attribute, $value) {
return is_string($value) && strlen($value) === 2 && array_key_exists(mb_strtolower($value), countries());
return is_string($value) && mb_strlen($value) === 2 && array_key_exists(mb_strtolower($value), countries());
}, trans('validation.invalid_country'));

// Add currency validation rule
Validator::extend('currency', function ($attribute, $value) {
return is_string($value) && strlen($value) === 3 && array_key_exists(mb_strtoupper($value), currencies());
return is_string($value) && mb_strlen($value) === 3 && array_key_exists(mb_strtoupper($value), currencies());
}, trans('validation.invalid_currency'));
}
}

0 comments on commit e432598

Please sign in to comment.