Skip to content

Commit

Permalink
Replace Symfony\Bridge\Doctrine\RegistryInterface (removed) by Doctr…
Browse files Browse the repository at this point in the history
…ine\Common\Persistence\ManagerRegistry in DoctrineStatsCollector
  • Loading branch information
steevanb committed Dec 7, 2020
1 parent c97dad2 commit 97d89b4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.idea/

/vendor
/composer.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace steevanb\DoctrineStats\Bridge\DoctrineStatsBundle\DataCollector;

use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\ORM\EntityManagerInterface;
use steevanb\DoctrineStats\Bridge\DoctrineCollectorInterface;
use steevanb\DoctrineStats\Doctrine\DBAL\Logger\SqlLogger;
use Symfony\Bridge\Doctrine\RegistryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
Expand Down Expand Up @@ -39,13 +39,13 @@ class DoctrineStatsCollector extends DataCollector implements DoctrineCollectorI
/** @var array */
protected $hydratedEntities = [];

/** @var RegistryInterface */
/** @var ManagerRegistry */
protected $doctrine;

/**
* @param SqlLogger $sqlLogger
*/
public function __construct(SqlLogger $sqlLogger, RegistryInterface $doctrine)
public function __construct(SqlLogger $sqlLogger, ManagerRegistry $doctrine)
{
$this->sqlLogger = $sqlLogger;
$this->doctrine = $doctrine;
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
[![version](https://img.shields.io/badge/version-1.3.3-green.svg)](https://github.com/steevanb/doctrine-stats/tree/1.3.3)
[![version](https://img.shields.io/badge/version-1.4.0-green.svg)](https://github.com/steevanb/doctrine-stats/tree/1.4.0)
[![doctrine](https://img.shields.io/badge/doctrine/orm-^2.4.8-blue.svg)](http://www.doctrine-project.org)
[![php](https://img.shields.io/badge/php-^5.4.6%20||%20^7.0-blue.svg)](http://www.php.net)
![Lines](https://img.shields.io/badge/code%20lines-2153-green.svg)
![Lines](https://img.shields.io/badge/code%20lines-2162-green.svg)
![Total Downloads](https://poser.pugx.org/steevanb/doctrine-stats/downloads)
[![SensionLabsInsight](https://img.shields.io/badge/SensionLabsInsight-platinum-brightgreen.svg)](https://insight.sensiolabs.com/projects/884a7b62-bb7a-41dc-8198-6d2bb0694795/analyses/28)
[![Scrutinizer](https://scrutinizer-ci.com/g/steevanb/doctrine-stats/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/steevanb/doctrine-stats/)

### doctrine-stats

Add important Doctrine statistics :
* count managed entities
* count lazy loaded entities
* hydration time by hydrator and query
* group queries by query string, show differents parameters used by same query string
* count different query string used
* Count managed entities
* Count lazy loaded entities
* Hydration time by hydrator and query
* Group queries by query string, show differents parameters used by same query string
* Count different query string used

[Changelog](changelog.md)

### Installation

```bash
composer require --dev "steevanb/doctrine-stats": "^1.3.3"
composer require --dev "steevanb/doctrine-stats": "^1.4"
```

If you want to add hydration time to your statistics :
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### [1.4.0](../../compare/1.3.3...1.4.0) - 2020-12-07

- Replace `Symfony\Bridge\Doctrine\RegistryInterface` (removed) by `Doctrine\Common\Persistence\ManagerRegistry` in `DoctrineStatsCollector`

### [1.3.3](../../compare/1.3.2...1.3.3) - 2017-12-07

- [[Gemorroj](https://github.com/Gemorroj)] Fix template path for Symfony 4
Expand Down

0 comments on commit 97d89b4

Please sign in to comment.