Issue
I can't add a --filter
argument to my composer.json
script.
I've been reading up the docs but I can't seem to figure it out.
I have the following script in my composer.json
"scripts": {
"test": [
".\\vendor\\bin\\phpunit"
]
},
But I can't send any --filters
with it like:
$ composer test --filter pigeon_ringnumber_cant_be_more_then_9_chars_for_BE_NL_ESP
This outputs the following error:
[Symfony\Component\Console\Exception\RuntimeException]
The "--filter" option does not exist.
Any idea how I can make the script accept the --filter
argument?
I want to be able to run it quicker then always typing
.\\vendor\\bin\\phpunit
Solution
The key here is reading carefully the docs. In docs there is:
Similar to the run-script command you can give additional arguments to scripts, e.g. composer test -- --filter will pass --filter along to the phpunit script.
So to pass --filter pigeon_ringnumber_cant_be_more_then_9_chars_for_BE_NL_ESP
you should in fact run:
composer test -- --filter pigeon_ringnumber_cant_be_more_then_9_chars_for_BE_NL_ESP
so you should use here additional --
before specifying arguments that you want to pass.
Of course in this case the solution you search might be much simpler. You could just consider creating symbolic link to do this.
Answered By - Marcin NabiaĆek Answer Checked By - David Goodson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.