sebastianbergmann / phpunit

The PHP Unit Testing framework.
https://phpunit.de/
BSD 3-Clause "New" or "Revised" License
19.69k stars 2.2k forks source link

Support custom extension parameters on command line #5902

Open Bilge opened 3 months ago

Bilge commented 3 months ago

At the moment we can only specify custom parameters in the XML config. I propose we also allow specifying the same on the command line. Of course, the naive solution presents a problem where extensions may register names that conflict with (future) PHPUnit parameters, but I propose all such extension parameters be double-prefixed: first with a global extension prefix (x) and then with a custom prefix they register themselves.

For example, my printer, Pip, may register the pip prefix and then it can be passed command-line arguments in the form:

--x-pip-my-param='my value'

The extension registering the pip prefix will receive all command-line arguments so prefixed with --x-pip- automatically.

flow6979 commented 2 months ago

Hello @Bilge i would like to work on this issue, can you please assign it to me?

Bilge commented 2 months ago

Not my call. cc @sebastianbergmann