Skip to content

Config Schema Inventory & DSL Type Coverage

Reference for the {slug}_config enum inventory (product-level scale) and the setting_type DSL implementation coverage in middag-io/moodle. Backs MDL-012.

Legacy config-key inventory (product-level, local_middag)

This inventory belongs to the consumer product (local_middag's own extensions), not to this OSS adapter — it is reproduced here as the historical scale the config-schema mechanism was built to support.

MetricCount
Extensions with a {slug}_config enum (of 12 product extensions total)10
Keys with storage60
storedfile keys3
multiselect keys1
Lazy keys (is_lazy() === true)6

Extensions covered: core, ecommerce, videolibrary, automessage, bigquery, opengraph, cleaner, sentry, coursegroup, helpdesk.

  • core has the largest enum, 15 keys — including authprofilefield (lazy, resolved via user_support::get_options_for_user_fields()) and authsecretkey (password type).
  • bigquery has the largest concentration of lazy options (4), related to data retention and mode selection.

DSL type coverage

setting_type covers 22 variants total (19 with storage, plus 3 display-only: heading, description, link). The legacy plugin (ref-312-01, 2026-04-09) had only 8 implemented, with 14 reserved-but-unimplemented. This adapter has since closed that gap — verified against real code on 2026-07-17, src/Settings/Type/ now contains all 22.

Setting typeLegacy (ref-312-01, 2026-04-09)This adapter (verified 2026-07-17)
textimplementedimplemented
checkboximplementedimplemented
selectimplementedimplemented
passwordimplementedimplemented
textareaimplementedimplemented
headingimplementedimplemented
descriptionimplementedimplemented
linkimplementedimplemented
autocompletereserved, unimplementedimplemented — Autocomplete.php
encrypted_passwordreserved, unimplementedimplemented — EncryptedPassword.php
htmleditorreserved, unimplementedimplemented — Htmleditor.php
colourpickerreserved, unimplementedimplemented — Colourpicker.php
durationreserved, unimplementedimplemented — Duration.php
timereserved, unimplementedimplemented — Time.php
multicheckboxreserved, unimplementedimplemented — Multicheckbox.php
multiselectreserved, unimplementedimplemented — Multiselect.php
storedfilereserved, unimplementedimplemented — Storedfile.php
filepathreserved, unimplementedimplemented — Filepath.php
directoryreserved, unimplementedimplemented — Directory.php
executablereserved, unimplementedimplemented — Executable.php
iplistreserved, unimplementedimplemented — Iplist.php
portlistreserved, unimplementedimplemented — Portlist.php
Total8 / 2222 / 22

This closes the gap the legacy ADR/REF pair documented as open — a genuine forward-progress finding, not a contradiction to flag as debt.

Anti-patterns

Anti-patternWhy it's wrong
Using get_config() directlyBypasses the typed schema — reads should go through config_support/settings_support.
Putting resolution logic in the {slug}_config enumThe enum must stay pure metadata; resolution logic belongs to the DSL/services layer.
Creating a config key with no matching enum caseProduces a "ghost" key that never appears in the schema.
Registering lazy options during register()Services are not available at that phase (boot) — see the routing/lifecycle note below.

MIDDAG © 2015-2026