Skip to content

Builder configuration from some arguments failed #6513

@llaville

Description

@llaville
Q A
PHPUnit version All versions 10.5, 11.5, 12.5, 13.0
PHP version 8.4.17
Installation Method Composer or PHAR

Summary

I've noticed that some PHPUnit options are not parsing/handling correctly. The first one that alert me is usage of --colors always

BTW, there is probably the same error with definition of long options --stop-on-failure and --coverage-text (see https://github.com/sebastianbergmann/phpunit/blob/main/src/TextUI/Configuration/Cli/Builder.php#L37)

Current behavior

phpunit-10.phar --colors always
PHPUnit 10.5.63 by Sebastian Bergmann and contributors.

Test file "always" not found
phpunit-11.phar --colors always
PHPUnit 11.5.53 by Sebastian Bergmann and contributors.

Test file "always" not found
phpunit-12.phar --colors always
PHPUnit 12.5.11 by Sebastian Bergmann and contributors.

Test file "always" not found
phpunit-13.phar --colors always
PHPUnit 13.0.2 by Sebastian Bergmann and contributors.

Test file "always" not found

How to reproduce

Compare each previous command to this one

phpunit-13.phar --colors=always

Note

When the equal sign is present, there is no issue

Expected behavior

For example ... at least an execution !

PHPUnit 13.0.2 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.4.17
Configuration: /shared/backups/bartlett/captainhook-bin-plugin/phpunit.xml.dist

No tests executed!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions