Skip to content

Configuration tree: validate the task error_strategy, boolean public, describe the nodes #310

Closed

Description

@njoubert-cleverage

Description

Configuration tree of the process configurations (src/DependencyInjection/Configuration.php, checked on main @ 9505b63):

  • Task error_strategy not validated: a scalarNode, while the global default_error_strategy is an enumNode (skip / stop). A typo (error_strategy: skp) is accepted; it only fails when the task fails: ProcessManager::processExecution() then throws Unknown error strategy 'skp' and the process crashes, instead of applying the strategy. A task that never fails works with the typo, so rejecting it is a BC break → deprecate an unknown value in 5.4 (notice when the container is compiled), reject it in v6.0 (v6.0: remove the deprecated code #292).
  • Process public is a scalarNode: a non-boolean value already fails with a TypeError in the ProcessConfiguration constructor (strict_types) → booleanNode, which fails earlier with a clear message (no BC break, the wrong values already crash).
  • No ->info() on most nodes of the process and task configurations (entry_point, end_point, description, help, public, options, outputs, error_outputs, error_strategy, log_level, transformers' contextual_options / transformers…): config:dump-reference clever_age_process does not describe them. Add ->info(), and ->example() where useful.

Requirements

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

None. New deprecation (5.4): a task error_strategy other than skip or stop, rejected in v6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions