From e9aeac6771c5ba630122254506fb8522102f55ee Mon Sep 17 00:00:00 2001 From: Abdelrahman Omran Date: Fri, 30 Dec 2022 00:58:10 +0400 Subject: [PATCH 1/3] Replace strlen with mb_strlen --- src/Providers/CountryServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Providers/CountryServiceProvider.php b/src/Providers/CountryServiceProvider.php index 4ee1c29..fdec5f8 100644 --- a/src/Providers/CountryServiceProvider.php +++ b/src/Providers/CountryServiceProvider.php @@ -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')); } } From a8b4440ff6151d0c68825d78a3db8f12f270fdea Mon Sep 17 00:00:00 2001 From: Abdelrahman Omran Date: Mon, 9 Jan 2023 03:16:03 +0400 Subject: [PATCH 2/3] Drop PHP v8.0 support and update composer dependencies --- .travis.yml | 2 +- composer.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 131df85..25084fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ dist: bionic language: php php: -- 8.0 - 8.1 +- 8.2 env: global: diff --git a/composer.json b/composer.json index 609b63a..9bb0ad0 100644 --- a/composer.json +++ b/composer.json @@ -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": { From 7a8dc1b1fa3ddaf80319df0b164e591aeefb490d Mon Sep 17 00:00:00 2001 From: Abdelrahman Omran Date: Mon, 9 Jan 2023 03:56:03 +0400 Subject: [PATCH 3/3] Bump version --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1868150..337db1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) @@ -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