Warn when `failOnAllIssues="true"` is combined with an explicitly disabled fine-grained `failOn*` setting · Issue #6830 · sebastianbergmann/phpunit · GitHub
Skip to content

Warn when failOnAllIssues="true" is combined with an explicitly disabled fine-grained failOn* setting #6830

Closed

Description

@sebastianbergmann

failOnAllIssues="true" is a blanket setting that enables failing on all issue types. It is not meant to be overridden by more fine-grained failOn* settings; the --do-not-fail-on-* CLI options are the intended mechanism for carve-outs. This works as designed (see #6829).

However, when failOnAllIssues="true" is configured together with an explicitly disabled fine-grained setting such as failOnSelfDeprecation="false", the fine-grained setting is silently ignored. A test runner warning should be emitted for this combination so that the conflict is no longer silent.

Proposed behavior

Given this XML configuration:

<phpunit failOnAllIssues="true"
         failOnSelfDeprecation="false">

a test runner warning such as this should be emitted:

failOnSelfDeprecation="false" has no effect because failOnAllIssues is enabled; use the --do-not-fail-on-self-deprecation CLI option to not fail on self-deprecations

The warning should be emitted for each fine-grained failOn* attribute that is explicitly set to false in the XML configuration file while failOnAllIssues is enabled (whether via the XML configuration file or via the --fail-on-all-issues CLI option).

Activity

  1. changed the title [-]Warn when failOnAllIssues="true" is combined with an explicitly disabled fine-grained failOn* setting[/-] [+]Warn when `failOnAllIssues="true"` is combined with an explicitly disabled fine-grained `failOn*` setting[/+] on Jul 11, 2026
  2. added a commit that references this issue on Jul 19, 2026
    d5072f6
  3. locked as resolved and limited conversation to collaborators on Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature/configuration/xmlfeature/issuesIssues related to handling of `E_*` emitted by the PHP runtime and `E_USER_*` emitted in PHP codefeature/test-runnerCLI test runnertype/enhancementA new idea that should be implemented

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions