⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

PHPUnit: Fail on warnings #17

@lippserd

Description

@lippserd

Currently, PHPUnit does not fail when PHP warnings occur1. However, PHP warnings can indicate underlying coding issues that should not be ignored, especially in our codebase.

In Icinga Web, we adjust error reporting early on to convert everything into exceptions, ensuring that no potential problems go unnoticed. In contrast, our library tests do not modify error reporting in the same way, which means warnings may slip through unnoticed and not cause test failures.

To improve overall code quality and consistency, PHPUnit should be configured to fail on PHP warnings.

Footnotes

  1. https://github.com/Icinga/ipl-stdlib/pull/61#pullrequestreview-3592029375

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