Заменить abandoned rakit/validation - #486
Open
Ibochkarev wants to merge 3 commits into
Open
Conversation
Remove unmaintained rakit/validation and route customer/order/profile validation through a native pipe-rule adapter registered in DI. Closes #342
digits/digits_between now reject non-digit characters, and regex params are no longer split on commas inside the pattern.
This was referenced Jul 29, 2026
Replace ValidationServiceLocator static calls with ms3_validation_service DI resolution via protected getValidationService() helpers in Customer, CustomerProfileController and OrderFieldManager. Add parity unit tests for the digits_between rule.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
Удалена зависимость
rakit/validation(unmaintained с ~2020). Валидация API и checkout переведена на собственныйValidationServiceс pipe-синтаксисом правил, совместимым с существующими JSON-правилами доставок и сессионными правилами клиента.Новый слой:
MiniShop3\Services\Validation\ValidationService— canonical API (make/validate,errors()->firstOfAll())PipeRuleValidator— движок pipe-правил (required, min/max, email, numeric, conditional rules, extension/mimes)ValidationServiceLocator::fromModx()— единая точка получения сервиса из DI (ms3_validation_service)Тип изменений
Связанные Issues
Closes #342
Как это было протестировано?
Покрыты сценарии: правила профиля клиента, поля заказа (
delivery_id/payment_id), seed-правила доставки, custom messages,nullable, unsupported rule → fail.composer ci:php/composer test,npm run lint:ci,composer stan/ GitHub Actions CI)Конфигурация тестирования:
feat/issue-342-replace-rakit-validationЧеклист
ValidationRulesEditor.vueДополнительные заметки
use Rakit\…вsrc/больше нет.