Skip to content

Commit 9d7e82b

Browse files
committed
Documentation
1 parent acf907f commit 9d7e82b

File tree

5 files changed

+57
-2
lines changed

5 files changed

+57
-2
lines changed

README.md

+44-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,44 @@
1-
[![status](https://img.shields.io/badge/status-dev-red.svg)](https://github.com/steevanb/symfony-container-introspection)
1+
[![version](https://img.shields.io/badge/version-1.0.0-green.svg)](https://github.com/steevanb/symfony-container-introspection/tree/1.0.0)
2+
[![php](https://img.shields.io/badge/php-^7.1-blue.svg)](https://php.net)
3+
[![symfony](https://img.shields.io/badge/symfony/dependency--injection-^3.4||^4.0-blue.svg)](https://symfony.com)
4+
![Lines](https://img.shields.io/badge/code%20lines-734-green.svg)
5+
![Total Downloads](https://poser.pugx.org/steevanb/symfony-container-introspection/downloads)
6+
[![Scrutinizer](https://scrutinizer-ci.com/g/steevanb/symfony-container-introspection/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/steevanb/symfony-container-introspection/)
7+
8+
symfony-container-introspection
9+
===============================
10+
11+
It helps you to know which services are registered, instanciated, public or private and list container parameters.
12+
13+
You have access to Container cache statistics: files count, count code lines and cache size.
14+
15+
With Symfony, a new profiler tab will appear:
16+
17+
![Symfony profiler tab](symfony_profiler_tab.png)
18+
19+
![Symfony profiler](symfony_profiler.png)
20+
21+
[Changelog](changelog.md)
22+
23+
Installation
24+
============
25+
26+
```bash
27+
composer require steevanb/symfony-container-introspection ^1.0
28+
```
29+
30+
If you use Symfony (and not just symfony/dependency-injection), you can add `ContainerIntrospectionBundle` to your Kernel:
31+
```php
32+
# app/AppKernel.php for Symfony 3.*
33+
# src/Kernel.php for Symfony 4.*
34+
35+
class Kernel
36+
{
37+
public function registerBundles()
38+
{
39+
if ($this->getEnvironment() === 'dev') {
40+
$bundles[] = new \steevanb\ContainerIntrospection\Bridge\ContainerIntrospectionBundle\ContainerIntrospectionBundle();
41+
}
42+
}
43+
}
44+
```

changelog.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### 1.0.0 - 2018-06-06
2+
3+
- Get registered services: `ContainerIntrospectionService::getRegisteredServices()`
4+
- Get instantiated services: `ContainerIntrospectionService::getInstantiatedServices()`
5+
- Get public services: `ContainerIntrospectionService::getPublicServices()`
6+
- Get private services: `ContainerIntrospectionService::getPrivateServices()`
7+
- Get container parameters: `ContainerIntrospectionService::getParameters()`
8+
- Get cache dir: `ContainerIntrospectionService::getContainerCacheDir()`
9+
- Count Container cache files: `ContainerIntrospectionService::countContainerCacheFiles()`
10+
- Count Container cache lines: `ContainerIntrospectionService::countContainerCacheLines()`
11+
- Count Container cache size: `ContainerIntrospectionService::getContainerCacheSize()`
12+
- Create bridge for Symfony: `ContainerIntrospectionBundle`

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"require": {
1010
"php": "^7.1",
11-
"symfony/dependency-injection": "^3.3"
11+
"symfony/dependency-injection": "^3.4||^4.0"
1212
},
1313
"repositories": [
1414
{

symfony_profiler.png

46.7 KB
Loading

symfony_profiler_tab.png

5.8 KB
Loading

0 commit comments

Comments
 (0)