From a63a75bc5a5255b785ec510a5013db3d3c451720 Mon Sep 17 00:00:00 2001 From: Yuri Chechulin Date: Fri, 23 Aug 2024 15:30:44 +0500 Subject: [PATCH 1/2] Change minimal body and chassis length --- CHANGELOG.md | 8 ++++++++ composer.json | 4 ++-- src/Providers/Identifiers/BodyProvider.php | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f0069b..64edc0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver]. +## Unreleased + +### Changed + +- Minimal valid length of chassis_code and body_code is 8 symbols +- Minimal `avto-dev/extended-laravel-validator` version now is `4.0` +- Minimal `avto-dev/identity-laravel` version now is `5.9` + ## v3.7.0 ### Added diff --git a/composer.json b/composer.json index 3dfbef4..389c241 100644 --- a/composer.json +++ b/composer.json @@ -23,8 +23,8 @@ "fakerphp/faker": "^1.23.1" }, "require-dev": { - "avto-dev/extended-laravel-validator": "^3.7", - "avto-dev/identity-laravel": "^5.7", + "avto-dev/extended-laravel-validator": "^4.0", + "avto-dev/identity-laravel": "^5.9", "laravel/laravel": "~10.0 || ~11.0", "phpstan/phpstan": "^1.10.66", "phpunit/phpunit": "^10.5" diff --git a/src/Providers/Identifiers/BodyProvider.php b/src/Providers/Identifiers/BodyProvider.php index eccd417..5e80677 100644 --- a/src/Providers/Identifiers/BodyProvider.php +++ b/src/Providers/Identifiers/BodyProvider.php @@ -32,7 +32,7 @@ class BodyProvider extends AbstractIdentifierProvider * @var string[] */ protected static $formats = [ - '#######', + '########', '??##########', '???###-#######', '???### #######', @@ -81,7 +81,7 @@ public function invalidBodyCode(...$arguments): string break; case 1: - $code = \mb_substr($this->bodyCode(...$arguments), 0, 6); + $code = \mb_substr($this->bodyCode(...$arguments), 0, 7); break; } From d00a9f1e95353be6d815b82f9a0deb2534118273 Mon Sep 17 00:00:00 2001 From: Yuri Chechulin Date: Fri, 23 Aug 2024 15:33:52 +0500 Subject: [PATCH 2/2] Changelog fix --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64edc0f..6b0ac14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,8 @@ The format is based on [Keep a Changelog][keepachangelog] and this project adher ### Changed - Minimal valid length of chassis_code and body_code is 8 symbols -- Minimal `avto-dev/extended-laravel-validator` version now is `4.0` - Minimal `avto-dev/identity-laravel` version now is `5.9` +- Minimal `avto-dev/extended-laravel-validator` version now is `4.0` ## v3.7.0