Comments (9)
Oh... I closed referenced task before I implemented Timer :)
from robo.
Timer also does not need to be a trait actually.
You could simply use https://packagist.org/packages/phpunit/PHP-timer for example.
from robo.
I like traits a bit more than static calls.
from robo.
@boedah oh, why do you need ExecOne + Stack?
Stack is about running multiple commands one by one, ExecOne - to run exactly one command.
Actually I didn't think of combining them together...
from robo.
I think you still won't have a chance to include one into another because you still get conflicitng properties in this case :(
arg
and option
will append arguments to exact one command.
while Stack will ask for a set of different commands. Not sure how they are expected to run with same arguments. In your case you might think to define your own *Stack class.
from robo.
Btw, check latest update, I have removed some redundant methods from CommandStack
from robo.
Reason behind wanting to use both is: for Drush you can set global arguments which must not be set for each command (e.g. the drupal root directory and the site alias).
E.g.
$command = $this->taskDrushStack()
->drupalRootDirectory('/var/www/html/app')
->siteAlias('@qa')
->exec('command-1')
->exec('command-2')
->getCommand();
results in
drush @qa command-1 -y -r /var/www/html/app && drush @qa command-2 -y -r /var/www/html/app
I will make a PR with a suggestion to be able to do this.
from robo.
Thanks for explaining. I like your PR.
from robo.
I like traits a bit more than static calls.
But you can be in depencency hell...
A static Timer class can simply be used by any class who wants to use it...
Additionally, using e.g. PHP-timer would mean a little less NIH ;)
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.