Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command options for Pest #10

Closed
alexmartinfr opened this issue May 18, 2020 · 7 comments
Closed

New command options for Pest #10

alexmartinfr opened this issue May 18, 2020 · 7 comments

Comments

@alexmartinfr
Copy link
Collaborator

alexmartinfr commented May 18, 2020

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?
@nunomaduro
Copy link
Member

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.

@fetzi
Copy link
Contributor

fetzi commented May 26, 2020

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

@fetzi fetzi self-assigned this May 26, 2020
@alexmartinfr
Copy link
Collaborator Author

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.

@alexmartinfr
Copy link
Collaborator Author

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)

@alexmartinfr
Copy link
Collaborator Author

alexmartinfr commented May 29, 2020

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.

@fetzi fetzi removed their assignment Jun 2, 2020
@nunomaduro
Copy link
Member

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

@owenvoke
Copy link
Member

Closing as #217 has been merged. It'll be included in the next release. 👍🏻

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

No branches or pull requests

4 participants