Lexicon checker: cross-topic duplicate reports and element label cleanup - #16997
Open
Ibochkarev wants to merge 4 commits into
Open
Lexicon checker: cross-topic duplicate reports and element label cleanup#16997Ibochkarev wants to merge 4 commits into
Ibochkarev wants to merge 4 commits into
Conversation
…dupes Extend the core lexicon checker with identical/conflict topic reports and remove English chunk/snippet/plugin/template type labels that already live in default (manager always loads core:default). Refs modxcms#14512.
Place the build checker under MODX\Revolution\Build for PSR compliance and switch the CLI PDO errmode away from deprecated WARNING.
Wrap long CheckLexicon messages for the 120-char rule and point modLexiconTest at default for chunk type labels moved out of the chunk topic.
Avoid file-level require_once so phpcs PSR1 side-effects sniff stays clean.
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.
What changed and why
First slice of #14512. The core lexicon checker now reports keys that appear in more than one topic (identical value vs conflicting value). English element topics no longer repeat type labels (
chunk/chunks,snippet/snippets,plugin/plugins,template/templates) that already exist indefault, which the manager always loads.CheckLexiconlives inMODX\Revolution\Build, with a thin CLI entrypoint and a short README for maintainers.How to test
On a running manager install, confirm Elements tree labels still resolve when
cultureKey=en(depends oncore:default).Related issue(s)/PR(s)
Refs #14512
Builds on the checker from #14979
Compatibility notes
default. Manager and connectors already loadcore:default.defaultno longer provides those eight type labels (documented trade-off)._superfluouskeys (extras may still use them).Breaking change assessment
No public PHP API change. Lexicon key availability for the eight labels still works when
defaultis loaded. Topic-only loads withoutdefaultlose those labels.Test coverage
_build/test/Tests/Build/CheckLexiconDuplicateTest.php(suiteBuildinphpunit.xml)php -lexit 0; phpunit exit 0 (3/35)Contributors
@Ruslan-Aleev @Jako @JoshuaLuckers
AI tool use
Cursor agent assisted implementation, tests, and PR drafting under maintainer review.