-
Notifications
You must be signed in to change notification settings - Fork 102
Conversation
👍 |
Requesting peer code review @zendframework. |
The short flags (-v, -d, -q) mentioned in the docs are not implemented. // DiagnosticsController.php
$verbose = $this->params()->fromRoute('verbose', false);
$debug = $this->params()->fromRoute('debug', false);
$quiet = !$verbose && !$debug && $this->params()->fromRoute('quiet', false);
// Should be something like
$verbose = $this->params()->fromRoute('verbose', false) || $this->params()->fromRoute('v', false);
$debug = $this->params()->fromRoute('debug', false) || $this->params()->fromRoute('d', false);
$quiet = !$verbose && !$debug && ($this->params()->fromRoute('quiet', false) || $this->params()->fromRoute('q', false)); |
Not really. I use arg. grouping and group names in my routes so I don't Install the module and try for yourself. Artur Bodera On 18 kwi 2013, at 11:30, Robert Boloc notifications@github.com wrote: The short flags (-v, -d, -q) mentioned in the docs are not implemented. // DiagnosticsController.php$verbose = — |
Thx. I'll check it out... Artur Bodera On 18 kwi 2013, at 12:39, Robert Boloc notifications@github.com wrote: I did, that's why I wrote the comment [image: My system is Ubuntu 12.10 with Zend Framework 2.1.5 [image: Captura de 2013-04-18 — |
I found the bug in the zf2 console routing. I sent a pull request with the fix zendframework/zendframework#4262 |
When a test definition contains a name such as "phpversion", a class named "ZFTool\Diagnostics\Test\PhpVersion" will take precendence over "phpversion()" global function.
Conflicts: src/ZFTool/Module.php
Ready for merge. @ezimuel please take a final look and merge when ready. I'd like to blog about it once it's in. Thanks! |
@robertboloc thx for fixing alternative flags aliases. It'll be released with zf 2.2. Until that time, I'm leaving the |
i saw someone on twitter mention that he was working on something like this a while ago and pointed them at https://github.com/liip/LiipMonitor. would have been nice to collaborate here .. maybe still possible? |
Yes, why not? @Thinkscape what do you think? |
It's a different approach to the topic. There are some similarities, but mine's more of a framework on which you build your own tests. ZFToold Diag also talks to ZF2 ServiceManager so you can have your checks fetched from there (i.e. factories, classes etc.). I was also considering a more "general" approach (as that LiipMonitor did), but that would mean having to rewrite Console, forget about using DIC (SM) and other useful features. I've decided to make it as a ZFTool component so people can easily and quickly tie it into existing ZF2 apps without having to think too much :-) |
Hmm I guess I would need to study your code in more detail but LiipMonitor is the basis for LiipMonitorBundle which leverages both the Symfony2 DIC and Console components. While I do not know the ZF2 equivalents I don't see how the provided interfaces would cause issues there either: Just to clarify, my proposal for collaboration would be on the interfaces and actual logic to define checks. It absolutely makes sense to then provide tight integration with ZF2 MVC etc. |
A flexible, event-based runtime diagnostics component.
Full documentation available in
docs
folder:https://github.com/Thinkscape/ZFTool/blob/feature/diagnostics/docs/DIAGNOSTICS.md
I've decided to implement Diagnostics as a feature of ZFTool (as opposed to ZF2) because it depends on configured MVC to gather definitions from config, other modules and then run tests. Despite that,
ZFTool\Diagnostics
can easily be used standalone, extended and augmented (with EM listeners).