@@ -37,10 +37,16 @@ You can install the component in 2 different ways:
3737Usage
3838-----
3939
40- Once the component is installed, it automatically registers a
41- `PHPUnit event listener `_ which in turn registers a `PHP error handler `_
42- called :class: `Symfony\\ Bridge\\ PhpUnit\\ DeprecationErrorHandler `. After
43- running your PHPUnit tests, you will get a report similar to this one:
40+ Once the component is installed, a ``simple-phpunit `` script is created in the
41+ ``vendor/ `` directory to run tests. This script wraps the original PHPUnit binary
42+ to provide more features:
43+
44+ .. code-block :: terminal
45+
46+ $ cd my-project/
47+ $ ./vendor/bin/simple-phpunit
48+
49+ After running your PHPUnit tests, you will get a report similar to this one:
4450
4551.. image :: /_images/components/phpunit_bridge/report.png
4652
@@ -57,6 +63,21 @@ The summary includes:
5763 Deprecation notices are all other (non-legacy) notices, grouped by message,
5864 test class and method.
5965
66+ .. note ::
67+
68+ If you don't want to use the ``simple-phpunit `` script, register the following
69+ `PHPUnit event listener `_ in your PHPUnit configuration file to get the same
70+ report about deprecations (which is created by a `PHP error handler `_
71+ called :class: `Symfony\\ Bridge\\ PhpUnit\\ DeprecationErrorHandler `):
72+
73+ .. code-block :: xml
74+
75+ <!-- phpunit.xml.dist -->
76+ <!-- ... -->
77+ <listeners >
78+ <listener class =" Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
79+ </listeners >
80+
6081 Trigger Deprecation Notices
6182---------------------------
6283
0 commit comments