Skip to content

Commit a92048f

Browse files
committed
Add more detail to Usage section
1 parent 6535548 commit a92048f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ please attach a copy of the error message and the relevant lines in ``app/cache/
4141

4242
## Usage
4343

44+
If you have an existing Symfony application and you want to ensure that the service definitions are always valid the easiest way is to add the compiler pass to your bundle as described [here](https://github.com/matthiasnoback/symfony-service-definition-validator#compiler-pass). That will validate your service definitions every time the bundle is compiled, which happens every single request if the cache is turned off (the default in debug mode).
45+
46+
If you want to validate the service definitions separately, like in a console command or in a test, you'll need to set it up yourself as described [here](https://github.com/matthiasnoback/symfony-service-definition-validator#service-validator-factory).
47+
4448
### Service validator factory
4549

4650
You can use the stand-alone validator for single definitions:

0 commit comments

Comments
 (0)