Git Product home page Git Product logo

Comments (5)

jadb avatar jadb commented on August 22, 2024

👍

from robo.

DavertMik avatar DavertMik commented on August 22, 2024

I implemented this a few days ago.
It is available latest release (0.4.2) and in master branch.

If you specify your method like

function myTask($options = ['op1' => 'val1', 'opt2' => 'val2'])

It will be acailable as a command with options --opt1 and --opt2, where val1 and val2 are default values.

I.e. you need to specify last argument of method as associative array to have options

from robo.

iJackUA avatar iJackUA commented on August 22, 2024

Oups... really I was using old version
and I have even seen this commit yesterday :)
Thanks a lot, it really works as expected. Just a little documentation of this feature needed in README.

from robo.

DavertMik avatar DavertMik commented on August 22, 2024

Yes, I didn't have time to update documentation or make a proper release announcement.
Just had to update it really fast for my needs. Also there is a way to bypass options and arguments that can be used in other commands:

./robo test -- run tests/unit/* --debug
<?php
function test($args = '')
{
   $this->taskExec('codecept')->args($args)->run();
}
?>

Will execute codecept run tests/unit/* --debug

from robo.

DavertMik avatar DavertMik commented on August 22, 2024

Updated docs: http://robo.li/started.html#commands

from robo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.