8000 minor #9700 Add best practice note about version (arderyp, javieregui… · symfony/symfony-docs@35e4224 · GitHub
[go: up one dir, main page]

Skip to content

Commit 35e4224

Browse files
committed
minor #9700 Add best practice note about version (arderyp, javiereguiluz)
This PR was submitted for the 4.0 branch but it was merged into the 2.7 branch instead (closes #9700). Discussion ---------- Add best practice note about version Adding this info based on request by @nicolas-grekas in [#27037](symfony/symfony#27037) <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 6082b97 Minor tweak 9ecff4b components/phpunit_bridge.rst cd7fd94 Add best practice note about version
2 parents 87f6cb9 + 6082b97 commit 35e4224

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

components/phpunit_bridge.rst

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,38 @@ Installation
2727

2828
.. code-block:: terminal
2929
30-
$ composer require symfony/phpunit-bridge
30+
$ composer require --dev "symfony/phpunit-bridge:*"
3131
3232
Alternatively, you can clone the `<https://github.com/symfony/phpunit-bridge>`_ repository.
3333

3434
.. include:: /components/require_autoload.rst.inc
3535

36+
.. note::
37+
38+
The PHPUnit bridge is designed to work with all maintained versions of
39+
Symfony components, even across different major versions of them. You should
40+
always use its very latest stable major version to get the most accurate
41+
deprecation report.
42+
43+
If you plan to :ref:`write-assertions-about-deprecations` and use the regular
44+
PHPUnit script (not the modified PHPUnit script provided by Symfony), you have
45+
to register a new `test listener`_ called ``SymfonyTestsListener``:
46+
47+
.. code-block:: xml
48+
49+
<!-- http://phpunit.de/manual/6.0/en/appendixes.configuration.html -->
50+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
51+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.0/phpunit.xsd"
52+
>
53+
54+
<!-- ... -->
55+
56+
<listeners>
57+
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
58+
</listeners>
59+
</phpunit>
60+
>>>>>>> Minor tweak
61+
3662
Usage
3763
-----
3864

0 commit comments

Comments
 (0)
0