fix(mgr): UTF-8 whitespace в combo labels model-fields - #619
Open
Ibochkarev wants to merge 1 commit into
Open
Conversation
Collapse whitespace in ComboConfigManager::buildLabel with Unicode mode so NBSP and other UTF-8 spaces do not leave broken combo labels in model-fields visible payloads.
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.
Описание
В
ComboConfigManager::buildLabel()пробелы схлопывались черезpreg_replace('/\s+/')без Unicode-режима. Без/uUTF-8 NBSP (U+00A0) не считается\s, из‑за чего вcomboOptionsдляvisible/msOrderостаются «кривые» пробелы в кириллических лейблах покупателей и ломается загрузка формы заказа (empty-state «поля не настроены»).Фикс:
/\s+/u+ безопасный fallback, еслиpreg_replaceвернулnullна битой строке.Тип изменений
Связанные Issues
Closes #618
Не путать с ACL
mssetting_save(#613 / #614): там чтение schema, здесь UTF-8 в combo labels.Как это было протестировано?
composer ci:php/ focused PHPUnit)Конфигурация тестирования:
fix/issue-618-combo-utf8-model-fieldsотbetaСкриншоты (если применимо)
json_encodeOKЧеклист
composer stan/ CI jobPHPStan)npm run lint:ciдля Vue) — n/a, Vue не трогалиДополнительные заметки
/u.code-reviewer=gpt-5.6-sol-medium(slugclaude-opus-5-thinking-highв Task недоступен),thermo-nuclear=cursor-grok-4.6-high-fast. Удалён тестовый «фейковый envelope»; добавлен null-safe fallback дляpreg_replace.cursor-grok-4.6-high-fast, make=Composer session, review=gpt-5.6-sol-medium, structure=cursor-grok-4.6-high-fast.