Pest: New command options for Pest

Created on 18 May 2020  路  7Comments  路  Source: pestphp/pest

It would be nice if Pest were to support Unix-style short syntax for its command-line options:

--coverage would be shortened -c
--min=75 would be shortened -m 75
--group would be shortened -g

Problem 1: Pest adds its options on top of PHPUnit's own options:

-c is mapped to PHPUnit's _Read configuration from XML file_ feature and thus not available.

Problem 2: For the same reason, Pest currently doesn't have its own --help or -h option.

As a user, I would expect to have the --coverage, --group and --min=75 options explained to me when I type pest --help.

Question:

  • Are PHPUnit natives options still meant to be used with Pest or should they be replaced/hidden?
enhancement help wanted

All 7 comments

Are PHPUnit natives options still meant to be used with Pest

Yes.

Pest currently doesn't have its own --help or -h option.

Good point, we need to work on this.

Do you only want to output the pest specific help and also return a link to the phpunit command options?

Would something like this be possible?
(I'm asking about the information design part, I know the options I drawn are still competing with PHPUnit's natives options names)

PestHelp

Showing Pest's options as a section of PHPUnit's own help screen brings everything you need to know in one place.
And since the terminal show the end of the list first, having the Pest section as the last one makes sense for newcomers.

Also, now that I'm using groups a lot with Pest, I realised that a short pest -g auth would be awesome!
(And that's one PHPUnit is not using)

Idea from #44 :

We might want a pest --version | pest -v too.
We would need to "supercharge" PHPUnit's own --version to have that feature.

cc @owenvoke Close this once you have merged your pull request.

Closing as #217 has been merged. It'll be included in the next release. 馃憤馃徎

Was this page helpful?
0 / 5 - 0 ratings

Related issues

albertpratomo picture albertpratomo  路  7Comments

JacobBennett picture JacobBennett  路  6Comments

zingimmick picture zingimmick  路  3Comments

Synchro picture Synchro  路  5Comments

maks-rafalko picture maks-rafalko  路  6Comments