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

            How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

            Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?