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













0















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









share|improve this question



















  • 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















0















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









share|improve this question



















  • 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













0












0








0








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









share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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












  • 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










1 Answer
1






active

oldest

votes


















0














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.






share|improve this answer






















    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    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.






    share|improve this answer



























      0














      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.






      share|improve this answer

























        0












        0








        0







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        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
















            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.



















            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript