Comments (5)
👍
from robo.
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.
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.
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.
Updated docs: http://robo.li/started.html#commands
from robo.
Related Issues (20)
- How to get _exec return Message & Data for task capturing?? (Feature Request)
- Incompatibility with PSR\Log HOT 3
- Extended robo files are not parsed for commands for consolidation/annotated-command >= 4.5.7 HOT 3
- Docs: "Edit on Github" links not working HOT 10
- Apigen integration is mostly outdated
- PHP 8.2 support HOT 3
- Unable to delegate to a ReflectionContainer
- https://robo.li/robo.phar is a 404 HOT 3
- Deprecation for PHP 8.1 HOT 1
- Domain http://robo.li/ is not available HOT 7
- Categorizing output into verbosity levels HOT 1
- Robo discards .env in taskExec() HOT 1
- Symfony 7 support HOT 3
- TaskExitException should contain the error output HOT 3
- PHP Fatal Error: With PHPunit 10 and above getting a php fatal error of overriding final methods HOT 1
- Change default branch to 5.x HOT 1
- Remove outdated tasks
- Site down? HOT 3
- PHP Fatal error when using chgrp() or chown() without the optional 'recursive' parameter.
- Fix "symfony/event-dispatcher" dependency in branch 5.*
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robo.