Giter VIP home page Giter VIP logo

zend-diagnostics's Introduction

zend-diagnostics's People

Contributors

0x46616c6b avatar baldurrensch avatar bc-luke avatar drschimke avatar frne avatar froschdesign avatar glaubinix avatar headd2k avatar johngrafis avatar kbond avatar lsmith77 avatar mfpierre avatar michalbundyra avatar paschdan avatar pborreli avatar romainneutron avatar rwos avatar samsonasik avatar sasezaki avatar slashbin avatar spea avatar stof avatar thinkscape avatar till avatar tkachuk avatar vpx avatar weierophinney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zend-diagnostics's Issues

Create ZendDiagnostics website

I'd like to have a website explaining the benefits and best practices for production apps' diagnostics suite.

It would also include usage examples for various frameworks and a catalog of available checks.

Add basic Runner

Create ZendDiagnostics\Runner used to run a bundle of Checks and return a collection of results.

HttpService with HTTP Basic authentication

I require checking an service that uses authentication.

Using http://user:[email protected] as the host does not work. Is this something that can be added to the current HttpService?

I have created a Guzzle version of HttpService that works. I can make a PR to add if the current HttpService cannot handle.

Risky tests

Some tests are being marked as Risky: https://travis-ci.org/zendframework/ZendDiagnostics/jobs/42644540#L111

Running the tests with -v displays the following messages:

There were 4 risky tests:

1) ZendDiagnosticsTest\BasicConsoleReporterTest::testUnknownSymbols
Test code or tested code did not (only) close its own output buffers

2) ZendDiagnosticsTest\BasicConsoleReporterTest::testProgressDotsNoGutter
Test code or tested code did not (only) close its own output buffers

3) ZendDiagnosticsTest\BasicConsoleReporterTest::testProgressOverflow
Test code or tested code did not (only) close its own output buffers

4) ZendDiagnosticsTest\BasicConsoleReporterTest::testProgressOverflowMatch
Test code or tested code did not (only) close its own output buffers

I am not sure how to fix these...

Ideas for ZF2-specific checks

  • Check view_manager template_map and template_path_stack
    • Check for existence
    • Check for readability
    • Lint the PHP code
  • Check Zend\Db connection availability
  • Generic Zend\Cache\Adapter check, optionally probing for capabilities and checking that too.
  • Generic Zend\Session\Adapter check.
  • Try to instantiate all SM services found in configuration and catch exceptions.
  • Is module installed ? (request)

test setup improvements

Is anyone open for improvements to the test setup? E.g. phpunit as require-dev, a Makefile etc.? I'll PR it then.

Please add LICENSE file

Without this file, redistribution of this library in any project will be impossible with violating the BSD license term:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.

Also see: https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text

What if I want to send a JSON body on the request?

I'm having an issue because I cannot test a http services that is supposed to receive a json on the body, here is the problem:

https://github.com/zendframework/ZendDiagnostics/blob/d27aa064c5185c5830e917ffe48284b0995eed13/src/ZendDiagnostics/Check/GuzzleHttpService.php#L105

This line will have to say:

array('headers' => $this->headers, 'json' => $this->body, 'exceptions' => false),

Maybe there should be a way to specify the type of body that we want to pass, something like:

$body = ['body' => $this->body];
if($this->body['json']) $body = ['json' => $this->body['json'] ];
array('headers' => $this->headers, $body, 'exceptions' => false),

ZendDiagnostics\Check\ProcessRunning doesn't work in small cli windows

Hello, the ZendDiagnostics\Check\ProcessRunning::check doesn't work in small cli windows.

A Solution would be to add -ww to the ps command.

exec('ps -efww | grep ' . escapeshellarg($this->processName) . ' | grep -v grep', $output, $return);

ps manual:

-w Wide output. Use this option twice for unlimited width.

Alias of check is lost for single checking

In this loop $alias always will be 0, if $checkAlias is not null
https://github.com/zendframework/ZendDiagnostics/blob/master/src/ZendDiagnostics/Runner/Runner.php#L112

Problem in this line of code:
https://github.com/zendframework/ZendDiagnostics/blob/master/src/ZendDiagnostics/Runner/Runner.php#L106
For example, this will solve this problem:
$checks = $checkAlias ? new ArrayObject(array($checkAlias => $this->getCheck($checkAlias))) : $this->getChecks();

php72 error signature?

Declaration of ZendDiagnostics\Result\Collection::offsetSet($index, $checkResult) must be compatible with SplObjectStorage::offsetSet($object, $inf = NULL)

is this a php72 side effect?

liip/LiipMonitorBundle#157

[2017-12-05 17:56:35] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Compile Error: Declaration of ZendDiagnostics\Result\Collection::offsetSet($index, $checkResult) must be compatible with SplObjectStorage::offsetSet($object, $inf = NULL)" at /private/var/www/system/var/vendor/zendframework/zenddiagnostics/src/ZendDiagnostics/Result/Collection.php line 219 {"exception":"[object] (Symfony\Component\Debug\Exception\FatalErrorException(code: 0): Compile Error: Declaration of ZendDiagnostics\Result\Collection::offsetSet($index, $checkResult) must be compatible with SplObjectStorage::offsetSet($object, $inf = NULL) at /private/var/www/system/var/vendor/zendframework/zenddiagnostics/src/ZendDiagnostics/Result/Collection.php:219)"} []
[2017-12-05 17:56:35] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_controller":"web_profiler.controller.profiler:toolbarAction","token":"007c14","_route":"_wdt"},"request_uri":"https://system.m/_wdt/007c14","method":"GET"} []

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.