Skip to content

Config command source tracking incomplete for optional settings #335

@coenjacobs

Description

@coenjacobs

Summary

The mozart config command tracks and displays source annotations ((explicit), (default), (inferred from ...)) for the four core settings, generate_autoloader, and delete_vendor_directories. But the two optional prefix settings (constant_prefix and functions_prefix) don't go through the source-tracking system.

Location

  • src/Commands/Config.phpbuildSources() (lines 72–99) does not include entries for constant_prefix or functions_prefix
  • src/Console/Commands/Config.phpprintOptionalSetting() (lines 100–111) hardcodes (explicit) for any non-empty value

Current behavior

constant_prefix:        MY_PREFIX_                      (explicit)
functions_prefix:       (not set)

The (explicit) annotation is technically correct (these settings default to empty string, so any value IS explicit), but it comes from hardcoded logic in printOptionalSetting() rather than from the source-tracking system used by all other settings.

Impact

Very low — the output is functionally correct. This is purely an inconsistency in how the config command works internally.

Proposed fix

Add constant_prefix and functions_prefix to buildSources() for consistency, even though their logic is trivial (non-empty = explicit, empty = not set). This keeps all source annotations in one place and makes the console command a pure display layer.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions