Skip to content

Commit 5945595

Browse files
committed
Add doc about Symfony
1 parent ab7dccd commit 5945595

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,32 @@ Detected stack: laravel
8585
Version: 10.19.0
8686
```
8787

88+
### Usage with Symfony
89+
90+
Declare the factory and the detector in your `services.yaml` file.
91+
92+
For Github:
93+
94+
```yaml
95+
services:
96+
Einenlum\PhpStackDetector\Factory\GithubDetectorFactory: ~
97+
98+
Einenlum\PhpStackDetector\Detector:
99+
factory: ['@Einenlum\PhpStackDetector\Factory\GithubDetectorFactory', 'create']
100+
arguments:
101+
$client: '@Github\Client'
102+
```
103+
104+
For local filesystem:
105+
106+
```yaml
107+
services:
108+
Einenlum\PhpStackDetector\Factory\FilesystemDetectorFactory: ~
109+
110+
Einenlum\PhpStackDetector\Detector:
111+
factory: ['@Einenlum\PhpStackDetector\Factory\FilesystemDetectorFactory', 'create']
112+
```
113+
88114
## Tests
89115
90116
```

0 commit comments

Comments
 (0)