sebastianbergmann / phpunit

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

Support custom extension parameters on command line #5902

Open Bilge opened 2 months ago

Bilge commented 2 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 1 month ago

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

Bilge commented 1 month ago

Not my call. cc @sebastianbergmann