How do I make a composer.json script accept flagsHow do you pass an argument to a composer script from the command line?How to create a Symbolic link to PHPUnit?Autoloading classes in PHPUnit using Composer and autoload.phpComposer install/update failingSymfony 2 -> Composer and CloudControlComposer is not copying on the specified bin-dir directoryInstall CakePHP's DebugKit with composerfopen error when installing Composer for PHP (Windows 7)Composer fails executing app/console cache:clear on symfony 3PHPUnit composer installation on WAMP not workingphp bin/console symfony commands give a fatal errorPHPUnit Tests can't read Tests
Basis and cardinality
What is the meaning of "it" in "as luck would have it"?
Why doesn't SpaceX land boosters in Africa?
Two palindromes are not enough
Rear derailleur got caught in the spokes, what could be a root cause
What would you need merely the term "collection" for pitches, but not "scale"?
What was the first science fiction or fantasy multiple choice book?
Are you required to spend hit dice to take a short rest?
Disk usage confusion: 10G missing on Linux home partition on SSD
What is this fluorinated organic substance?
Why would Dementors torture a Death Eater if they are loyal to Voldemort?
iMac 2019: Can I mix the old modules with the new ones when upgrading RAM?
Where to connect the fuse and why?
Cat files in subfolders in order given by a list
How can this fractal shape perfectly cover a certain platonic solid?
Tricolour nonogram
Chandra exiles a card, I play it, it gets exiled again
My mom helped me cosign a car and now she wants to take it
Which high-degree derivatives play an essential role?
How soon after takeoff can you recline your airplane seat?
What's the point of stochastic volatiliy models if you can use local volatility?
A* pathfinding algorithm too slow
Why isn't UDP with reliability (implemented at Application layer) a substitute of TCP?
I agreed to cancel a long-planned vacation (with travel costs) due to project deadlines, but now the timeline has all changed again
How do I make a composer.json script accept flags
How do you pass an argument to a composer script from the command line?How to create a Symbolic link to PHPUnit?Autoloading classes in PHPUnit using Composer and autoload.phpComposer install/update failingSymfony 2 -> Composer and CloudControlComposer is not copying on the specified bin-dir directoryInstall CakePHP's DebugKit with composerfopen error when installing Composer for PHP (Windows 7)Composer fails executing app/console cache:clear on symfony 3PHPUnit composer installation on WAMP not workingphp bin/console symfony commands give a fatal errorPHPUnit Tests can't read Tests
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 renders the following error:
[SymfonyComponentConsoleExceptionRuntimeException]
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
composer-php
add a comment |
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 renders the following error:
[SymfonyComponentConsoleExceptionRuntimeException]
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
composer-php
3
Possible duplicate of How do you pass an argument to a composer script from the command line?
– Daniel W.
Mar 25 at 16:30
Oh it's called an 'Argument', not a 'flag', that's why I wasn't getting decent search results on here and google. Thanks for your help!
– ArneDB
Mar 25 at 16:32
You're welcome! A flag has no value! Flags are either set or not set. Arguments or parameters can have values :-)
– Daniel W.
Mar 25 at 16:32
Alright thanks! I updated my original question with the solution I found in your link! Thank you very much
– ArneDB
Mar 25 at 16:36
add a comment |
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 renders the following error:
[SymfonyComponentConsoleExceptionRuntimeException]
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
composer-php
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 renders the following error:
[SymfonyComponentConsoleExceptionRuntimeException]
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
composer-php
composer-php
edited Mar 25 at 16:39
vaxquis
8,0805 gold badges40 silver badges58 bronze badges
8,0805 gold badges40 silver badges58 bronze badges
asked Mar 25 at 16:28
ArneDBArneDB
84 bronze badges
84 bronze badges
3
Possible duplicate of How do you pass an argument to a composer script from the command line?
– Daniel W.
Mar 25 at 16:30
Oh it's called an 'Argument', not a 'flag', that's why I wasn't getting decent search results on here and google. Thanks for your help!
– ArneDB
Mar 25 at 16:32
You're welcome! A flag has no value! Flags are either set or not set. Arguments or parameters can have values :-)
– Daniel W.
Mar 25 at 16:32
Alright thanks! I updated my original question with the solution I found in your link! Thank you very much
– ArneDB
Mar 25 at 16:36
add a comment |
3
Possible duplicate of How do you pass an argument to a composer script from the command line?
– Daniel W.
Mar 25 at 16:30
Oh it's called an 'Argument', not a 'flag', that's why I wasn't getting decent search results on here and google. Thanks for your help!
– ArneDB
Mar 25 at 16:32
You're welcome! A flag has no value! Flags are either set or not set. Arguments or parameters can have values :-)
– Daniel W.
Mar 25 at 16:32
Alright thanks! I updated my original question with the solution I found in your link! Thank you very much
– ArneDB
Mar 25 at 16:36
3
3
Possible duplicate of How do you pass an argument to a composer script from the command line?
– Daniel W.
Mar 25 at 16:30
Possible duplicate of How do you pass an argument to a composer script from the command line?
– Daniel W.
Mar 25 at 16:30
Oh it's called an 'Argument', not a 'flag', that's why I wasn't getting decent search results on here and google. Thanks for your help!
– ArneDB
Mar 25 at 16:32
Oh it's called an 'Argument', not a 'flag', that's why I wasn't getting decent search results on here and google. Thanks for your help!
– ArneDB
Mar 25 at 16:32
You're welcome! A flag has no value! Flags are either set or not set. Arguments or parameters can have values :-)
– Daniel W.
Mar 25 at 16:32
You're welcome! A flag has no value! Flags are either set or not set. Arguments or parameters can have values :-)
– Daniel W.
Mar 25 at 16:32
Alright thanks! I updated my original question with the solution I found in your link! Thank you very much
– ArneDB
Mar 25 at 16:36
Alright thanks! I updated my original question with the solution I found in your link! Thank you very much
– ArneDB
Mar 25 at 16:36
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55342355%2fhow-do-i-make-a-composer-json-script-accept-flags%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
add a comment |
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.
add a comment |
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.
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 Mar 25 at 19:28
Marcin NabiałekMarcin Nabiałek
76.3k28 gold badges166 silver badges206 bronze badges
76.3k28 gold badges166 silver badges206 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55342355%2fhow-do-i-make-a-composer-json-script-accept-flags%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
Possible duplicate of How do you pass an argument to a composer script from the command line?
– Daniel W.
Mar 25 at 16:30
Oh it's called an 'Argument', not a 'flag', that's why I wasn't getting decent search results on here and google. Thanks for your help!
– ArneDB
Mar 25 at 16:32
You're welcome! A flag has no value! Flags are either set or not set. Arguments or parameters can have values :-)
– Daniel W.
Mar 25 at 16:32
Alright thanks! I updated my original question with the solution I found in your link! Thank you very much
– ArneDB
Mar 25 at 16:36