Skip to content

[PHPUnitBridge] When only ignoreFile is passed in SYMFONY_DEPRECATIONS_HELPER, deprecations no longer fail tests #45919

@mondrake

Description

@mondrake

Symfony version(s) affected

6.1.0

Description

When only ignoreFile is passed in SYMFONY_DEPRECATIONS_HELPER, deprecations no longer fail tests, unless you also specifically set max[total]=0

How to reproduce

Use an env var like (from phpunit.xml)

<env name="SYMFONY_DEPRECATIONS_HELPER" value="ignoreFile=/var/www/d10/core/deprecation-ignore.txt"/>

Run tests that have unignored deprecations reported;

The exit code of PHPUnit is 0, not 1 as you would expect.

Add max[total]=0

<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[total]=0&ignoreFile=/var/www/d10/core/deprecation-ignore.txt"/>

Rerun tests;

The exit code of PHPUnit is 1.

Possible Solution

No response

Additional Context

No response

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