Skip to content

[PhpunitBridge] Exit code 1 instead of 0 using "quiet" option in 6.1.0 #46497

@jmsche

Description

@jmsche

Symfony version(s) affected

6.1.0

Description

Hi,

I'm using this configuration for the Phpunit Bridge: SYMFONY_DEPRECATIONS_HELPER="quiet[]=indirect&quiet[]=other"

Using Symfony 6.0.x I get a 0 exit code, however with Symfony 6.1.0 I get a 1 exit code.

How to reproduce

  • Have some tests trigger a deprecation
  • SYMFONY_DEPRECATIONS_HELPER="quiet[]=indirect&quiet[]=other"
  • Run tests
  • echo $? should return 0 but returns 1

[Edit] Added a simple reproducer here: https://github.com/jmsche/symfony-deprecation-reproducer

To reproduce using the reproducer:

git clone https://github.com/jmsche/symfony-deprecation-reproducer.git
cd symfony-deprecation-reproducer/
composer i
bin/phpunit 
echo $? # outputs 1
git fetch 
git checkout 6.0
composer i
bin/phpunit 
echo $? # outputs 0

Possible Solution

No response

Additional Context

The only way I managed to get a 0 exit code is to set SYMFONY_DEPRECATIONS_HELPER="disabled=1", using the new logFile option makes PHPUnit return 1 as well.

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