Repository navigation
Убрать Undefined array key desc из лога установки resolver_08 - #787
Open
Ibochkarev wants to merge 2 commits into
Open
Ibochkarev wants to merge 2 commits into
Ibochkarev wants to merge 2 commits into
Conversation
Read snippet properties via xPDO parent::get so upgrade can backfill missing desc without tripping modElement lexicon translation.
Clarify that package reinstalls trigger the desc warning each time, matching the reproduction note on #782.
Ibochkarev
force-pushed
the
fix/issue-782-snippet-properties-desc
branch
from
September 25, 2026 03:07
d427248 to
6256381
Compare
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.
Описание
При upgrade
resolver_08_snippet_propertiesчитал свойства через$snippet->get('properties').modElement::getбезissetобращается к$property['desc']и пишет PHP warning — как раз на тех legacy-строках, которые резолвер должен лечить. Теперь свойства читаются черезClosure::bind+parent::get(unserializephptype=arrayбез lexicon-ветки). Backfillms3_prop_*не менялся.Тип изменений
Связанные Issues
Closes #782
Как это было протестировано?
php -l _build/resolvers/resolver_08_snippet_properties.php # exit 0Полный
composer ci:php/ vue lint не гонялись: затронут один install-resolver, runtime PHP приложения не менялся.composer ci:php/composer test,npm run lint:ci,composer stan/ GitHub Actions CI)Конфигурация тестирования:
php -lСкриншоты (если применимо)
Чеклист
composer stan/ CI jobPHPStan)npm run lint:ciдля Vue)Дополнительные заметки
getProperties()использовать нельзя: он сам вызываетget('properties'). СыройtoArray('', true)+fromJSONтоже не подходит: уmodSnippet.propertiesphptype=array(serialize), не JSON.Ручная проверка: upgrade поверх сниппетов без
descвmodx_site_snippets.properties— в логе установки нетUndefined array key "desc"междуresolver_07иresolver_09,descпроставляются.