Download the PHP package phpexpertsinc/doctrine-detective without Composer

On this page you can find all versions of the php package phpexpertsinc/doctrine-detective. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package doctrine-detective

Doctrine Detective Bundle

Doctrine Detective is a Symfony2 Bundle that provides a detailed SQL query log for both HTML and JSON responses, including the SQL query, its location, and duration, organized by Controller -> Service -> Repository.

It is mainly useful for debugging, profiling and refactoring your Doctrine ORM queries into far more efficient Doctrine DBAL queries.

Unlike other SQL loggers, Doctrine Detective has the following features:

  1. Queries are organized hierarchically by class and method.
  2. Prepared statements have the parameters interpolated, so you can directly query them against the database.
  3. RESTful API support.

Installation

  1. Add "phpexpertsinc/doctrine-detective" : "1.*" to your composer.json.
  2. Run $ composer update phpexpertsinc/doctrine-detective.
  3. Edit app/appKernel.php.
  4. Add new PHPExperts\DoctrineDetectiveBundle\DoctrineDetectiveBundle(), to the AppKernel::registerBundles() array. -or- (prefered), add it to just the dev and test environments:

Output

HTML Response

At the end of every HTML response, you will find the following:

<div class="doctrineDetective-SQLLog">
    <table>
        <tr>
            <td>TestController::getActiveUsersAction</td>
            <td>3.886604999847429 ms</td>
            <td>-</td>
        </tr>
        <tr>
            <td>UserService</td>
            <td>3.37965652160646 ms</td>
            <td>-</td>
        </tr>
        <tr>
            <td>UserService::getUsers(), Line 210</td>
            <td>2.622127532959 ms</td>
            <td>SELECT * FROM users WHERE ids IN (1, 2, 3, 4, 5)</td>
        </tr>
        <tr>
            <td>UserRepository</td>
            <td>0.75697898864746 ms</td>
            <td>-</td>
        </tr>
        <tr>
            <td>UserRepository::isActive(), Line 115</td>
            <td>0.75697898864746</td>
            <td>SELECT last_visit FROM login_log WHERE userId IN (1, 2, 3, 4, 5)</td>
        </tr>
    </table>
</div>

JSON Response

At the end of your JSON response, you will find the sqlLog array:

"sqlLog": {
    "TestController::getActiveUsersAction": {
        "time": 3.886604999847429,
        "UserService": {
            "time": 3.37965652160646,
            "getUsers": {
                "time": 2.622127532959,
                "queries": [
                    {
                        "query": "SELECT * FROM users WHERE ids IN (1, 2, 3, 4, 5)", 
                        "line": 210,
                        "time": 2.622127532959
                    }
                ]
            },
        },
        "UserRepository": {
            "isActive": {
                "time": 0.75697898864746,
                "queries": [
                    {
                        "query": "SELECT last_visit FROM login_log WHERE userId IN (1, 2, 3, 4, 5)", 
                        "line": 115,
                        "time": 0.75697898864746
                    }
                ]
            },
        }
    }
}

All versions of doctrine-detective with dependencies

PHP Build Version
Package Version
Requires symfony/http-kernel Version 2.*
symfony/dependency-injection Version 2.*
doctrine/orm Version *
doctrine/doctrine-bundle Version *
php Version >=5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phpexpertsinc/doctrine-detective contains the following files

Loading the files please wait ....