Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9464212

Browse filesBrowse files
committed
minor #8127 Fixed the explanation about PHPUnit event listeners in PHPUnitBridge (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #8127). Discussion ---------- Fixed the explanation about PHPUnit event listeners in PHPUnitBridge This fixes #7411. @nicolas-grekas if you have some time, please review this change. Thanks! Commits ------- 29c830b Fixed the explanation about PHPUnit event listeners in PHPUnitBridge
2 parents 8b4487b + 29c830b commit 9464212
Copy full SHA for 9464212

File tree

Expand file treeCollapse file tree

1 file changed

+25
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+25
-4
lines changed

‎components/phpunit_bridge.rst

Copy file name to clipboardExpand all lines: components/phpunit_bridge.rst
+25-4Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,16 @@ You can install the component in 2 different ways:
3737
Usage
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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.