Skip to content

No warning when CLI options are used multiple times #5704

Description

@ondrejmirtes

Hi, right now it seems from my testing that passing --filter multiple times rewrites the previous occurrence so the first --filter option is silently discarded.

vendor/bin/phpunit --filter 'PHPStan\\Type\\UnionTypeTest::testSorting' --filter 'PHPStan\\Type\\UnionTypeTest::testAccepts#7' --verbose --debug
PHPUnit 9.5.23 #StandWithUkraine

Runtime:       PHP 8.3.1
Configuration: /Users/ondrej/Development/phpstan/phpunit.xml
Warning:       No code coverage driver available

Test 'PHPStan\Type\UnionTypeTest::testAccepts with data set #7 (PHPStan\Type\UnionType Object (...), PHPStan\Type\ObjectType Object (...), PHPStan\TrinaryLogic Object (...))' started
Test 'PHPStan\Type\UnionTypeTest::testAccepts with data set #7 (PHPStan\Type\UnionType Object (...), PHPStan\Type\ObjectType Object (...), PHPStan\TrinaryLogic Object (...))' ended

Time: 00:00.117, Memory: 570.00 MB

OK (1 test, 1 assertion)

I'd like to use --filter to be interpreted in a way - "I want to run tests that pass this filter and also tests that pass this other filter". So in this case PHPUnit should run the two tests I specified.

Even if you don't want to interpret multiple --filter options that way, I think something could be done about the silent discarding.

Thank you.

Activity

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

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions