Visitar URL original
`extends` option in config files not working as expected · Issue #6872 · Codeception/Codeception · GitHub
Skip to content

extends option in config files not working as expected #6872

Description

@lxa

According to the docs:

  • For global config (codeception.yml):

    Allows you to specify a file (relative to the codeception.yml file) that holds some already pre‑defined values.

  • For suite configs (*.suite.yml):

    Allows you to specify a file (relative to *.suite.yml) that holds some already pre‑defined values.

  • Config loading order also includes *.dist.yml configs.

What I tried

I wanted to reuse the root config files in a submodule by extending them:

Global config:

# /instance/codeception.dist.yml
extends: ../codeception.dist.yml

Suite config:

# /instance/tests/Acceptance.suite.dist.yml
extends: ../../tests/Acceptance.suite.dist.yml

What happens

  • Global extends:

    • Array options (e.g. modules) merge as expected.
    • Scalar options (single values) are not inherited — they reset to empty/default.
    • params defined in the base file are ignored when loaded via extends.
      (This matches another report: Params source is ignored if yml file is extended #6799)
  • Suite extends:

    • In .suite.dist.yml files the extends option is ignored completely.

Expected

Based on the docs, extends should allow inheriting values from another config file (both global and suite level), so that shared configs can live in one place and be reused.

Currently this does not work reliably: global only partially works, suite configs .dist.yml not at all.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions