Repository navigation
#171 - Fix config:dump-reference, validate the log levels when the container is compiled - #175
Merged
Merged
Conversation
…ntainer is compiled - CleverAgeUiProcessExtension::getConfiguration(): the configuration needs the kernel environment (default log levels), the parent method returned null: config:dump-reference and debug:config failed, no PHP config builder was generated. - Configuration: the options are documented with info() instead of PHP comments. - The database_level, file_level and report_increment_level options are validated in load() (level name or value as accepted by the Monolog handlers, level name for Level::fromName()): an invalid level failed every process execution at runtime. Not in the configuration tree, whose validation closures receive a dummy value for environment variables: levels given by an environment variable are still checked at runtime. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Description
Fixes #171.
CleverAgeUiProcessExtension::getConfiguration()returns theConfigurationwith the kernel environment (default log levels): the parent method returnednull, soconfig:dump-reference clever_age_ui_processanddebug:config clever_age_ui_processfailed, and no PHP config builder (Symfony\Config\CleverAgeUiProcessConfig) was generated.Configuration: the options are documented withinfo()instead of PHP comments (shown byconfig:dump-reference).logs.database_level,logs.file_levelandlogs.report_increment_levelare validated when the container is compiled: a level name (case-insensitive) or value for the first two (asLogger::toMonologLevel()of the handlers), a level name forreport_increment_level(Level::fromName()). An invalid level made every process execution fail at runtime. The values are kept as is.The validation is done in
load(), not in the configuration tree: the validation closures of the tree receive a dummy value ('',0...) for environment variables, which would rejectfile_level: '%env(UI_FILE_LEVEL)%'(working today). Levels given by an environment variable are still checked at runtime, by Monolog.Checked in process-bundle-demo (patch applied to the vendor):
config:dump-reference clever_age_ui_processdumps the reference with the descriptions;debug:config clever_age_ui_process logs.file_level→Debug;var/cache/dev/Symfony/Config/CleverAgeUiProcessConfig.phpis generated;file_level: Verbose→cache:clearfails withInvalid configuration for path "clever_age_ui_process.logs.file_level": invalid Monolog level "Verbose", use one of: DEBUG, ...(was: everycleverage:process:executefailed);file_level: '%env(UI_FILE_LEVEL)%'withUI_FILE_LEVEL=notice: compiles,demo.transformerpasses.Tests with coverage (pcov): no risky test, no new uncovered line.
Requirements
Breaking changes
None: only invalid levels are rejected, they made every process execution fail.
🤖 Generated with Claude Code